commit:     e262b657baff6fa7532b7b315fc710cad79c8ff4
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Thu May 29 17:28:32 2025 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Thu May 29 17:28:32 2025 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=e262b657

Revert "drm/amd/display: more liberal vmin/vmax update for freesync"

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 0000_README                                  |  4 +++
 2700_amd-revert-vmin-vmax-for-freesync.patch | 48 ++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/0000_README b/0000_README
index a644f9dd..c605f246 100644
--- a/0000_README
+++ b/0000_README
@@ -102,6 +102,10 @@ Patch:  
2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
 From:   
https://lore.kernel.org/linux-bluetooth/[email protected]/raw
 Desc:   Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. 
See bug #686758
 
+Patch:  2700_amd-revert-vmin-vmax-for-freesync.patch
+From:   
https://github.com/archlinux/linux/commit/30dd9945fd79d33a049da4e52984c9bc07450de2.patch
+Desc:   Revert "drm/amd/display: more liberal vmin/vmax update for freesync"
+
 Patch:  2901_permit-menuconfig-sorting.patch
 From:   https://lore.kernel.org/
 Desc:   menuconfig: Allow sorting the entries alphabetically

diff --git a/2700_amd-revert-vmin-vmax-for-freesync.patch 
b/2700_amd-revert-vmin-vmax-for-freesync.patch
new file mode 100644
index 00000000..b0b80885
--- /dev/null
+++ b/2700_amd-revert-vmin-vmax-for-freesync.patch
@@ -0,0 +1,48 @@
+From 30dd9945fd79d33a049da4e52984c9bc07450de2 Mon Sep 17 00:00:00 2001
+From: Aurabindo Pillai <[email protected]>
+Date: Wed, 21 May 2025 16:10:57 -0400
+Subject: [PATCH] Revert "drm/amd/display: more liberal vmin/vmax update for
+ freesync"
+
+This reverts commit 219898d29c438d8ec34a5560fac4ea8f6b8d4f20 since it
+causes regressions on certain configs. Revert until the issue can be
+isolated and debugged.
+
+Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4238
+Signed-off-by: Aurabindo Pillai <[email protected]>
+Cherry-picked-for: 
https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/139
+---
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c    | 16 +++++-----------
+ 1 file changed, 5 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+index 2dbd71fbae28a5..e4f0517f0f2b23 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -668,21 +668,15 @@ static void dm_crtc_high_irq(void *interrupt_params)
+       spin_lock_irqsave(&adev_to_drm(adev)->event_lock, flags);
+ 
+       if (acrtc->dm_irq_params.stream &&
+-              acrtc->dm_irq_params.vrr_params.supported) {
+-              bool replay_en = 
acrtc->dm_irq_params.stream->link->replay_settings.replay_feature_enabled;
+-              bool psr_en = 
acrtc->dm_irq_params.stream->link->psr_settings.psr_feature_enabled;
+-              bool fs_active_var_en = 
acrtc->dm_irq_params.freesync_config.state == VRR_STATE_ACTIVE_VARIABLE;
+-
++          acrtc->dm_irq_params.vrr_params.supported &&
++          acrtc->dm_irq_params.freesync_config.state ==
++                  VRR_STATE_ACTIVE_VARIABLE) {
+               mod_freesync_handle_v_update(adev->dm.freesync_module,
+                                            acrtc->dm_irq_params.stream,
+                                            &acrtc->dm_irq_params.vrr_params);
+ 
+-              /* update vmin_vmax only if freesync is enabled, or only if PSR 
and REPLAY are disabled */
+-              if (fs_active_var_en || (!fs_active_var_en && !replay_en && 
!psr_en)) {
+-                      dc_stream_adjust_vmin_vmax(adev->dm.dc,
+-                                      acrtc->dm_irq_params.stream,
+-                                      
&acrtc->dm_irq_params.vrr_params.adjust);
+-              }
++              dc_stream_adjust_vmin_vmax(adev->dm.dc, 
acrtc->dm_irq_params.stream,
++                                         
&acrtc->dm_irq_params.vrr_params.adjust);
+       }
+ 
+       /*

Reply via email to