dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Marijn Suijten <marijn.suijten@somainline.org>,
	<phone-devel@vger.kernel.org>, Rob Clark <robdclark@gmail.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Vinod Koul <vkoul@kernel.org>
Cc: Marek Vasut <marex@denx.de>,
	freedreno@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Jami Kettunen <jami.kettunen@somainline.org>,
	Vladimir Lypak <vladimir.lypak@gmail.com>,
	linux-arm-msm@vger.kernel.org,
	Konrad Dybcio <konrad.dybcio@somainline.org>,
	Javier Martinez Canillas <javierm@redhat.com>,
	dri-devel@lists.freedesktop.org,
	Douglas Anderson <dianders@chromium.org>,
	David Airlie <airlied@linux.ie>,
	Martin Botka <martin.botka@somainline.org>,
	~postmarketos/upstreaming@lists.sr.ht,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@somainline.org>,
	Alex Deucher <alexander.deucher@amd.com>,
	Sean Paul <sean@poorly.run>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] drm/msm/dsi: Remove repeated calculation of slice_per_intf
Date: Tue, 4 Oct 2022 07:41:09 -0700	[thread overview]
Message-ID: <dc3f6ece-b71c-19c0-3cee-f489294de27f@quicinc.com> (raw)
In-Reply-To: <20221001190807.358691-3-marijn.suijten@somainline.org>



On 10/1/2022 12:08 PM, Marijn Suijten wrote:
> slice_per_intf is already computed for intf_width, which holds the same
> value as hdisplay.
> 
> Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration")
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>

LGTM,

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

> ---
>   drivers/gpu/drm/msm/dsi/dsi_host.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index e05bae647431..cb6f2fa11f58 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -842,7 +842,7 @@ static void dsi_ctrl_config(struct msm_dsi_host *msm_host, bool enable,
>   static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mode, u32 hdisplay)
>   {
>   	struct drm_dsc_config *dsc = msm_host->dsc;
> -	u32 reg, intf_width, reg_ctrl, reg_ctrl2;
> +	u32 reg, reg_ctrl, reg_ctrl2;
>   	u32 slice_per_intf, total_bytes_per_intf;
>   	u32 pkt_per_line;
>   	u32 bytes_in_slice;
> @@ -851,8 +851,7 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod
>   	/* first calculate dsc parameters and then program
>   	 * compress mode registers
>   	 */
> -	intf_width = hdisplay;
> -	slice_per_intf = DIV_ROUND_UP(intf_width, dsc->slice_width);
> +	slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width);
>   
>   	/* If slice_per_pkt is greater than slice_per_intf
>   	 * then default to 1. This can happen during partial
> @@ -861,7 +860,6 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod
>   	if (slice_per_intf > dsc->slice_count)
>   		dsc->slice_count = 1;
>   
> -	slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width);
>   	bytes_in_slice = DIV_ROUND_UP(dsc->slice_width * dsc->bits_per_pixel, 8);
>   
>   	dsc->slice_chunk_size = bytes_in_slice;

  parent reply	other threads:[~2022-10-04 14:41 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01 19:08 [PATCH 0/5] drm: Fix math issues in MSM DSC implementation Marijn Suijten
2022-10-01 19:08 ` [PATCH 1/5] drm/msm/dsi: Remove useless math in DSC calculation Marijn Suijten
2022-10-01 20:19   ` Konrad Dybcio
2022-10-04  0:26   ` Bjorn Andersson
2022-10-04 14:33   ` [Freedreno] " Abhinav Kumar
2022-10-04 22:23     ` Marijn Suijten
2022-10-01 19:08 ` [PATCH 2/5] drm/msm/dsi: Remove repeated calculation of slice_per_intf Marijn Suijten
2022-10-01 20:22   ` Konrad Dybcio
2022-10-04  0:30   ` Bjorn Andersson
2022-10-04 14:41   ` Abhinav Kumar [this message]
2022-10-01 19:08 ` [PATCH 3/5] drm/msm/dsi: Account for DSC's bits_per_pixel having 4 fractional bits Marijn Suijten
2022-10-01 20:28   ` Konrad Dybcio
2022-10-01 20:37   ` Marijn Suijten
2022-10-04 14:45   ` Dmitry Baryshkov
2022-10-04 22:35     ` Marijn Suijten
2022-10-04 22:40       ` Dmitry Baryshkov
2022-10-04 22:56         ` Marijn Suijten
2022-10-01 19:08 ` [PATCH 4/5] drm/msm/dpu1: " Marijn Suijten
2022-10-04 14:35   ` Dmitry Baryshkov
2022-10-04 17:03   ` Abhinav Kumar
2022-10-04 22:11     ` Marijn Suijten
2022-10-05 14:19       ` Abhinav Kumar
2022-10-05 18:45         ` Marijn Suijten
2022-10-01 19:08 ` [PATCH 5/5] drm/dsc: Prevent negative BPG offsets from shadowing adjacent bitfields Marijn Suijten
2022-10-01 20:23   ` Marijn Suijten
2022-10-04 14:41     ` Dmitry Baryshkov
2022-10-04 21:48       ` Marijn Suijten
2022-10-04 20:22   ` Abhinav Kumar
2022-10-04 21:57     ` Marijn Suijten
2022-10-04 22:31       ` Abhinav Kumar
2022-10-04 22:39         ` Marijn Suijten
2022-10-05 15:33           ` Abhinav Kumar
2022-10-05 18:29             ` Marijn Suijten
2022-10-04  4:42 ` [PATCH 0/5] drm: Fix math issues in MSM DSC implementation Vinod Koul
2022-10-04  9:51   ` Marijn Suijten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc3f6ece-b71c-19c0-3cee-f489294de27f@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jami.kettunen@somainline.org \
    --cc=javierm@redhat.com \
    --cc=konrad.dybcio@somainline.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=marijn.suijten@somainline.org \
    --cc=martin.botka@somainline.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=tzimmermann@suse.de \
    --cc=vkoul@kernel.org \
    --cc=vladimir.lypak@gmail.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).