Message ID | 20221221231943.1961117-3-marijn.suijten@somainline.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp33099wrn; Wed, 21 Dec 2022 15:21:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXtGEFvQwenlqJcL+o+hT+hiNdgndHxQxHuceVoxYu8gSvYbdWMcxrXCFVbS5YD1AW6Ouwy4 X-Received: by 2002:a05:6300:8181:b0:a5:6ed:669f with SMTP id bt1-20020a056300818100b000a506ed669fmr21287650pzc.2.1671664884399; Wed, 21 Dec 2022 15:21:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671664884; cv=none; d=google.com; s=arc-20160816; b=uNuUa/4OlFpiHb7kEsP+8OvLnPQl9UOghg9AGwePeFuVO925JLAOKdtKFKUqUYDVnp YU40jsL9cqMYcwNURve+8PVYRKuQKutib6vf6dK0EVqu74dqNAw5EQZJp6SUYLFpZvuQ LkkHUIZoPmW0L1+guISD7FMhWJ/Iu8lisZbfscaT6yRLYuPJHOlub7rgxE25nSlHB+KG ZpATnyRpqKyoqIyoRde7nrSCM5NIUzulDcOFfbJ1xhWzznHb5jKrPKMbVqA35bbkQAPI Gw/niDPRjSsXo6iuv3uvGhG51v0BcQ3AOcFYkgIWnXEh0sZ35C1B92s9M3FQsLgVWiwX 6GaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=a/uE3eWXkUiYMWdUMBXQMtqfNs5Fw8geyIcQ6LJeyIQ=; b=yVp/1Kf1HNLs6U4AnA/hv3T10xep4W598juyOz9MAdSTgVJR7wOP5/rdztO5ULXmz+ 8NFWBmA6jCZXBMd0wfeNHTvwxSuxRPS1n8nQwJFnrLBs9UU1fY5D5eV3z4uHC+csqDIb MWugitm1oBogcCS7UTJfabw/9DwmmOOZoKfyIUdkVNlHnPAvH5A7PkhS/+/J39bvTBcu /6ar0JHKuRjo1UMv8OsW9ZWmsVgjs06c72L97P4uecITEtFAx1MyEOC+34EdYiMVeiPg benoccLWfBk0GsOInIXgxPYy7N2srhoGNG08iXm7JqUD4NDTbNcbxORxLyPwnr880Wg1 B9Dw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j1-20020a632301000000b00478f0644af6si17280565pgj.394.2022.12.21.15.21.08; Wed, 21 Dec 2022 15:21:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234905AbiLUXUI (ORCPT <rfc822;pacteraone@gmail.com> + 99 others); Wed, 21 Dec 2022 18:20:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234853AbiLUXUA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 21 Dec 2022 18:20:00 -0500 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [5.144.164.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2DF124BE3 for <linux-kernel@vger.kernel.org>; Wed, 21 Dec 2022 15:19:59 -0800 (PST) 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 2E9CD203C3; Thu, 22 Dec 2022 00:19:57 +0100 (CET) From: Marijn Suijten <marijn.suijten@somainline.org> To: phone-devel@vger.kernel.org, Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Vinod Koul <vkoul@kernel.org> Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>, Konrad Dybcio <konrad.dybcio@somainline.org>, Martin Botka <martin.botka@somainline.org>, Jami Kettunen <jami.kettunen@somainline.org>, Marijn Suijten <marijn.suijten@somainline.org>, Sean Paul <sean@poorly.run>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Stephen Boyd <swboyd@chromium.org>, Bjorn Andersson <andersson@kernel.org>, Jessica Zhang <quic_jesszhan@quicinc.com>, =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= <ville.syrjala@linux.intel.com>, Kuogee Hsieh <quic_khsieh@quicinc.com>, Jani Nikula <jani.nikula@intel.com>, sunliming <sunliming@kylinos.cn>, Sam Ravnborg <sam@ravnborg.org>, Haowen Bai <baihaowen@meizu.com>, Konrad Dybcio <konrad.dybcio@linaro.org>, Loic Poulain <loic.poulain@linaro.org>, Vinod Polimera <quic_vpolimer@quicinc.com>, Douglas Anderson <dianders@chromium.org>, Vladimir Lypak <vladimir.lypak@gmail.com>, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Marek Vasut <marex@denx.de> Subject: [PATCH v2 2/8] drm/msm/dsi: Use DSC slice(s) packet size to compute word count Date: Thu, 22 Dec 2022 00:19:37 +0100 Message-Id: <20221221231943.1961117-3-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221221231943.1961117-1-marijn.suijten@somainline.org> References: <20221221231943.1961117-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752867677817491335?= X-GMAIL-MSGID: =?utf-8?q?1752867677817491335?= |
Series |
drm/msm: DSC Electric Boogaloo for sm8[12]50
|
|
Commit Message
Marijn Suijten
Dec. 21, 2022, 11:19 p.m. UTC
According to downstream the value to use for WORD_COUNT is bytes_per_pkt, which denotes the number of bytes in a packet based on how many slices have been configured by the panel driver times the width of a slice times the number of bytes per pixel. The DSC panels seen thus far use one byte per pixel, only one slice per packet, and a slice width of half the panel width leading to the desired bytes_per_pkt+1 value to be equal to hdisplay/2+1. This however isn't the case anymore for panels that configure two slices per packet, where the value should now be hdisplay+1. Note that the aforementioned panel (on a Sony Xperia XZ3, sdm845) with slice_count=1 has also been tested to successfully accept slice_count=2, which would have shown corrupted output previously. Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index b83cf70b1adb..0686c35a6fd4 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -989,7 +989,7 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi) if (!msm_host->dsc) wc = hdisplay * dsi_get_bpp(msm_host->format) / 8 + 1; else - wc = mode->hdisplay / 2 + 1; + wc = msm_host->dsc->slice_chunk_size * msm_host->dsc->slice_count + 1; dsi_write(msm_host, REG_DSI_CMD_MDP_STREAM0_CTRL, DSI_CMD_MDP_STREAM0_CTRL_WORD_COUNT(wc) |