gjdwebserver-overlay/sys-kernel/pinephone-sources/files/0008-drm-dw-mipi-dsi-rockchip-Never-allow-lane-bandwidth-.patch

29 lines
1.0 KiB
Diff
Raw Normal View History

2022-01-11 10:08:21 +01:00
From: Ondrej Jirman <megous@megous.com>
Date: Tue, 16 Nov 2021 21:16:26 +0100
Subject: [PATCH 07/36] drm: dw-mipi-dsi-rockchip: Never allow lane bandwidth
to be less than requested
Bandwidth can be less than requested in some cases, because the search
for best values only checked for absolute difference from ideal value.
This is likely not intentional.
Signed-off-by: Ondrej Jirman <megous@megous.com>
---
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 095d0f1..bd488a8 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -612,7 +612,7 @@ dw_mipi_dsi_get_lane_mbps(void *priv_data, const struct drm_display_mode *mode,
continue;
delta = abs(fout - tmp);
- if (delta < min_delta) {
+ if (delta < min_delta && fout < tmp) {
best_prediv = _prediv;
best_fbdiv = _fbdiv;
min_delta = delta;