]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Restore 5s vbl offdelay for NV3x+ DGPUs
authorLeo Li <sunpeng.li@amd.com>
Wed, 22 Apr 2026 16:29:56 +0000 (12:29 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Apr 2026 14:40:44 +0000 (10:40 -0400)
[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/
Tested-by: Michele Palazzi <sysdadmin@m1k.cloud>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit df482c2d441b090161633566b7a0755f1bbd55c2)

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index f8f9953565f6d26677ea755dac77b082e819d090..5fc5d56085066bd1d48425ddeb36626898811380 100644 (file)
@@ -9408,9 +9408,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.