public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Patch "drm/msm/dsi: fix hdisplay calculation when programming dsi registers" has been added to the 6.19-stable tree
       [not found] <20260315143921.23136-1-sashal@kernel.org>
@ 2026-03-15 14:58 ` Pengyu Luo
  2026-03-17 15:29   ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Pengyu Luo @ 2026-03-15 14:58 UTC (permalink / raw)
  To: stable
  Cc: stable-commits, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
	Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
	Simona Vetter

On Sun, Mar 15, 2026 at 10:39 PM Sasha Levin <sashal@kernel.org> wrote:
>
> This is a note to let you know that I've just added the patch titled
>
>     drm/msm/dsi: fix hdisplay calculation when programming dsi registers
>
> to the 6.19-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
>      drm-msm-dsi-fix-hdisplay-calculation-when-programmin.patch
> and it can be found in the queue-6.19 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.
>
>

Please drop it for all stable trees, this patch has an impact on CMD
panels. Fixes have been submitted, but not merged yet.

Best wishes,
Pengyu
>
> commit 5c8236c2f2cd9998509b0b2bb7cff4c7098dcaf6
> Author: Pengyu Luo <mitltlatltl@gmail.com>
> Date:   Sat Feb 14 18:51:28 2026 +0800
>
>     drm/msm/dsi: fix hdisplay calculation when programming dsi registers
>
>     [ Upstream commit ac47870fd795549f03d57e0879fc730c79119f4b ]
>
>     Recently, the hdisplay calculation is working for 3:1 compressed ratio
>     only. If we have a video panel with DSC BPP = 8, and BPC = 10, we still
>     use the default bits_per_pclk = 24, then we get the wrong hdisplay. We
>     can draw the conclusion by cross-comparing the calculation with the
>     calculation in dsi_adjust_pclk_for_compression().
>
>     Since CMD mode does not use this, we can remove
>     !(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO) safely.
>
>     Fixes: efcbd6f9cdeb ("drm/msm/dsi: Enable widebus for DSI")
>     Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
>     Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>     Patchwork: https://patchwork.freedesktop.org/patch/704822/
>     Link: https://lore.kernel.org/r/20260214105145.105308-1-mitltlatltl@gmail.com
>     Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>     Signed-off-by: Sasha Levin <sashal@kernel.org>
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index e0de545d40775..e8e83ee61eb09 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -993,7 +993,7 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
>
>         if (msm_host->dsc) {
>                 struct drm_dsc_config *dsc = msm_host->dsc;
> -               u32 bytes_per_pclk;
> +               u32 bits_per_pclk;
>
>                 /* update dsc params with timing params */
>                 if (!dsc || !mode->hdisplay || !mode->vdisplay) {
> @@ -1015,7 +1015,9 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
>
>                 /*
>                  * DPU sends 3 bytes per pclk cycle to DSI. If widebus is
> -                * enabled, bus width is extended to 6 bytes.
> +                * enabled, MDP always sends out 48-bit compressed data per
> +                * pclk and on average, DSI consumes an amount of compressed
> +                * data equivalent to the uncompressed pixel depth per pclk.
>                  *
>                  * Calculate the number of pclks needed to transmit one line of
>                  * the compressed data.
> @@ -1027,12 +1029,12 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
>                  * unused anyway.
>                  */
>                 h_total -= hdisplay;
> -               if (wide_bus_enabled && !(msm_host->mode_flags & MIPI_DSI_MODE_VIDEO))
> -                       bytes_per_pclk = 6;
> +               if (wide_bus_enabled)
> +                       bits_per_pclk = mipi_dsi_pixel_format_to_bpp(msm_host->format);
>                 else
> -                       bytes_per_pclk = 3;
> +                       bits_per_pclk = 24;
>
> -               hdisplay = DIV_ROUND_UP(msm_dsc_get_bytes_per_line(msm_host->dsc), bytes_per_pclk);
> +               hdisplay = DIV_ROUND_UP(msm_dsc_get_bytes_per_line(msm_host->dsc) * 8, bits_per_pclk);
>
>                 h_total += hdisplay;
>                 ha_end = ha_start + hdisplay;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Patch "drm/msm/dsi: fix hdisplay calculation when programming dsi registers" has been added to the 6.19-stable tree
  2026-03-15 14:58 ` Patch "drm/msm/dsi: fix hdisplay calculation when programming dsi registers" has been added to the 6.19-stable tree Pengyu Luo
@ 2026-03-17 15:29   ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2026-03-17 15:29 UTC (permalink / raw)
  To: Pengyu Luo
  Cc: stable, stable-commits, Rob Clark, Dmitry Baryshkov,
	Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
	David Airlie, Simona Vetter

On Sun, Mar 15, 2026 at 10:58:00PM +0800, Pengyu Luo wrote:
> On Sun, Mar 15, 2026 at 10:39 PM Sasha Levin <sashal@kernel.org> wrote:
> >
> > This is a note to let you know that I've just added the patch titled
> >
> >     drm/msm/dsi: fix hdisplay calculation when programming dsi registers
> >
> > to the 6.19-stable tree which can be found at:
> >     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> >
> > The filename of the patch is:
> >      drm-msm-dsi-fix-hdisplay-calculation-when-programmin.patch
> > and it can be found in the queue-6.19 subdirectory.
> >
> > If you, or anyone else, feels it should not be added to the stable tree,
> > please let <stable@vger.kernel.org> know about it.
> >
> >
> 
> Please drop it for all stable trees, this patch has an impact on CMD
> panels. Fixes have been submitted, but not merged yet.

Now dropped, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-17 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260315143921.23136-1-sashal@kernel.org>
2026-03-15 14:58 ` Patch "drm/msm/dsi: fix hdisplay calculation when programming dsi registers" has been added to the 6.19-stable tree Pengyu Luo
2026-03-17 15:29   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox