drm/mediatek: dsi: Fine tune the line time caused by EOTp
authorJitao Shi <jitao.shi@mediatek.com>
Mon, 1 Feb 2021 03:36:03 +0000 (11:36 +0800)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Thu, 11 Mar 2021 11:57:15 +0000 (19:57 +0800)
Enabling EoTp will make the line time larger, so the hfp and
hbp should be reduced to keep line time.

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_dsi.c

index b91d7c3dd9ac3afc5dc5f2b5022989281bf5e56d..1c6e612f7eefcc199fca1c5ab0bd3badee219415 100644 (file)
@@ -481,6 +481,7 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
                          timing->da_hs_zero + timing->da_hs_exit + 3;
 
        delta = dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST ? 18 : 12;
+       delta += dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET ? 2 : 0;
 
        horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;
        horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte;