Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-06-14 12:00:06 +0200
committerTakashi Iwai <tiwai@suse.de>2019-06-14 12:00:08 +0200
commita50c7d917f9b70cc7cf8c9c3bfd4e0585b927c61 (patch)
treebd3f1b5796d8dc096005fd97ce191e32a870dbef
parent2c93ce9f253ab9870654acbc05e6cc05b83fc615 (diff)
drm/radeon: prefer lower reference dividers (bsc#1051510).
-rw-r--r--patches.drm/drm-radeon-prefer-lower-reference-dividers.patch48
-rw-r--r--series.conf1
2 files changed, 49 insertions, 0 deletions
diff --git a/patches.drm/drm-radeon-prefer-lower-reference-dividers.patch b/patches.drm/drm-radeon-prefer-lower-reference-dividers.patch
new file mode 100644
index 0000000000..f108f51437
--- /dev/null
+++ b/patches.drm/drm-radeon-prefer-lower-reference-dividers.patch
@@ -0,0 +1,48 @@
+From 2e26ccb119bde03584be53406bbd22e711b0d6e6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Mon, 6 May 2019 19:57:52 +0200
+Subject: [PATCH] drm/radeon: prefer lower reference dividers
+Mime-version: 1.0
+Content-type: text/plain; charset=UTF-8
+Content-transfer-encoding: 8bit
+Git-commit: 2e26ccb119bde03584be53406bbd22e711b0d6e6
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+Instead of the closest reference divider prefer the lowest,
+this fixes flickering issues on HP Compaq nx9420.
+
+Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=108514
+Suggested-by: Paul Dufresne <dufresnep@gmail.com>
+Signed-off-by: Christian K├Ânig <christian.koenig@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/radeon/radeon_display.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
+index aa898c699101..433df7036f96 100644
+--- a/drivers/gpu/drm/radeon/radeon_display.c
++++ b/drivers/gpu/drm/radeon/radeon_display.c
+@@ -922,12 +922,12 @@ static void avivo_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div,
+ ref_div_max = max(min(100 / post_div, ref_div_max), 1u);
+
+ /* get matching reference and feedback divider */
+- *ref_div = min(max(DIV_ROUND_CLOSEST(den, post_div), 1u), ref_div_max);
++ *ref_div = min(max(den/post_div, 1u), ref_div_max);
+ *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den);
+
+ /* limit fb divider to its maximum */
+ if (*fb_div > fb_div_max) {
+- *ref_div = DIV_ROUND_CLOSEST(*ref_div * fb_div_max, *fb_div);
++ *ref_div = (*ref_div * fb_div_max)/(*fb_div);
+ *fb_div = fb_div_max;
+ }
+ }
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index f82a990e7b..076f1228f8 100644
--- a/series.conf
+++ b/series.conf
@@ -22344,6 +22344,7 @@
patches.fixes/0001-xenbus-drop-useless-LIST_HEAD-in-xenbus_write_watch-.patch
patches.drivers/power-supply-axp288_charger-Fix-unchecked-return-val.patch
patches.drivers/power-supply-axp20x_usb_power-Fix-typo-in-VBUS-curre.patch
+ patches.drm/drm-radeon-prefer-lower-reference-dividers.patch
patches.drm/drm-i915-fbc-disable-framebuffer-compression-on-Gemi.patch
patches.drm/drm-bridge-adv7511-Fix-low-refresh-rate-selection.patch
patches.drivers/thermal-cpu_cooling-Actually-trace-CPU-load-in-therm.patch