From patchwork Sat Oct 1 19:08:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 611796 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BD0FC433F5 for ; Sat, 1 Oct 2022 19:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229563AbiJATIV (ORCPT ); Sat, 1 Oct 2022 15:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbiJATIU (ORCPT ); Sat, 1 Oct 2022 15:08:20 -0400 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [IPv6:2001:4b7a:2000:18::162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F288918B08; Sat, 1 Oct 2022 12:08:19 -0700 (PDT) Received: from localhost.localdomain (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id CB1A020363; Sat, 1 Oct 2022 21:08:17 +0200 (CEST) From: Marijn Suijten To: phone-devel@vger.kernel.org, Rob Clark , Dmitry Baryshkov , Vinod Koul Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Marijn Suijten , David Airlie , Daniel Vetter , Abhinav Kumar , Sean Paul , Thomas Zimmermann , Javier Martinez Canillas , Alex Deucher , Douglas Anderson , Vladimir Lypak , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org Subject: [PATCH 0/5] drm: Fix math issues in MSM DSC implementation Date: Sat, 1 Oct 2022 21:08:02 +0200 Message-Id: <20221001190807.358691-1-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Various removals of complex yet unnecessary math, fixing all uses of drm_dsc_config::bits_per_pixel to deal with the fact that this field includes four fractional bits, and finally an approach for dealing with dsi_host setting negative values in range_bpg_offset, resulting in overflow inside drm_dsc_pps_payload_pack(). Note that updating the static bpg_offset array to limit the size of these negative values to 6 bits changes what would be written to the DPU hardware at register(s) DSC_RANGE_BPG_OFFSET, hence the choice has been made to cover up for this while packing the value into a smaller field instead. Altogether this series is responsible for solving _all_ Display Stream Compression issues and artifacts on the Sony Tama (sdm845) Akatsuki smartphone (2880x1440p). Marijn Suijten (5): drm/msm/dsi: Remove useless math in DSC calculation drm/msm/dsi: Remove repeated calculation of slice_per_intf drm/msm/dsi: Account for DSC's bits_per_pixel having 4 fractional bits drm/msm/dpu1: Account for DSC's bits_per_pixel having 4 fractional bits drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields drivers/gpu/drm/display/drm_dsc_helper.c | 6 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 11 +----- drivers/gpu/drm/msm/dsi/dsi_host.c | 45 ++++++++++++++-------- 3 files changed, 33 insertions(+), 29 deletions(-) Reviewed-by: Vinod Koul --- 2.37.3