Message ID | 20221213232207.113607-6-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 c7csp420023wrn; Tue, 13 Dec 2022 15:27:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf6veidr2ics+dmMlP90GOZ5pFa3bQWi7k6MPDAYT+m28VvfvY+GzHgplrtZQf7ZseeNBCwF X-Received: by 2002:a05:6402:7cb:b0:470:306a:5c27 with SMTP id u11-20020a05640207cb00b00470306a5c27mr3934003edy.13.1670974074036; Tue, 13 Dec 2022 15:27:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670974074; cv=none; d=google.com; s=arc-20160816; b=JejpkfVhh5ZpoSbPDShH20l5CnEabqgywypDy5RnP/OdUH39qPj1mhfJD04FxJOqe7 bMT4r+i8MkrAcJ9t0eSPiydL+E5qMiZ29S8fYuVgTPbaXiNZlL2/F/6WUj9uYxfXOxgF SzKxC9wxb/LFysxMooWAfUiVbFLsRnQcmWtEjtUQ5jVa/q0+jwY6Q1Ww1Lq0ZO3lpfHP +JXBO2eGNg0Aean6NKUvg68sVJLf8FbJQolp8rWl497yISJDJ8wfykDZe7Sud8FcZdl8 p3kWGrCdNZw74gkyhE38CMds/jYRPxiN5UzX/PJD1w32e7IZ40pzib0k8rrLT8fetBlN HNYA== 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=JPgusq8jcDa+nYO1uw5CttNp5JAquyAU0PNk66skwtw=; b=xktbLfcfVnPSGMWXZ3K1wQWg9o2flgjo0vA2nI7xa7QDPuxt63HOQDGGSVUtT1VUPw +cJ2n3VJkb+gyI9g2h5Z997cHcXI0tKg/OB34y2fW2NJ2FlBC1rsBOWtOQEMS0suWZJj 7kFbt9N7c9UpOwe+CN+/L4EMZY2M+RvIovWm0QbX7IgwNIPH8deyVln0cYIVf7YC2JmQ VyRwXuaiiyWCvSx71kWPGE8XeHcdaFRMHikOmdtoYmDjFAB9r6j1Qzi4GwKwretBD5sv 4+KlJ+VdP5SLrM03ebl7aBLqoLR/KxQRpFTL7qbcES7RZsHZi5YUujy8uhmIyZr09NkN 98Cg== 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 cm25-20020a0564020c9900b0046fd3acedacsi4958784edb.566.2022.12.13.15.27.30; Tue, 13 Dec 2022 15:27:54 -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 S237038AbiLMXXM (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Tue, 13 Dec 2022 18:23:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237028AbiLMXWt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 13 Dec 2022 18:22:49 -0500 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [5.144.164.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3B552AC6 for <linux-kernel@vger.kernel.org>; Tue, 13 Dec 2022 15:22:39 -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 396AF202EB; Wed, 14 Dec 2022 00:22:37 +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 Subject: [RFC PATCH 5/6] drm/msm/dsi: Flip greater-than check for slice_count and slice_per_intf Date: Wed, 14 Dec 2022 00:22:06 +0100 Message-Id: <20221213232207.113607-6-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221213232207.113607-1-marijn.suijten@somainline.org> References: <20221213232207.113607-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?1752143310735571091?= X-GMAIL-MSGID: =?utf-8?q?1752143310735571091?= |
Series |
drm/msm: DSC Electric Boogaloo for sm8[12]50
|
|
Commit Message
Marijn Suijten
Dec. 13, 2022, 11:22 p.m. UTC
According to downstream /and the comment copied from it/ this comparison should be the other way around. In other words, when the panel driver requests to use more slices per packet than what could be sent over this interface, it is bumped down to only use a single slice per packet (and strangely not the number of slices that could fit on the interface). Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") --- drivers/gpu/drm/msm/dsi/dsi_host.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 14.12.2022 00:22, Marijn Suijten wrote: > According to downstream /and the comment copied from it/ this comparison > should be the other way around. In other words, when the panel driver > requests to use more slices per packet than what could be sent over this > interface, it is bumped down to only use a single slice per packet (and > strangely not the number of slices that could fit on the interface). > > Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") > --- Missing s-o-b > drivers/gpu/drm/msm/dsi/dsi_host.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > index 0686c35a6fd4..9bdfa0864cdf 100644 > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > @@ -855,11 +855,11 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod > */ > slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width); > > - /* If slice_per_pkt is greater than slice_per_intf > + /* If slice_count is greater than slice_per_intf > * then default to 1. This can happen during partial > * update. > */ > - if (slice_per_intf > dsc->slice_count) > + if (dsc->slice_count > slice_per_intf) > dsc->slice_count = 1; > > total_bytes_per_intf = dsc->slice_chunk_size * slice_per_intf;
On 2022-12-14 01:02:14, Konrad Dybcio wrote: > > > On 14.12.2022 00:22, Marijn Suijten wrote: > > According to downstream /and the comment copied from it/ this comparison > > should be the other way around. In other words, when the panel driver > > requests to use more slices per packet than what could be sent over this > > interface, it is bumped down to only use a single slice per packet (and > > strangely not the number of slices that could fit on the interface). > > > > Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org> > > --- > Missing s-o-b Thanks for catching, checkpatch would've pointed this out (in addition to a typo in the cover letter) if I had ran it. > > drivers/gpu/drm/msm/dsi/dsi_host.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > > index 0686c35a6fd4..9bdfa0864cdf 100644 > > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > > @@ -855,11 +855,11 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod > > */ > > slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width); > > > > - /* If slice_per_pkt is greater than slice_per_intf > > + /* If slice_count is greater than slice_per_intf > > * then default to 1. This can happen during partial > > * update. > > */ > > - if (slice_per_intf > dsc->slice_count) > > + if (dsc->slice_count > slice_per_intf) > > dsc->slice_count = 1; > > > > total_bytes_per_intf = dsc->slice_chunk_size * slice_per_intf;
On 14/12/2022 01:22, Marijn Suijten wrote: > According to downstream /and the comment copied from it/ this comparison > should be the other way around. In other words, when the panel driver > requests to use more slices per packet than what could be sent over this > interface, it is bumped down to only use a single slice per packet (and > strangely not the number of slices that could fit on the interface). > > Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") > --- > drivers/gpu/drm/msm/dsi/dsi_host.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) With SoB in place: Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
On 12/13/2022 3:22 PM, Marijn Suijten wrote: > According to downstream /and the comment copied from it/ this comparison > should be the other way around. In other words, when the panel driver > requests to use more slices per packet than what could be sent over this > interface, it is bumped down to only use a single slice per packet (and > strangely not the number of slices that could fit on the interface). > > Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Like others have said, with SOB, Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> > --- > drivers/gpu/drm/msm/dsi/dsi_host.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > index 0686c35a6fd4..9bdfa0864cdf 100644 > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > @@ -855,11 +855,11 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod > */ > slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width); > > - /* If slice_per_pkt is greater than slice_per_intf > + /* If slice_count is greater than slice_per_intf > * then default to 1. This can happen during partial > * update. > */ > - if (slice_per_intf > dsc->slice_count) > + if (dsc->slice_count > slice_per_intf) > dsc->slice_count = 1; > > total_bytes_per_intf = dsc->slice_chunk_size * slice_per_intf;
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 0686c35a6fd4..9bdfa0864cdf 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -855,11 +855,11 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod */ slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width); - /* If slice_per_pkt is greater than slice_per_intf + /* If slice_count is greater than slice_per_intf * then default to 1. This can happen during partial * update. */ - if (slice_per_intf > dsc->slice_count) + if (dsc->slice_count > slice_per_intf) dsc->slice_count = 1; total_bytes_per_intf = dsc->slice_chunk_size * slice_per_intf;