Home Home > GIT Browse > SLE12-SP3
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-05-20 09:52:32 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2019-05-20 10:09:39 +0200
commit2323b0c0ee52796567ba610251f5d6ecef89b587 (patch)
tree36c4b869cb81505305a0b5975b6dc8f5e23f24b4
parent2aebdc3c438590c904d876cd6f8dfab3c5dd42b2 (diff)
drm/bridge: adv7511: Fix low refresh rate selection (bsc#1106929)SLE12-SP3
-rw-r--r--patches.fixes/0003-drm-bridge-adv7511-Fix-low-refresh-rate-selection.patch45
-rw-r--r--series.conf1
2 files changed, 46 insertions, 0 deletions
diff --git a/patches.fixes/0003-drm-bridge-adv7511-Fix-low-refresh-rate-selection.patch b/patches.fixes/0003-drm-bridge-adv7511-Fix-low-refresh-rate-selection.patch
new file mode 100644
index 0000000000..a432353486
--- /dev/null
+++ b/patches.fixes/0003-drm-bridge-adv7511-Fix-low-refresh-rate-selection.patch
@@ -0,0 +1,45 @@
+From 67793bd3b3948dc8c8384b6430e036a30a0ecb43 Mon Sep 17 00:00:00 2001
+From: Matt Redfearn <matt.redfearn@thinci.com>
+Date: Wed, 24 Apr 2019 13:22:27 +0000
+Subject: drm/bridge: adv7511: Fix low refresh rate selection
+Git-commit: 67793bd3b3948dc8c8384b6430e036a30a0ecb43
+Patch-mainline: v5.2-rc1
+References: bsc#1106929
+
+The driver currently sets register 0xfb (Low Refresh Rate) based on the
+value of mode->vrefresh. Firstly, this field is specified to be in Hz,
+but the magic numbers used by the code are Hz * 1000. This essentially
+leads to the low refresh rate always being set to 0x01, since the
+vrefresh value will always be less than 24000. Fix the magic numbers to
+be in Hz.
+Secondly, according to the comment in drm_modes.h, the field is not
+supposed to be used in a functional way anyway. Instead, use the helper
+function drm_mode_vrefresh().
+
+Fixes: 9c8af882bf12 ("drm: Add adv7511 encoder driver")
+Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+Signed-off-by: Matt Redfearn <matt.redfearn@thinci.com>
+Signed-off-by: Sean Paul <seanpaul@chromium.org>
+Link: https://patchwork.freedesktop.org/patch/msgid/20190424132210.26338-1-matt.redfearn@thinci.com
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ drivers/gpu/drm/i2c/adv7511.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/i2c/adv7511.c
++++ b/drivers/gpu/drm/i2c/adv7511.c
+@@ -781,11 +781,11 @@ static void adv7511_encoder_mode_set(str
+ vsync_polarity = 1;
+ }
+
+- if (mode->vrefresh <= 24000)
++ if (drm_mode_vrefresh(mode) <= 24)
+ low_refresh_rate = ADV7511_LOW_REFRESH_RATE_24HZ;
+- else if (mode->vrefresh <= 25000)
++ else if (drm_mode_vrefresh(mode) <= 25)
+ low_refresh_rate = ADV7511_LOW_REFRESH_RATE_25HZ;
+- else if (mode->vrefresh <= 30000)
++ else if (drm_mode_vrefresh(mode) <= 30)
+ low_refresh_rate = ADV7511_LOW_REFRESH_RATE_30HZ;
+ else
+ low_refresh_rate = ADV7511_LOW_REFRESH_RATE_NONE;
diff --git a/series.conf b/series.conf
index a4c08219aa..2e70922a51 100644
--- a/series.conf
+++ b/series.conf
@@ -25372,6 +25372,7 @@
patches.arch/x86-speculation-mds-print-smt-vulnerable-on-msbds-with-mitigations-off.patch
patches.arch/x86-speculation-mds-add-mitigations-support-for-mds.patch
patches.fixes/0001-backlight-lm3630a-Return-0-on-success-in-update_stat.patch
+ patches.fixes/0003-drm-bridge-adv7511-Fix-low-refresh-rate-selection.patch
# out-of-tree patches
patches.kabi/0001-move-power_up_on_resume-flag-to-end-of-structure-for.patch