On Fri, Mar 20, 2026 at 9:48 AM Dmitry Baryshkov
<[email protected]> wrote:
>
> On Sat, Mar 07, 2026 at 07:12:48PM +0800, Pengyu Luo wrote:
> > mipi_dsi_pixel_format_to_bpp return dst bpp not src bpp, dst bpp may
> > not be the uncompressed data size. use src bpc * 3 to get src bpp,
> > this aligns with pclk rate calculation.
> >
> > Fixes: ac47870fd795 ("drm/msm/dsi: fix hdisplay calculation when
> > programming dsi registers")
> > Signed-off-by: Pengyu Luo <[email protected]>
> > ---
> > drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Pengyu, what is your target platform?
>
SM8750, my device is lenovo legion y700 gen4, the display is a native
10-bit video mode panel.
Recently, in 10-bit input bpc/30-bit src bpp with 8-bit output
bpc/24-bit dst bpp mode, works well
on this device with some hacks to intf block. full 10-bit input and
output won't work for now.
Once I added this comment in ac47870fd795 ("drm/msm/dsi: fix hdisplay
calculation when programming dsi registers")
> DSI consumes an amount of compressed data equivalent to the uncompressed
> pixel depth per pclk.
This explanation is picked up from the downstream msm kernel, since
there is no public datasheet for the hardware.
And this should be the video mode case, cmd mode should consume 6
bytes. (It seems no explanation)
If we follow the downstream, then the uncompressed pixel depth per
pclk should be 3 * bits_per_component.
This is what this patch fixed.
About the test, I did it on the video mode panel, I have no cmd panel
device with dsc/widen bus enabled. And I overlooked something, I
thought
cmd panel didn't use hdisplay, then I removed the right value for the
cmd panel case, I fixed it in patch 2/2.
Best wishes,
Pengyu
> >
> > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c
> > b/drivers/gpu/drm/msm/dsi/dsi_host.c
> > index e8e83ee61e..7c16216e8b 100644
> > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> > @@ -1030,7 +1030,7 @@ static void dsi_timing_setup(struct msm_dsi_host
> > *msm_host, bool is_bonded_dsi)
> > */
> > h_total -= hdisplay;
> > if (wide_bus_enabled)
> > - bits_per_pclk =
> > mipi_dsi_pixel_format_to_bpp(msm_host->format);
> > + bits_per_pclk = dsc->bits_per_component * 3;
> > else
> > bits_per_pclk = 24;
> >
> > --
> > 2.53.0
> >
>
> --
> With best wishes
> Dmitry