Skip to contentSkip to conversation

DC: Fix page flip timeouts on DCE 6 (v2)

PATCH In review Timur Kristóf 3 participants 10 messages Aug 25, 2025 – Sep 15, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover DC: Fix page flip timeouts on DCE 6 (v2)

Compared to the previous version of this series, v2 fixes the rebase conflicts on amd-staging-drm-next and includes an additional patch to address page flip timeouts when the displays are blanked.

Currently when using DC on DCE 6, it produces pageflip timeouts:

1. When displays are blanked
This is caused by (mistakenly) turning off the display engine clock on DCE 6.0 and 6.4 which is also the DP clock.

2. After suspend/resume
The root cause is that DC assumes that the VUPDATE interrupt is always present, when in fact it isn't supported by DCE 6, which also doesn't support VRR.

Finally, there is also a patch to disable fast boot mode on DCE 6. The rationale is that this already didn't work on DCE 8, and even if it did I have no means to test it.

Timur Kristóf (4):
drm/amd/display: Keep PLL0 running on DCE 6.0 and 6.4 (v2) drm/amd/display: Disable fastboot on DCE 6 too drm/amd/display: Disable VRR on DCE 6 drm/amd/display: Don't use non-registered VUPDATE on DCE 6 (v2)

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 26 ++++++++++++-------
 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 +++++++-----
 drivers/gpu/drm/amd/display/dc/dc_helper.c    |  5 ++++
 drivers/gpu/drm/amd/display/dc/dm_services.h  |  2 ++
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c |  6 ++---
 .../dc/resource/dce60/dce60_resource.c        | 11 +++++++-
 6 files changed, 46 insertions(+), 20 deletions(-)
Signature · 1 line
2.50.1
#1 lore raw

PATCH 1/4 drm/amd/display: Keep PLL0 running on DCE 6.0 and 6.4 (v2)

DC can turn off the display clock when no displays are connected or when all displays are off, for reference see:
- dce*_validate_bandwidth

DC also assumes that the DP clock is always on and never powers it down, for reference see:
- dce110_clock_source_power_down

In case of DCE 6.0 and 6.4, PLL0 is the clock source for both the engine clock and DP clock, for reference see:
- radeon_atom_pick_pll
- atombios_crtc_set_disp_eng_pll

Therefore, PLL0 should be always kept running on DCE 6.0 and 6.4. This commit achieves that by ensuring that by setting the display clock to the corresponding value in low power state instead of zero.

This fixes a page flip timeout on SI with DC which happens when all connected displays are blanked.

---
 .../amd/display/dc/resource/dce60/dce60_resource.c    | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/resource/dce60/dce60_resource.c +10 -1
index 53b60044653f..c164d2500c2a 100644
@@ -881,7 +881,16 @@ static enum dc_status dce60_validate_bandwidth(
 		context->bw_ctx.bw.dce.dispclk_khz = 681000;
 		context->bw_ctx.bw.dce.yclk_khz = 250000 * MEMORY_TYPE_MULTIPLIER_CZ;
 	} else {
-		context->bw_ctx.bw.dce.dispclk_khz = 0;
+		/* On DCE 6.0 and 6.4 the PLL0 is both the display engine clock and
+		 * the DP clock, and shouldn't be turned off. Just select the display
+		 * clock value from its low power mode.
+		 */
+		if (dc->ctx->dce_version == DCE_VERSION_6_0 ||
+			dc->ctx->dce_version == DCE_VERSION_6_4)
+			context->bw_ctx.bw.dce.dispclk_khz = 352000;
+		else
+			context->bw_ctx.bw.dce.dispclk_khz = 0;
+
 		context->bw_ctx.bw.dce.yclk_khz = 0;
 	}
 
Signature · 1 line
2.50.1
#2 lore raw

PATCH 2/4 drm/amd/display: Disable fastboot on DCE 6 too

In reply to Timur Kristóf

It already didn't work on DCE 8,
so there is no reason to assume it would on DCE 6.

---
 drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c +2 -4
index 153d68375fa3..1d57df7fc948 100644
@@ -1923,10 +1923,8 @@ void dce110_enable_accelerated_mode(struct dc *dc, struct dc_state *context)
 
 	get_edp_streams(context, edp_streams, &edp_stream_num);
 
-	// Check fastboot support, disable on DCE8 because of blank screens
-	if (edp_num && edp_stream_num && dc->ctx->dce_version != DCE_VERSION_8_0 &&
-		    dc->ctx->dce_version != DCE_VERSION_8_1 &&
-		    dc->ctx->dce_version != DCE_VERSION_8_3) {
+	/* Check fastboot support, disable on DCE 6-8 because of blank screens */
+	if (edp_num && edp_stream_num && dc->ctx->dce_version < DCE_VERSION_10_0) {
 		for (i = 0; i < edp_num; i++) {
 			edp_link = edp_links[i];
 			if (edp_link != edp_streams[0]->link)
Signature · 1 line
2.50.1
#3 lore raw

PATCH 3/4 drm/amd/display: Disable VRR on DCE 6

In reply to Timur Kristóf

DCE 6 was not advertised as being able to support VRR, so let's mark it as unsupported for now.

The VRR implementation in amdgpu_dm depends on the VUPDATE interrupt which is not registered for DCE 6.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++-
 drivers/gpu/drm/amd/display/dc/dc_helper.c        | 5 +++++
 drivers/gpu/drm/amd/display/dc/dm_services.h      | 2 ++
 3 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -1
index b944abea306d..80a221b7b701 100644
@@ -10763,6 +10763,8 @@ static void get_freesync_config_for_crtc(
 		} else {
 			config.state = VRR_STATE_INACTIVE;
 		}
+	} else {
+		config.state = VRR_STATE_UNSUPPORTED;
 	}
 out:
 	new_crtc_state->freesync_config = config;
@@ -12664,7 +12666,7 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
 
 	dm_con_state = to_dm_connector_state(connector->state);
 
-	if (!adev->dm.freesync_module)
+	if (!adev->dm.freesync_module || !dc_supports_vrr(sink->ctx->dce_version))
 		goto update;
 
 	edid = drm_edid_raw(drm_edid); // FIXME: Get rid of drm_edid_raw()
drivers/gpu/drm/amd/display/dc/dc_helper.c +5 -0
index 51e41aed7316..5a365bd19933 100644
@@ -755,3 +755,8 @@ char *dce_version_to_string(const int version)
 		return "Unknown";
 	}
 }
+
+bool dc_supports_vrr(const enum dce_version v)
+{
+	return v >= DCE_VERSION_8_0;
+}
drivers/gpu/drm/amd/display/dc/dm_services.h +2 -0
index 7b9c22c45453..7b398d4f4439 100644
@@ -311,4 +311,6 @@ void dm_dtn_log_end(struct dc_context *ctx,
 
 char *dce_version_to_string(const int version);
 
+bool dc_supports_vrr(const enum dce_version v);
+
 #endif /* __DM_SERVICES_H__ */
Signature · 1 line
2.50.1
#4 lore raw

PATCH 4/4 drm/amd/display: Don't use non-registered VUPDATE on DCE 6 (v2)

In reply to Timur Kristóf

The VUPDATE interrupt isn't registered on DCE 6, so don't try to use that.

This fixes a page flip timeout after sleep/resume on DCE 6.

v2:
Fix rebase conflict with latest amd-staging-drm-next.

---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 ++++++++++++-------
 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 +++++++++-----
 2 files changed, 24 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +14 -8
index 80a221b7b701..56b19d397874 100644
@@ -3036,14 +3036,20 @@ static void dm_gpureset_toggle_interrupts(struct amdgpu_device *adev,
 				drm_warn(adev_to_drm(adev), "Failed to %s pflip interrupts\n",
 					 enable ? "enable" : "disable");
 
-			if (enable) {
-				if (amdgpu_dm_crtc_vrr_active(to_dm_crtc_state(acrtc->base.state)))
-					rc = amdgpu_dm_crtc_set_vupdate_irq(&acrtc->base, true);
-			} else
-				rc = amdgpu_dm_crtc_set_vupdate_irq(&acrtc->base, false);
-
-			if (rc)
-				drm_warn(adev_to_drm(adev), "Failed to %sable vupdate interrupt\n", enable ? "en" : "dis");
+			if (dc_supports_vrr(adev->dm.dc->ctx->dce_version)) {
+				if (enable) {
+					if (amdgpu_dm_crtc_vrr_active(
+							to_dm_crtc_state(acrtc->base.state)))
+						rc = amdgpu_dm_crtc_set_vupdate_irq(
+							&acrtc->base, true);
+				} else
+					rc = amdgpu_dm_crtc_set_vupdate_irq(
+							&acrtc->base, false);
+
+				if (rc)
+					drm_warn(adev_to_drm(adev), "Failed to %sable vupdate interrupt\n",
+						enable ? "en" : "dis");
+			}
 
 			irq_source = IRQ_TYPE_VBLANK + acrtc->otg_inst;
 			/* During gpu-reset we disable and then enable vblank irq, so
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c +10 -6
index 45feb404b097..466dccb355d7 100644
@@ -317,13 +317,17 @@ static inline int amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
 			dc->config.disable_ips != DMUB_IPS_DISABLE_ALL &&
 			sr_supported && vblank->config.disable_immediate)
 			drm_crtc_vblank_restore(crtc);
+	}
 
-		/* vblank irq on -> Only need vupdate irq in vrr mode */
-		if (amdgpu_dm_crtc_vrr_active(acrtc_state))
-			rc = amdgpu_dm_crtc_set_vupdate_irq(crtc, true);
-	} else {
-		/* vblank irq off -> vupdate irq off */
-		rc = amdgpu_dm_crtc_set_vupdate_irq(crtc, false);
+	if (dc_supports_vrr(dm->dc->ctx->dce_version)) {
+		if (enable) {
+			/* vblank irq on -> Only need vupdate irq in vrr mode */
+			if (amdgpu_dm_crtc_vrr_active(acrtc_state))
+				rc = amdgpu_dm_crtc_set_vupdate_irq(crtc, true);
+		} else {
+			/* vblank irq off -> vupdate irq off */
+			rc = amdgpu_dm_crtc_set_vupdate_irq(crtc, false);
+		}
 	}
 
 	if (rc)
Signature · 1 line
2.50.1
Reviewed-by on the v1 series
#5 lore raw
In reply to Timur Kristóf
Quoted 21 lines · Timur Kristóf

Compared to the previous version of this series, v2 fixes the rebase conflicts on amd-staging-drm-next and includes an additional patch to address page flip timeouts when the displays are blanked.

Currently when using DC on DCE 6, it produces pageflip timeouts:

1. When displays are blanked
This is caused by (mistakenly) turning off the display engine clock on DCE 6.0 and 6.4 which is also the DP clock.

2. After suspend/resume
The root cause is that DC assumes that the VUPDATE interrupt is always present, when in fact it isn't supported by DCE 6, which also doesn't support VRR.

Finally, there is also a patch to disable fast boot mode on DCE 6. The rationale is that this already didn't work on DCE 8, and even if it did I have no means to test it.

Quoted 5 lines

Timur Kristóf (4):
drm/amd/display: Keep PLL0 running on DCE 6.0 and 6.4 (v2) drm/amd/display: Disable fastboot on DCE 6 too drm/amd/display: Disable VRR on DCE 6 drm/amd/display: Don't use non-registered VUPDATE on DCE 6 (v2)

Series is:

Quoted 12 lines
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 26 ++++++++++++-------
 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 +++++++-----
 drivers/gpu/drm/amd/display/dc/dc_helper.c    |  5 ++++
 drivers/gpu/drm/amd/display/dc/dm_services.h  |  2 ++
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c |  6 ++---
 .../dc/resource/dce60/dce60_resource.c        | 11 +++++++-
 6 files changed, 46 insertions(+), 20 deletions(-)

--
2.50.1

#6 lore raw
Quoted 23 lines · Alex Deucher
Quoted 21 lines · Timur Kristóf

Compared to the previous version of this series, v2 fixes the rebase conflicts on amd-staging-drm-next and includes an additional patch to address page flip timeouts when the displays are blanked.

Currently when using DC on DCE 6, it produces pageflip timeouts:

1. When displays are blanked
This is caused by (mistakenly) turning off the display engine clock on DCE 6.0 and 6.4 which is also the DP clock.

2. After suspend/resume
The root cause is that DC assumes that the VUPDATE interrupt is always present, when in fact it isn't supported by DCE 6, which also doesn't support VRR.

Finally, there is also a patch to disable fast boot mode on DCE 6. The rationale is that this already didn't work on DCE 8, and even if it did I have no means to test it.

Quoted 8 lines
Quoted 5 lines

Timur Kristóf (4):
drm/amd/display: Keep PLL0 running on DCE 6.0 and 6.4 (v2) drm/amd/display: Disable fastboot on DCE 6 too drm/amd/display: Disable VRR on DCE 6 drm/amd/display: Don't use non-registered VUPDATE on DCE 6 (v2)

Series is:

@[email protected]
Were you planning to include this series in an upcoming DC promotion or should I pick it up?

Thanks,

Alex

Quoted 13 lines
Quoted 13 lines

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 26 ++++++++++++-------
 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 +++++++-----
 drivers/gpu/drm/amd/display/dc/dc_helper.c    |  5 ++++
 drivers/gpu/drm/amd/display/dc/dm_services.h  |  2 ++
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c |  6 ++---
 .../dc/resource/dce60/dce60_resource.c        | 11 +++++++-
 6 files changed, 46 insertions(+), 20 deletions(-)

--
2.50.1

#7 lore raw

@[email protected]@Wentland, Harry
Were you planning to pick this up for this week's promotion or should
I grab them?

Thanks,

Alex

Quoted 55 lines · Alex Deucher
Quoted 23 lines · Alex Deucher
Quoted 21 lines · Timur Kristóf

Compared to the previous version of this series, v2 fixes the rebase conflicts on amd-staging-drm-next and includes an additional patch to address page flip timeouts when the displays are blanked.

Currently when using DC on DCE 6, it produces pageflip timeouts:

1. When displays are blanked
This is caused by (mistakenly) turning off the display engine clock on DCE 6.0 and 6.4 which is also the DP clock.

2. After suspend/resume
The root cause is that DC assumes that the VUPDATE interrupt is always present, when in fact it isn't supported by DCE 6, which also doesn't support VRR.

Finally, there is also a patch to disable fast boot mode on DCE 6. The rationale is that this already didn't work on DCE 8, and even if it did I have no means to test it.

Quoted 8 lines
Quoted 5 lines

Timur Kristóf (4):
drm/amd/display: Keep PLL0 running on DCE 6.0 and 6.4 (v2) drm/amd/display: Disable fastboot on DCE 6 too drm/amd/display: Disable VRR on DCE 6 drm/amd/display: Don't use non-registered VUPDATE on DCE 6 (v2)

Series is:

@[email protected]
Were you planning to include this series in an upcoming DC promotion or should I pick it up?

Thanks,

Alex

Quoted 13 lines
Quoted 13 lines

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 26 ++++++++++++-------
 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 +++++++-----
 drivers/gpu/drm/amd/display/dc/dc_helper.c    |  5 ++++
 drivers/gpu/drm/amd/display/dc/dm_services.h  |  2 ++
 .../amd/display/dc/hwss/dce110/dce110_hwseq.c |  6 ++---
 .../dc/resource/dce60/dce60_resource.c        | 11 +++++++-
 6 files changed, 46 insertions(+), 20 deletions(-)

--
2.50.1

#8 lore raw
In reply to Alex Deucher
Quoted 30 lines · Alex Deucher
Quoted 29 lines · Alex Deucher
Quoted 26 lines · Timur Kristóf

Compared to the previous version of this series, v2 fixes the rebase conflicts on amd-staging-drm-next and includes an additional patch to address page flip timeouts when the displays are blanked.

Currently when using DC on DCE 6, it produces pageflip timeouts:

1. When displays are blanked
This is caused by (mistakenly) turning off the display engine clock on DCE 6.0 and 6.4 which is also the DP clock.

2. After suspend/resume
The root cause is that DC assumes that the VUPDATE interrupt is always present, when in fact it isn't supported by DCE 6, which also doesn't support VRR.

Finally, there is also a patch to disable fast boot mode on DCE 6. The rationale is that this already didn't work on DCE 8, and even if it did I have no means to test it.

Timur Kristóf (4):
drm/amd/display: Keep PLL0 running on DCE 6.0 and 6.4 (v2) drm/amd/display: Disable fastboot on DCE 6 too drm/amd/display: Disable VRR on DCE 6 drm/amd/display: Don't use non-registered VUPDATE on DCE 6 (v2)

Quoted 6 lines
Quoted 2 lines

Series is:

@[email protected]
Were you planning to include this series in an upcoming DC promotion or should I pick it up?

I will send them to weekly DC promotion.

Thanks.

Quoted 18 lines

Thanks,

Alex

Quoted 13 lines
Quoted 13 lines

  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 26 ++++++++++++-------
  .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 +++++++-----
  drivers/gpu/drm/amd/display/dc/dc_helper.c    |  5 ++++
  drivers/gpu/drm/amd/display/dc/dm_services.h  |  2 ++
  .../amd/display/dc/hwss/dce110/dce110_hwseq.c |  6 ++---
  .../dc/resource/dce60/dce60_resource.c        | 11 +++++++-
  6 files changed, 46 insertions(+), 20 deletions(-)

--
2.50.1

Reviewed-by on the v1 series
#9 lore raw
In reply to Timur Kristóf

No regression found in DC promotion test.

Quoted 34 lines · Timur Kristóf

Compared to the previous version of this series, v2 fixes the rebase conflicts on amd-staging-drm-next and includes an additional patch to address page flip timeouts when the displays are blanked.

Currently when using DC on DCE 6, it produces pageflip timeouts:

1. When displays are blanked
This is caused by (mistakenly) turning off the display engine clock on DCE 6.0 and 6.4 which is also the DP clock.

2. After suspend/resume
The root cause is that DC assumes that the VUPDATE interrupt is always present, when in fact it isn't supported by DCE 6, which also doesn't support VRR.

Finally, there is also a patch to disable fast boot mode on DCE 6. The rationale is that this already didn't work on DCE 8, and even if it did I have no means to test it.

Timur Kristóf (4):
drm/amd/display: Keep PLL0 running on DCE 6.0 and 6.4 (v2) drm/amd/display: Disable fastboot on DCE 6 too drm/amd/display: Disable VRR on DCE 6 drm/amd/display: Don't use non-registered VUPDATE on DCE 6 (v2)

  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 26 ++++++++++++-------
  .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 +++++++-----
  drivers/gpu/drm/amd/display/dc/dc_helper.c    |  5 ++++
  drivers/gpu/drm/amd/display/dc/dm_services.h  |  2 ++
  .../amd/display/dc/hwss/dce110/dce110_hwseq.c |  6 ++---
  .../dc/resource/dce60/dce60_resource.c        | 11 +++++++-
  6 files changed, 46 insertions(+), 20 deletions(-)