Re: [PATCH] drm/msm/dsi: Restore widebus calculation for CMDMode panels

From: Pengyu Luo

Date: Fri Mar 20 2026 - 09:17:24 EST


On Fri, Mar 20, 2026 at 9:06 PM Dmitry Baryshkov
<dmitry.baryshkov@xxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Mar 20, 2026 at 07:26:22PM +0800, Pengyu Luo wrote:
> > On Fri, Mar 20, 2026 at 9:59 AM Dmitry Baryshkov
> > <dmitry.baryshkov@xxxxxxxxxxxxxxxx> wrote:
> > >
> > > On Thu, Mar 12, 2026 at 01:10:07PM +0800, Pengyu Luo wrote:
> > > > On Thu, Mar 12, 2026 at 6:31 AM Marijn Suijten
> > > > <marijn.suijten@xxxxxxxxxxxxxx> wrote:
> > > > >
> > > > > Commit ac47870fd795 ("drm/msm/dsi: fix hdisplay calculation when
> > > > > programming dsi registers") makes a false and ungrounded statement that
> > > > > "Since CMD mode does not use this, we can remove !(msm_host->mode_flags
> > > > > & MIPI_DSI_MODE_VIDEO) safely." which isn't the case at all.
> > > > > dsi_timing_setup() affects both command mode and video mode panels, and
> > > > > by no longer having any path that sets bits_per_pclk = 48 (contrary to
> > > > > the updated code-comment) all DSI DSC panels on SM8350 and above (i.e.
> > > > > with widebus support) regress thanks to this patch.
> > > > >
> > > > > The entire reason that video mode was originally omitted from this code
> > > > > path is because it was never tested before; any change that enables
> > > > > widebus for video mode panels should not regress the command mode path.
> > > > >
> > > > > Thus add back the path allows 6 bytes or 48 bits to be sent per pclk
> > > > > on command mode DSI panels with widebus, restoring the panel on devices
> > > > > like the Sony Xperia 1 III and upwards.
> > > > >
> > > > > Fixes: ac47870fd795 ("drm/msm/dsi: fix hdisplay calculation when programming dsi registers")
> > > > > Signed-off-by: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>
> > > > > ---
> > > >
> > > > Apologies, I messed up, I had sent the same fixes days ago.
> > > > https://lore.kernel.org/linux-arm-msm/20260307111250.105772-2-mitltlatltl@xxxxxxxxx/
> > > >
> > > > > In addition I can't say I understand the original commit message
> > > > > at all; it mentions a BPC=10 mode however the highest format that
> > > > > mipi_dsi_pixel_format_to_bpp supports is RGB888 thus it won't
> > > > > ever return anything above 24, which is the original amount the
> > > > > non-command-mode path defaulted to (regardless of widebus)... Was that
> > > > > patch doing anything for video mode at all?
> > > > >
> > > >
> > > > RGB888 is the dst bpc, which is tied to qcom,mdss-dsi-bpp in the downstream.
> > > >
> > > > Actually, we should use src bpc here, another fixe
> > > > https://lore.kernel.org/linux-arm-msm/20260307111250.105772-1-mitltlatltl@xxxxxxxxx/
> > >
> > > I'm really torn between your two patchsets here.
> > >
> > > Marijn, Pengyu, what are your testing platforms and are you testing
> > > video or command mode panels?
> > >
> >
> > SM8750, I am testing on a native 10-bit video mode panel.
>
> Is the framerate correct for you?
>

30, 60, 90, 120, 144, 165 work for me, in 24 dst bpp, 30 src bpp.

It failed to set pclk clk rate when I set 30 dst bpp, 30 src bpp, but
172992000 is right and works for 24 dst bpp, 30 src bpp.

Mar 20 20:46:00 qcom kernel: dsi_mgr_bridge_mode_set: set mode:
"1904x3040": 120 915552 1904 2180 2212 2244 3040 3066 3070 3400 0x48
0x0
Mar 20 20:46:00 qcom kernel: dsi_mgr_bridge_pre_enable: id=0
Mar 20 20:46:00 qcom kernel: dsi_mgr_bridge_power_on: id=0
Mar 20 20:46:00 qcom kernel: msm_dsi_host_reset_phy:
Mar 20 20:46:00 qcom kernel: msm_dsi_host_reset_phy:
Mar 20 20:46:00 qcom kernel: dsi_calc_pclk: pclk=172992000, bclk=108120000
Mar 20 20:46:00 qcom kernel: dsi_calc_pclk: pclk=172992000, bclk=108120000
Mar 20 20:46:00 qcom kernel: dsi_link_clk_set_rate_6g: Set clk rates:
pclk=172992000, byteclk=108120000
Mar 20 20:46:00 qcom kernel: dsi_link_clk_set_rate_6g: Failed to set
rate pixel clk, -22
Mar 20 20:46:00 qcom kernel: msm_dsi_host_power_on: failed to enable
link clocks. ret=-22
Mar 20 20:46:00 qcom kernel: dsi_mgr_bridge_power_on: power on host 0
failed, -22
Mar 20 20:46:00 qcom kernel: msm_dsi ae94000.dsi: Power on failed: -22

Best wishes,
Pengyu
> >
> > My thoughts are we should restore 6 for the cmd panel, and we should
> > fix video mode too.
> > As I mentioned, I overlooked something, I thought the cmd panel didn't
> > use the value, which
> > made the value for the cmd panel wrong. So we can restore it for the
> > cmd panel (though I can't say why 6).
>
> 2 (wide) x 24 (normal bus) / 8 (byte)
>
> --
> With best wishes
> Dmitry