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: 12996667 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5B5AAC433FE for ; Sat, 1 Oct 2022 19:08:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7B5CD10E499; Sat, 1 Oct 2022 19:08:26 +0000 (UTC) Received: from relay04.th.seeweb.it (relay04.th.seeweb.it [IPv6:2001:4b7a:2000:18::165]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E4B310E2A3 for ; Sat, 1 Oct 2022 19:08:20 +0000 (UTC) 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 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: freedreno@lists.freedesktop.org, Douglas Anderson , Thomas Zimmermann , Jami Kettunen , Vladimir Lypak , linux-arm-msm@vger.kernel.org, Konrad Dybcio , Abhinav Kumar , dri-devel@lists.freedesktop.org, Javier Martinez Canillas , David Airlie , Martin Botka , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Alex Deucher , Marijn Suijten , Sean Paul , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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