Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/dsi: fix hdisplay calculation for CMD mode panel

Commit ac47870fd795 ("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: ac47870fd795 ("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>

authored by

Pengyu Luo and committed by
Dmitry Baryshkov
82159db4 2d51cfb7

+10 -5
+10 -5
drivers/gpu/drm/msm/dsi/dsi_host.c
··· 1034 1034 /* 1035 1035 * DPU sends 3 bytes per pclk cycle to DSI. If widebus is 1036 1036 * 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. 1039 1040 * 1040 1041 * Calculate the number of pclks needed to transmit one line of 1041 1042 * the compressed data. ··· 1048 1047 * unused anyway. 1049 1048 */ 1050 1049 h_total -= hdisplay; 1051 - if (wide_bus_enabled) 1052 - bits_per_pclk = dsc->bits_per_component * 3; 1053 - else 1050 + if (wide_bus_enabled) { 1051 + if (msm_host->mode_flags & MIPI_DSI_MODE_VIDEO) 1052 + bits_per_pclk = dsc->bits_per_component * 3; 1053 + else 1054 + bits_per_pclk = 48; 1055 + } else { 1054 1056 bits_per_pclk = 24; 1057 + } 1055 1058 1056 1059 hdisplay = DIV_ROUND_UP(msm_dsc_get_bytes_per_line(msm_host->dsc) * 8, bits_per_pclk); 1057 1060