Re: [PATCH v3 4/4] drm/msm/dpu: fix video mode DSC INTF timing width calculation

From: Jonathan Marek

Date: Thu Mar 19 2026 - 15:03:34 EST


On 3/19/26 1:31 PM, Alexander Koskovich wrote:
On Thursday, March 19th, 2026 at 1:23 PM, Jonathan Marek <jonathan@xxxxxxxx> wrote:

...>>
The hdisplay calculation in dsi_adjust_pclk_for_compression (which only
affects the clock rate) seems to be wrong, and I think Alexander's panel
must be running at a 20% lower clock because of it. dsi_timing_setup has
the right hdisplay adjustment.

Checked against downstream and the clocks seem to match more or less:

downstream:
pclk: 110070156
byte: 103190771

upstream:
pclk: 110073457
byte: 103193865

I was curious about this and looked into it a bit (without testing any HW):

- using MIPI_DSI_FMT_RGB101010 dsi_byte_clk_get_rate cancels the effect of adjusting with bits_per_component for the byte clk, so the byte clock ends up being right
- using DST_FORMAT_RGB101010 DSI pclk is in 30-bit units instead of 24-bit units, so the pclk ends up being right too (but that only works if widebus is enabled)

a recent commit (ac47870fd795) changed the hdisplay calculation in dsi_timing_setup to match that in dsi_adjust_pclk_for_compression, but only when widebus is enabled.

So things work out if widebus is enabled and MIPI_DSI_FMT_RGB101010 is used (note: looks like the only upstream 10-bit panel uses MIPI_DSI_FMT_RGB888), otherwise its broken.

AFAICT if you revert ac47870fd795, use MIPI_DSI_FMT_RGB888, and change dsi_adjust_pclk_for_compression to divide by 24 instead of 30, then it should also work (and won't be dependent on widebus).