public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Restore 5s vbl offdelay for NV3x+ DGPUs
@ 2026-04-22 16:29 sunpeng.li
  2026-04-22 16:42 ` Mario Limonciello
  2026-04-22 16:56 ` Alex Deucher
  0 siblings, 2 replies; 7+ messages in thread
From: sunpeng.li @ 2026-04-22 16:29 UTC (permalink / raw)
  To: amd-gfx
  Cc: Harry.Wentland, Aurabindo.Pillai, mario.limonciello, wiagn233,
	sysdadmin, stable, Leo Li

From: Leo Li <sunpeng.li@amd.com>

[Why]

Rapid vblank off is causing flip-done timeouts for NV3x and newer
family of GPUs that support more idle optimization features.

A proper fix requires further investigation. In lieu of it, let's
workaround it for now.

[How]

For NV3x and newer family of DGPUs, restore the old 5s vblank off timer.

Fixes: 9b47278cec98 ("drm/amd/display: temp w/a for dGPU to enter idle optimizations")
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3787
Link: https://lore.kernel.org/amd-gfx/20260217191632.1243826-1-sysdadmin@m1k.cloud/
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Tested-by: Michele Palazzi <sysdadmin@m1k.cloud>
---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 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 3fa4dbda4517c..ce5063928413c 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -9511,9 +9511,21 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
 	if (acrtc_state) {
 		timing = &acrtc_state->stream->timing;
 
-		if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
-			   IP_VERSION(3, 5, 0) ||
-			   !(adev->flags & AMD_IS_APU)) {
+		if (amdgpu_ip_version(adev, DCE_HWIP, 0) >=
+		      IP_VERSION(3, 2, 0) &&
+		      !(adev->flags & AMD_IS_APU)) {
+			/*
+			 * DGPUs NV3x and newer that support idle optimizations
+			 * experience intermittent flip-done timeouts on cursor
+			 * updates. Restore 5s offdelay behavior for now.
+			 *
+			 * Discussion on the issue:
+			 * https://lore.kernel.org/amd-gfx/20260217191632.1243826-1-sysdadmin@m1k.cloud/
+			 */
+			config.offdelay_ms = 5000;
+			config.disable_immediate = false;
+		} else if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
+			     IP_VERSION(3, 5, 0)) {
 			/*
 			 * Older HW and DGPU have issues with instant off;
 			 * use a 2 frame offdelay.
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-04-22 17:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22 16:29 [PATCH] drm/amd/display: Restore 5s vbl offdelay for NV3x+ DGPUs sunpeng.li
2026-04-22 16:42 ` Mario Limonciello
2026-04-22 16:56 ` Alex Deucher
2026-04-22 17:19   ` Leo Li
2026-04-22 17:42     ` Mario Limonciello
2026-04-22 17:50       ` Michele Palazzi
2026-04-22 17:52         ` Mario Limonciello

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox