build/patch/kernel/archive/sunxi-6.2/patches.megous/drm-rockchip-dw-mipi-dsi-Fix-data-rate-calculation.patch

30 lines
1.1 KiB
Diff

From 6c476c655329e39c0e012e659f9a28a748de0694 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Mon, 28 Nov 2022 10:12:50 +0100
Subject: [PATCH 298/391] drm: rockchip: dw-mipi-dsi: Fix data rate calculation
This results in selection of target_mbps=500 for Pinephone Pro
MIPI-DSI LCD, which fixes display corruption with that panel.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 7901c3bab..de384b30a 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -569,7 +569,7 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, const struct drm_display_mode *mode,
mpclk = DIV_ROUND_UP(mode->clock, MSEC_PER_SEC);
if (mpclk) {
/* take 1 / 0.8, since mbps must big than bandwidth of RGB */
- tmp = mpclk * (bpp / lanes) * 10 / 8;
+ tmp = mpclk * (bpp / lanes) * 10 / 9;
if (tmp < max_mbps)
target_mbps = tmp;
else
--
2.35.3