Skip to contentSkip to conversation

drm/amd/display: Restore 5s vbl offdelay for NV3x+ DGPUs

PATCH Superseded [email protected] 4 participants 7 messages Apr 22

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 drm/amd/display: Restore 5s vbl offdelay for NV3x+ DGPUs

From: Leo Li <[email protected]>

[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")
---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +15 -3
index 3fa4dbda4517c..ce5063928413c 100644
@@ -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/[email protected]/
+			 */
+			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.
Signature · 1 line
2.53.0
#1 lore raw
Quoted 7 lines · On 4/22/26 11:29, [email protected] wrote:

From: Leo Li <[email protected]>

[Why]

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

Quoted 6 lines

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.

Why would it be dGPU only though? I thought we have various reports of flip_done timeouts for APUs too.

Is your theory they're different root causes?

Quoted 39 lines
Fixes 9b47278cec98 ("drm/amd/display: temp w/a for dGPU to enter idle optimizations")
---
  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 18 +++++++++++++++---
  1 file changed, 15 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +15 -3
index 3fa4dbda4517c..ce5063928413c 100644
@@ -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/[email protected]/
+			 */
+			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 lore raw
In reply to [email protected]
Quoted 29 lines · On Wed, Apr 22, 2026 at 12:49 PM <[email protected]> wrote:

From: Leo Li <[email protected]>

[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")
---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 3fa4dbda4517c..ce5063928413c 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void manage_dm_interrupts(struct amdgpu_device *adev, · line 9516

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -3
@@ -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)) {

Why only dGPUs? Seems like this is reported as least as often on APUs if not more.

Alex

Quoted 18 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +12 -1
+                       /*
+                        * 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/[email protected]/
+                        */
+                       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

author maintainer
#3 lore raw
Quoted 43 lines · Alex Deucher
Quoted 29 lines · On Wed, Apr 22, 2026 at 12:49 PM <[email protected]> wrote:

From: Leo Li <[email protected]>

[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")
---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 3fa4dbda4517c..ce5063928413c 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void manage_dm_interrupts(struct amdgpu_device *adev, · line 9516

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -3
@@ -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)) {

Why only dGPUs? Seems like this is reported as least as often on APUs if not more.

Quoted 1 line

Alex

Hi Alex, Mario,

At least in the case of the few reporters I was working with, this specific flip-done timeout was reproduced on NV3x and 4x systems running multi-display. The reporter for the linked gitlab issue was also running a nv3.

The cause of these flip timeouts can be varied. The signature for this particular issue was OTG failing to fire an interrupt that is expected to deliver the flip-done event. I'm not aware of this particular signature in APUs -- at least none on my radar. Do bring it to my attention if you're aware of them.

Thanks,
Leo

Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +12 -1
+                       /*
+                        * 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/[email protected]/
+                        */
+                       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

#4 lore raw
Quoted 54 lines · Leo Li
Quoted 43 lines · Alex Deucher
Quoted 29 lines · On Wed, Apr 22, 2026 at 12:49 PM <[email protected]> wrote:

From: Leo Li <[email protected]>

[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")
---
  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c  | 18 +++++++++++++++---
  1 file changed, 15 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 3fa4dbda4517c..ce5063928413c 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void manage_dm_interrupts(struct amdgpu_device *adev, · line 9516

Quoted 9 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -3
@@ -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)) {

Why only dGPUs? Seems like this is reported as least as often on APUs if not more.

Quoted 1 line

Alex

Hi Alex, Mario,

At least in the case of the few reporters I was working with, this specific flip-done timeout was reproduced on NV3x and 4x systems running multi-display. The reporter for the linked gitlab issue was also running a nv3.

Quoted 8 lines

The cause of these flip timeouts can be varied. The signature for this particular issue was OTG failing to fire an interrupt that is expected to deliver the flip-done event. I'm not aware of this particular signature in APUs -- at least none on my radar. Do bring it to my attention if you're aware of them.

Thanks,
Leo

In Michele's proposal (https://lore.kernel.org/amd-gfx/[email protected]/) there was a mention that it was tested on DCN 3.5 too, which made me think that the exact same issue was on both.

Michele - can you readily reproduce the page flip timeout on DCN 3.5?

If so; could you modify Leo's patch to drop the IS_APU designation and see if it happens to be the same solution?

Quoted 21 lines
Quoted 20 lines
Quoted 20 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +12 -1
+                       /*
+                        * 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/[email protected]/
+                        */
+                       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

#5 lore raw
Quoted 33 lines · Mario Limonciello

In Michele's proposal (https://lore.kernel.org/amd- gfx/[email protected]/) there was a mention that it was tested on DCN 3.5 too, which made me think that the exact same issue was on both.

Michele - can you readily reproduce the page flip timeout on DCN 3.5?

If so; could you modify Leo's patch to drop the IS_APU designation and see if it happens to be the same solution?

Quoted 25 lines
Quoted 24 lines
Quoted 24 lines

+                       /*
+                        * 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/[email protected]/
+                        */
+                       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.

Signature · 1 line
2.53.0

Hi Mario, i had tested my proposed patch on multiple APUs in order to exclude regressions or side effects, but personally i only ever encountered this particular issue on dGPUs, specifically a 7900 GRE first and a 9070XT later.

Reviewed-by
#6 lore raw
Quoted 35 lines · Michele Palazzi
Quoted 33 lines · Mario Limonciello

In Michele's proposal (https://lore.kernel.org/amd- gfx/[email protected]/) there was a mention that it was tested on DCN 3.5 too, which made me think that the exact same issue was on both.

Michele - can you readily reproduce the page flip timeout on DCN 3.5?

If so; could you modify Leo's patch to drop the IS_APU designation and see if it happens to be the same solution?

Quoted 25 lines
Quoted 24 lines
Quoted 24 lines

+                       /*
+                        * 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/[email protected]/
+                        */
+                       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.

Signature · 1 line
2.53.0
Quoted 2 lines

Hi Mario, i had tested my proposed patch on multiple APUs in order to exclude regressions or side effects, but personally i only ever encountered this particular issue on dGPUs, specifically a 7900 GRE first and a 9070XT later.

Got it - thanks for clarifying and reaffirming Leo's assertion was correct on root cause.