gjdwebserver-overlay/sys-kernel/pinephone-pro-sources/files/0007-drm-dw-mipi-dsi-rockchip-Never-allow-lane-bandwidth-.patch
Gerben Jan Dijkman 4b1427b69b Changed ebuild
2022-01-15 02:12:55 +01:00

29 lines
1.0 KiB
Diff

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;