pmaports/main/linux-postmarketos-allwinner/0012-drm-sun4i-Fix-mipi-dsi-panel-framerate-being-2-3-of-.patch
Bhushan Shah 5efdbd13fa
main/linux-postmarketos-allwinner: fix display framerate on pinephone (MR 1661)
This patches from the megi solves the issue of the MIPI-DSI panels
framerate being at 2/3rd of actual or expected rate.

[ci:skip-build]: already built successfully in CI
2020-10-30 00:30:38 -07:00

36 lines
1.1 KiB
Diff

From 29533cb13f24e26e7ddbc044597a3020437352e2 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megous@megous.com>
Date: Thu, 29 Oct 2020 01:13:49 +0100
Subject: [PATCH 1/2] drm/sun4i: Fix mipi-dsi panel framerate being 2/3 of the
expected value
This happens on Pinephone and on Pinetab. Both use MIPI-DSI panels.
On Pinephone framerate is 36.6 instead of expected 55.
On Pinetab the similar 2/3 ratio holds.
Myabe there's a bug in BSP and dclk_div should really be 6 instead of 4.
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index ab06f5e1fc952..1c56b4fb9ac89 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -398,8 +398,8 @@ static void sun4i_tcon0_mode_set_cpu(struct sun4i_tcon *tcon,
u32 block_space, start_delay;
u32 tcon_div;
- tcon->dclk_min_div = SUN6I_DSI_TCON_DIV;
- tcon->dclk_max_div = SUN6I_DSI_TCON_DIV;
+ tcon->dclk_min_div = 6;
+ tcon->dclk_max_div = 6;
sun4i_tcon0_mode_set_common(tcon, mode);
--
2.29.1