Skip to content

Commit a303f88

Browse files
right-0903gregkh
authored andcommitted
drm/msm/dsi: fix hdisplay calculation for CMD mode panel
[ Upstream commit 82159db ] Commit ac47870 ("drm/msm/dsi: fix hdisplay calculation when programming dsi registers") incorrecly broke hdisplay calculation for CMD mode by specifying incorrect number of bytes per transfer, fix it. Fixes: ac47870 ("drm/msm/dsi: fix hdisplay calculation when programming dsi registers") Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com> Patchwork: https://patchwork.freedesktop.org/patch/709917/ Link: https://lore.kernel.org/r/20260307111250.105772-2-mitltlatltl@gmail.com [DB: fixed commit message] Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent e82ef4e commit a303f88

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

drivers/gpu/drm/msm/dsi/dsi_host.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,8 +1034,9 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
10341034
/*
10351035
* DPU sends 3 bytes per pclk cycle to DSI. If widebus is
10361036
* enabled, MDP always sends out 48-bit compressed data per
1037-
* pclk and on average, DSI consumes an amount of compressed
1038-
* data equivalent to the uncompressed pixel depth per pclk.
1037+
* pclk and on average, for video mode, DSI consumes only an
1038+
* amount of compressed data equivalent to the uncompressed
1039+
* pixel depth per pclk.
10391040
*
10401041
* Calculate the number of pclks needed to transmit one line of
10411042
* the compressed data.
@@ -1047,10 +1048,14 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
10471048
* unused anyway.
10481049
*/
10491050
h_total -= hdisplay;
1050-
if (wide_bus_enabled)
1051-
bits_per_pclk = dsc->bits_per_component * 3;
1052-
else
1051+
if (wide_bus_enabled) {
1052+
if (msm_host->mode_flags & MIPI_DSI_MODE_VIDEO)
1053+
bits_per_pclk = dsc->bits_per_component * 3;
1054+
else
1055+
bits_per_pclk = 48;
1056+
} else {
10531057
bits_per_pclk = 24;
1058+
}
10541059

10551060
hdisplay = DIV_ROUND_UP(msm_dsc_get_bytes_per_line(msm_host->dsc) * 8, bits_per_pclk);
10561061

0 commit comments

Comments
 (0)