]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Apr 2020 07:20:42 +0000 (09:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Apr 2020 07:20:42 +0000 (09:20 +0200)
added patches:
drm-amd-powerplay-force-the-trim-of-the-mclk-dpm_levels-if-od-is-enabled.patch

queue-4.19/drm-amd-powerplay-force-the-trim-of-the-mclk-dpm_levels-if-od-is-enabled.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/drm-amd-powerplay-force-the-trim-of-the-mclk-dpm_levels-if-od-is-enabled.patch b/queue-4.19/drm-amd-powerplay-force-the-trim-of-the-mclk-dpm_levels-if-od-is-enabled.patch
new file mode 100644 (file)
index 0000000..9c86c66
--- /dev/null
@@ -0,0 +1,41 @@
+From 8c7f0a44b4b4ef16df8f44fbaee6d1f5d1593c83 Mon Sep 17 00:00:00 2001
+From: Sergei Lopatin <magist3r@gmail.com>
+Date: Wed, 26 Jun 2019 14:56:59 +0500
+Subject: drm/amd/powerplay: force the trim of the mclk dpm_levels if OD is enabled
+
+From: Sergei Lopatin <magist3r@gmail.com>
+
+commit 8c7f0a44b4b4ef16df8f44fbaee6d1f5d1593c83 upstream.
+
+Should prevent flicker if PP_OVERDRIVE_MASK is set.
+
+bug: https://bugs.freedesktop.org/show_bug.cgi?id=102646
+bug: https://bugs.freedesktop.org/show_bug.cgi?id=108941
+bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1088
+bug: https://gitlab.freedesktop.org/drm/amd/-/issues/628
+
+Signed-off-by: Sergei Lopatin <magist3r@gmail.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+@@ -3788,9 +3788,12 @@ static int smu7_trim_single_dpm_states(s
+ {
+       uint32_t i;
++      /* force the trim if mclk_switching is disabled to prevent flicker */
++      bool force_trim = (low_limit == high_limit);
+       for (i = 0; i < dpm_table->count; i++) {
+       /*skip the trim if od is enabled*/
+-              if (!hwmgr->od_enabled && (dpm_table->dpm_levels[i].value < low_limit
++              if ((!hwmgr->od_enabled || force_trim)
++                      && (dpm_table->dpm_levels[i].value < low_limit
+                       || dpm_table->dpm_levels[i].value > high_limit))
+                       dpm_table->dpm_levels[i].enabled = false;
+               else
index aea2253d063f074ec757357219152bd4cfdc4d9c..6e0ec236fbd3404ae734f79cbc9404ac848660bd 100644 (file)
@@ -24,3 +24,4 @@ btrfs-check-commit-root-generation-in-should_ignore_root.patch
 mac80211_hwsim-use-kstrndup-in-place-of-kasprintf.patch
 usb-dwc3-gadget-don-t-enable-interrupt-when-disablin.patch
 usb-dwc3-gadget-don-t-clear-flags-before-transfer-en.patch
+drm-amd-powerplay-force-the-trim-of-the-mclk-dpm_levels-if-od-is-enabled.patch