]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/mediatek: dsi: Fix scrolling of panel with small hfp or hbp
authorJitao Shi <jitao.shi@mediatek.com>
Mon, 17 Aug 2020 13:06:40 +0000 (21:06 +0800)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Wed, 26 Aug 2020 22:49:02 +0000 (06:49 +0800)
horizontal_backporch_byte should be hbp * bpp - hbp extra bytes.
So remove the wrong subtraction 10.

Fixes: 9b3201c4e5a1 ("drm/mediatek: change the dsi phytiming calculate method")
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 16fd99dcdacf8316ba598600c43578ae7120d42b..80b7a082e87404837272c42e1d965467aaa99235 100644 (file)
@@ -466,14 +466,13 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi *dsi)
        horizontal_sync_active_byte = (vm->hsync_len * dsi_tmp_buf_bpp - 10);
 
        if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE)
-               horizontal_backporch_byte =
-                       (vm->hback_porch * dsi_tmp_buf_bpp - 10);
+               horizontal_backporch_byte = vm->hback_porch * dsi_tmp_buf_bpp;
        else
-               horizontal_backporch_byte = ((vm->hback_porch + vm->hsync_len) *
-                       dsi_tmp_buf_bpp - 10);
+               horizontal_backporch_byte = (vm->hback_porch + vm->hsync_len) *
+                                           dsi_tmp_buf_bpp;
 
        data_phy_cycles = timing->lpx + timing->da_hs_prepare +
-                         timing->da_hs_zero + timing->da_hs_exit + 3;
+                         timing->da_hs_zero + timing->da_hs_exit;
 
        if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
                if ((vm->hfront_porch + vm->hback_porch) * dsi_tmp_buf_bpp >