Skip to content

Commit 42ef932

Browse files
Chun-Kuang Hugregkh
authored andcommitted
Revert "drm/mediatek: dsi: Correct calculation formula of PHY Timing"
commit d085557 upstream. This reverts commit 417d8c4. With that patch the panel in the Tentacruel ASUS Chromebook CM14 (CM1402F) flickers. There are 1 or 2 times per second a black panel. Stable Kernel 6.11.5 and mainline 6.12-rc4 works only when reverse that patch. Fixes: 417d8c4 ("drm/mediatek: dsi: Correct calculation formula of PHY Timing") Cc: [email protected] Cc: Shuijing Li <[email protected]> Reported-by: Jens Ziller <[email protected]> Closes: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 25adbb0 commit 42ef932

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

drivers/gpu/drm/mediatek/mtk_dsi.c

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -248,23 +248,22 @@ static void mtk_dsi_phy_timconfig(struct mtk_dsi *dsi)
248248
u32 data_rate_mhz = DIV_ROUND_UP(dsi->data_rate, HZ_PER_MHZ);
249249
struct mtk_phy_timing *timing = &dsi->phy_timing;
250250

251-
timing->lpx = (80 * data_rate_mhz / (8 * 1000)) + 1;
252-
timing->da_hs_prepare = (59 * data_rate_mhz + 4 * 1000) / 8000 + 1;
253-
timing->da_hs_zero = (163 * data_rate_mhz + 11 * 1000) / 8000 + 1 -
251+
timing->lpx = (60 * data_rate_mhz / (8 * 1000)) + 1;
252+
timing->da_hs_prepare = (80 * data_rate_mhz + 4 * 1000) / 8000;
253+
timing->da_hs_zero = (170 * data_rate_mhz + 10 * 1000) / 8000 + 1 -
254254
timing->da_hs_prepare;
255-
timing->da_hs_trail = (78 * data_rate_mhz + 7 * 1000) / 8000 + 1;
256-
257-
timing->ta_go = 4 * timing->lpx;
258-
timing->ta_sure = 3 * timing->lpx / 2;
259-
timing->ta_get = 5 * timing->lpx;
260-
timing->da_hs_exit = (118 * data_rate_mhz / (8 * 1000)) + 1;
261-
262-
timing->clk_hs_prepare = (57 * data_rate_mhz / (8 * 1000)) + 1;
263-
timing->clk_hs_post = (65 * data_rate_mhz + 53 * 1000) / 8000 + 1;
264-
timing->clk_hs_trail = (78 * data_rate_mhz + 7 * 1000) / 8000 + 1;
265-
timing->clk_hs_zero = (330 * data_rate_mhz / (8 * 1000)) + 1 -
266-
timing->clk_hs_prepare;
267-
timing->clk_hs_exit = (118 * data_rate_mhz / (8 * 1000)) + 1;
255+
timing->da_hs_trail = timing->da_hs_prepare + 1;
256+
257+
timing->ta_go = 4 * timing->lpx - 2;
258+
timing->ta_sure = timing->lpx + 2;
259+
timing->ta_get = 4 * timing->lpx;
260+
timing->da_hs_exit = 2 * timing->lpx + 1;
261+
262+
timing->clk_hs_prepare = 70 * data_rate_mhz / (8 * 1000);
263+
timing->clk_hs_post = timing->clk_hs_prepare + 8;
264+
timing->clk_hs_trail = timing->clk_hs_prepare;
265+
timing->clk_hs_zero = timing->clk_hs_trail * 4;
266+
timing->clk_hs_exit = 2 * timing->clk_hs_trail;
268267

269268
timcon0 = FIELD_PREP(LPX, timing->lpx) |
270269
FIELD_PREP(HS_PREP, timing->da_hs_prepare) |

0 commit comments

Comments
 (0)