amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] DC: Fix page flip timeouts on DCE 6
@ 2025-08-02 16:05 Timur Kristóf
  2025-08-02 16:06 ` [PATCH 1/3] drm/amd/display: Disable fastboot on DCE 6 too Timur Kristóf
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Timur Kristóf @ 2025-08-02 16:05 UTC (permalink / raw)
  To: amd-gfx; +Cc: Timur Kristóf

Currently when using DC on DCE 6, it produces a page flip timeout
after a suspend/resume.

After some investigation, it turns out that the issue is because
DC uses different interrupts between DCE 6 and newer HW versions,
and it assumes that the VUPDATE interrupt is always present, when
in fact it's not. It also assumes that the HW is capable of VRR
when a VRR capable monitor is plugged in, when in fact this is
not the case.

This series marks VRR as unsupported on DCE 6 even when a VRR
capable monitor is plugged in. Furthermore, it fixes the code
trying to access the unregistered VUPDATE interrupt.

As a side note, I also attempted to actually use the same
interrupts as newer DCE versions, but this didn't work.
Apparently DCE 6 was not advertised with VRR support anyway.

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 (3):
  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

 .../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 ++---
 5 files changed, 35 insertions(+), 20 deletions(-)

-- 
2.50.1


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

* [PATCH 1/3] drm/amd/display: Disable fastboot on DCE 6 too.
  2025-08-02 16:05 [PATCH 0/3] DC: Fix page flip timeouts on DCE 6 Timur Kristóf
@ 2025-08-02 16:06 ` Timur Kristóf
  2025-08-12 21:09   ` Rodrigo Siqueira
  2025-08-02 16:06 ` [PATCH 2/3] drm/amd/display: Disable VRR on DCE 6 Timur Kristóf
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 17+ messages in thread
From: Timur Kristóf @ 2025-08-02 16:06 UTC (permalink / raw)
  To: amd-gfx; +Cc: Timur Kristóf

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

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
 drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
index 153d68375fa3..1d57df7fc948 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
@@ -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)
-- 
2.50.1


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

* [PATCH 2/3] drm/amd/display: Disable VRR on DCE 6
  2025-08-02 16:05 [PATCH 0/3] DC: Fix page flip timeouts on DCE 6 Timur Kristóf
  2025-08-02 16:06 ` [PATCH 1/3] drm/amd/display: Disable fastboot on DCE 6 too Timur Kristóf
@ 2025-08-02 16:06 ` Timur Kristóf
  2025-08-12 21:23   ` Rodrigo Siqueira
  2025-08-12 21:25   ` Rodrigo Siqueira
  2025-08-02 16:06 ` [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE " Timur Kristóf
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 17+ messages in thread
From: Timur Kristóf @ 2025-08-02 16:06 UTC (permalink / raw)
  To: amd-gfx; +Cc: 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.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
 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(-)

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 c71167ffdb76..470f831a17f7 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -10689,6 +10689,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;
@@ -12590,7 +12592,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()
diff --git a/drivers/gpu/drm/amd/display/dc/dc_helper.c b/drivers/gpu/drm/amd/display/dc/dc_helper.c
index 51e41aed7316..5a365bd19933 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_helper.c
+++ b/drivers/gpu/drm/amd/display/dc/dc_helper.c
@@ -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;
+}
diff --git a/drivers/gpu/drm/amd/display/dc/dm_services.h b/drivers/gpu/drm/amd/display/dc/dm_services.h
index 7b9c22c45453..7b398d4f4439 100644
--- a/drivers/gpu/drm/amd/display/dc/dm_services.h
+++ b/drivers/gpu/drm/amd/display/dc/dm_services.h
@@ -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__ */
-- 
2.50.1


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

* [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE on DCE 6
  2025-08-02 16:05 [PATCH 0/3] DC: Fix page flip timeouts on DCE 6 Timur Kristóf
  2025-08-02 16:06 ` [PATCH 1/3] drm/amd/display: Disable fastboot on DCE 6 too Timur Kristóf
  2025-08-02 16:06 ` [PATCH 2/3] drm/amd/display: Disable VRR on DCE 6 Timur Kristóf
@ 2025-08-02 16:06 ` Timur Kristóf
  2025-08-12 21:29   ` Rodrigo Siqueira
  2025-08-18 20:11   ` Alex Hung
  2025-08-04 15:50 ` [PATCH 0/3] DC: Fix page flip timeouts " Alex Deucher
  2025-08-18  3:04 ` Alex Hung
  4 siblings, 2 replies; 17+ messages in thread
From: Timur Kristóf @ 2025-08-02 16:06 UTC (permalink / raw)
  To: amd-gfx; +Cc: 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.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 ++++++++++++-------
 .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 ++++++++------
 2 files changed, 23 insertions(+), 15 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 470f831a17f7..e8d2ba58cbfa 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2981,14 +2981,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
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
index 2551823382f8..f2208e4224f9 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
@@ -298,13 +298,15 @@ static inline int amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
 
 	irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, acrtc->crtc_id);
 
-	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 (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)
-- 
2.50.1


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

* Re: [PATCH 0/3] DC: Fix page flip timeouts on DCE 6
  2025-08-02 16:05 [PATCH 0/3] DC: Fix page flip timeouts on DCE 6 Timur Kristóf
                   ` (2 preceding siblings ...)
  2025-08-02 16:06 ` [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE " Timur Kristóf
@ 2025-08-04 15:50 ` Alex Deucher
  2025-08-18  3:04 ` Alex Hung
  4 siblings, 0 replies; 17+ messages in thread
From: Alex Deucher @ 2025-08-04 15:50 UTC (permalink / raw)
  To: Timur Kristóf, Wentland, Harry, Leo (Sunpeng) Li; +Cc: amd-gfx

On Sat, Aug 2, 2025 at 12:23 PM Timur Kristóf <timur.kristof@gmail.com> wrote:
>
> Currently when using DC on DCE 6, it produces a page flip timeout
> after a suspend/resume.
>
> After some investigation, it turns out that the issue is because
> DC uses different interrupts between DCE 6 and newer HW versions,
> and it assumes that the VUPDATE interrupt is always present, when
> in fact it's not. It also assumes that the HW is capable of VRR
> when a VRR capable monitor is plugged in, when in fact this is
> not the case.
>
> This series marks VRR as unsupported on DCE 6 even when a VRR
> capable monitor is plugged in. Furthermore, it fixes the code
> trying to access the unregistered VUPDATE interrupt.
>
> As a side note, I also attempted to actually use the same
> interrupts as newer DCE versions, but this didn't work.
> Apparently DCE 6 was not advertised with VRR support anyway.
>
> 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 (3):
>   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

Series looks good to me, but it would be good to get an ack from the
display team as well.  Series is:
Acked-by: Alex Deucher <alexander.deucher@amd.com>

>
>  .../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 ++---
>  5 files changed, 35 insertions(+), 20 deletions(-)
>
> --
> 2.50.1
>

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

* Re: [PATCH 1/3] drm/amd/display: Disable fastboot on DCE 6 too.
  2025-08-02 16:06 ` [PATCH 1/3] drm/amd/display: Disable fastboot on DCE 6 too Timur Kristóf
@ 2025-08-12 21:09   ` Rodrigo Siqueira
  0 siblings, 0 replies; 17+ messages in thread
From: Rodrigo Siqueira @ 2025-08-12 21:09 UTC (permalink / raw)
  To: Timur Kristóf; +Cc: amd-gfx, Alex Hung, Aurabindo Pillai, Harry Wentland

On 08/02, Timur Kristóf wrote:
> It already didn't work on DCE 8,
> so there is no reason to assume it would on DCE 6.
> 
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
>  drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
> index 153d68375fa3..1d57df7fc948 100644
> --- a/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
> @@ -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)
> -- 
> 2.50.1
>

As usual, CCed other display folks.

Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com>

Thanks
-- 
Rodrigo Siqueira

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

* Re: [PATCH 2/3] drm/amd/display: Disable VRR on DCE 6
  2025-08-02 16:06 ` [PATCH 2/3] drm/amd/display: Disable VRR on DCE 6 Timur Kristóf
@ 2025-08-12 21:23   ` Rodrigo Siqueira
  2025-08-12 21:25   ` Rodrigo Siqueira
  1 sibling, 0 replies; 17+ messages in thread
From: Rodrigo Siqueira @ 2025-08-12 21:23 UTC (permalink / raw)
  To: Timur Kristóf; +Cc: amd-gfx, Aurabindo Pillai, Alex Hung, Harry Wentland

On 08/02, Timur Kristóf wrote:
> 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.
> 
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
>  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(-)
> 
> 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 c71167ffdb76..470f831a17f7 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -10689,6 +10689,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;
> @@ -12590,7 +12592,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()
> diff --git a/drivers/gpu/drm/amd/display/dc/dc_helper.c b/drivers/gpu/drm/amd/display/dc/dc_helper.c
> index 51e41aed7316..5a365bd19933 100644
> --- a/drivers/gpu/drm/amd/display/dc/dc_helper.c
> +++ b/drivers/gpu/drm/amd/display/dc/dc_helper.c
> @@ -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;
> +}
> diff --git a/drivers/gpu/drm/amd/display/dc/dm_services.h b/drivers/gpu/drm/amd/display/dc/dm_services.h
> index 7b9c22c45453..7b398d4f4439 100644
> --- a/drivers/gpu/drm/amd/display/dc/dm_services.h
> +++ b/drivers/gpu/drm/amd/display/dc/dm_services.h
> @@ -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__ */
> -- 
> 2.50.1
>

This change also lgtm,

CCed other display folks.

Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com>
 
Thanks

-- 
Rodrigo Siqueira

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

* Re: [PATCH 2/3] drm/amd/display: Disable VRR on DCE 6
  2025-08-02 16:06 ` [PATCH 2/3] drm/amd/display: Disable VRR on DCE 6 Timur Kristóf
  2025-08-12 21:23   ` Rodrigo Siqueira
@ 2025-08-12 21:25   ` Rodrigo Siqueira
  1 sibling, 0 replies; 17+ messages in thread
From: Rodrigo Siqueira @ 2025-08-12 21:25 UTC (permalink / raw)
  To: Timur Kristóf; +Cc: amd-gfx

On 08/02, Timur Kristóf wrote:
> 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.
> 
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
>  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(-)
> 
> 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 c71167ffdb76..470f831a17f7 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -10689,6 +10689,8 @@ static void get_freesync_config_for_crtc(
>  		} else {
>  			config.state = VRR_STATE_INACTIVE;
>  		}
> +	} else {
> +		config.state = VRR_STATE_UNSUPPORTED;

Just one tiny comment:

How about setting this value before the conditional "if" and removing
this "else" part?

Thanks

>  	}
>  out:
>  	new_crtc_state->freesync_config = config;
> @@ -12590,7 +12592,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()
> diff --git a/drivers/gpu/drm/amd/display/dc/dc_helper.c b/drivers/gpu/drm/amd/display/dc/dc_helper.c
> index 51e41aed7316..5a365bd19933 100644
> --- a/drivers/gpu/drm/amd/display/dc/dc_helper.c
> +++ b/drivers/gpu/drm/amd/display/dc/dc_helper.c
> @@ -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;
> +}
> diff --git a/drivers/gpu/drm/amd/display/dc/dm_services.h b/drivers/gpu/drm/amd/display/dc/dm_services.h
> index 7b9c22c45453..7b398d4f4439 100644
> --- a/drivers/gpu/drm/amd/display/dc/dm_services.h
> +++ b/drivers/gpu/drm/amd/display/dc/dm_services.h
> @@ -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__ */
> -- 
> 2.50.1
> 

-- 
Rodrigo Siqueira

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

* Re: [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE on DCE 6
  2025-08-02 16:06 ` [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE " Timur Kristóf
@ 2025-08-12 21:29   ` Rodrigo Siqueira
  2025-08-18 20:11   ` Alex Hung
  1 sibling, 0 replies; 17+ messages in thread
From: Rodrigo Siqueira @ 2025-08-12 21:29 UTC (permalink / raw)
  To: Timur Kristóf; +Cc: amd-gfx, Aurabindo Pillai, Alex Hung

On 08/02, Timur Kristóf wrote:
> 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.
> 
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 ++++++++++++-------
>  .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 ++++++++------
>  2 files changed, 23 insertions(+), 15 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 470f831a17f7..e8d2ba58cbfa 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2981,14 +2981,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
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> index 2551823382f8..f2208e4224f9 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> @@ -298,13 +298,15 @@ static inline int amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
>  
>  	irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, acrtc->crtc_id);
>  
> -	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 (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)
> -- 
> 2.50.1
>

Reviewed-by: Rodrigo Siqueira <siqueira@igalia.com> 

-- 
Rodrigo Siqueira

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

* Re: [PATCH 0/3] DC: Fix page flip timeouts on DCE 6
  2025-08-02 16:05 [PATCH 0/3] DC: Fix page flip timeouts on DCE 6 Timur Kristóf
                   ` (3 preceding siblings ...)
  2025-08-04 15:50 ` [PATCH 0/3] DC: Fix page flip timeouts " Alex Deucher
@ 2025-08-18  3:04 ` Alex Hung
  2025-08-18 17:03   ` Alex Deucher
  4 siblings, 1 reply; 17+ messages in thread
From: Alex Hung @ 2025-08-18  3:04 UTC (permalink / raw)
  To: Timur Kristóf, amd-gfx

The series is Reviewed-by: Alex Hung <alex.hung@amd.com>

The patch series is also tested in promotion test and CI without regression.

On 8/2/25 10:05, Timur Kristóf wrote:
> Currently when using DC on DCE 6, it produces a page flip timeout
> after a suspend/resume.
> 
> After some investigation, it turns out that the issue is because
> DC uses different interrupts between DCE 6 and newer HW versions,
> and it assumes that the VUPDATE interrupt is always present, when
> in fact it's not. It also assumes that the HW is capable of VRR
> when a VRR capable monitor is plugged in, when in fact this is
> not the case.
> 
> This series marks VRR as unsupported on DCE 6 even when a VRR
> capable monitor is plugged in. Furthermore, it fixes the code
> trying to access the unregistered VUPDATE interrupt.
> 
> As a side note, I also attempted to actually use the same
> interrupts as newer DCE versions, but this didn't work.
> Apparently DCE 6 was not advertised with VRR support anyway.
> 
> 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 (3):
>    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
> 
>   .../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 ++---
>   5 files changed, 35 insertions(+), 20 deletions(-)
> 


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

* Re: [PATCH 0/3] DC: Fix page flip timeouts on DCE 6
  2025-08-18  3:04 ` Alex Hung
@ 2025-08-18 17:03   ` Alex Deucher
  2025-08-18 17:11     ` Hung, Alex
  0 siblings, 1 reply; 17+ messages in thread
From: Alex Deucher @ 2025-08-18 17:03 UTC (permalink / raw)
  To: Alex Hung; +Cc: Timur Kristóf, amd-gfx

@Alex Hung
 can you pick these up as well?

Thanks,

Alex

On Mon, Aug 18, 2025 at 12:23 AM Alex Hung <alex.hung@amd.com> wrote:
>
> The series is Reviewed-by: Alex Hung <alex.hung@amd.com>
>
> The patch series is also tested in promotion test and CI without regression.
>
> On 8/2/25 10:05, Timur Kristóf wrote:
> > Currently when using DC on DCE 6, it produces a page flip timeout
> > after a suspend/resume.
> >
> > After some investigation, it turns out that the issue is because
> > DC uses different interrupts between DCE 6 and newer HW versions,
> > and it assumes that the VUPDATE interrupt is always present, when
> > in fact it's not. It also assumes that the HW is capable of VRR
> > when a VRR capable monitor is plugged in, when in fact this is
> > not the case.
> >
> > This series marks VRR as unsupported on DCE 6 even when a VRR
> > capable monitor is plugged in. Furthermore, it fixes the code
> > trying to access the unregistered VUPDATE interrupt.
> >
> > As a side note, I also attempted to actually use the same
> > interrupts as newer DCE versions, but this didn't work.
> > Apparently DCE 6 was not advertised with VRR support anyway.
> >
> > 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 (3):
> >    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
> >
> >   .../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 ++---
> >   5 files changed, 35 insertions(+), 20 deletions(-)
> >
>

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

* Re: [PATCH 0/3] DC: Fix page flip timeouts on DCE 6
  2025-08-18 17:03   ` Alex Deucher
@ 2025-08-18 17:11     ` Hung, Alex
  0 siblings, 0 replies; 17+ messages in thread
From: Hung, Alex @ 2025-08-18 17:11 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Timur Kristóf, amd-gfx@lists.freedesktop.org

[-- Attachment #1: Type: text/plain, Size: 2447 bytes --]

[AMD Official Use Only - AMD Internal Distribution Only]

Okay and will do
________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Alex Deucher <alexdeucher@gmail.com>
Sent: 18 August 2025 11:03
To: Hung, Alex <Alex.Hung@amd.com>
Cc: Timur Kristóf <timur.kristof@gmail.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 0/3] DC: Fix page flip timeouts on DCE 6

@Alex Hung
 can you pick these up as well?

Thanks,

Alex

On Mon, Aug 18, 2025 at 12:23 AM Alex Hung <alex.hung@amd.com> wrote:
>
> The series is Reviewed-by: Alex Hung <alex.hung@amd.com>
>
> The patch series is also tested in promotion test and CI without regression.
>
> On 8/2/25 10:05, Timur Kristóf wrote:
> > Currently when using DC on DCE 6, it produces a page flip timeout
> > after a suspend/resume.
> >
> > After some investigation, it turns out that the issue is because
> > DC uses different interrupts between DCE 6 and newer HW versions,
> > and it assumes that the VUPDATE interrupt is always present, when
> > in fact it's not. It also assumes that the HW is capable of VRR
> > when a VRR capable monitor is plugged in, when in fact this is
> > not the case.
> >
> > This series marks VRR as unsupported on DCE 6 even when a VRR
> > capable monitor is plugged in. Furthermore, it fixes the code
> > trying to access the unregistered VUPDATE interrupt.
> >
> > As a side note, I also attempted to actually use the same
> > interrupts as newer DCE versions, but this didn't work.
> > Apparently DCE 6 was not advertised with VRR support anyway.
> >
> > 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 (3):
> >    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
> >
> >   .../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 ++---
> >   5 files changed, 35 insertions(+), 20 deletions(-)
> >
>

[-- Attachment #2: Type: text/html, Size: 4034 bytes --]

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

* Re: [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE on DCE 6
  2025-08-02 16:06 ` [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE " Timur Kristóf
  2025-08-12 21:29   ` Rodrigo Siqueira
@ 2025-08-18 20:11   ` Alex Hung
  2025-08-18 20:30     ` Alex Deucher
  1 sibling, 1 reply; 17+ messages in thread
From: Alex Hung @ 2025-08-18 20:11 UTC (permalink / raw)
  To: Timur Kristóf, amd-gfx



On 8/2/25 10:06, Timur Kristóf wrote:
> 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.
> 
> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> ---
>   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 ++++++++++++-------
>   .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 ++++++++------
>   2 files changed, 23 insertions(+), 15 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 470f831a17f7..e8d2ba58cbfa 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2981,14 +2981,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");
> +			}

Hi Timur,

There seem to be conflicts to amd-staging-drm-next. Could you please 
rebase and resend? This helps make sure new change fix the problem you 
observed.

Really appreciate it. Thanks.

>   
>   			irq_source = IRQ_TYPE_VBLANK + acrtc->otg_inst;
>   			/* During gpu-reset we disable and then enable vblank irq, so
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> index 2551823382f8..f2208e4224f9 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> @@ -298,13 +298,15 @@ static inline int amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
>   
>   	irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, acrtc->crtc_id);
>   
> -	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 (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)


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

* Re: [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE on DCE 6
  2025-08-18 20:11   ` Alex Hung
@ 2025-08-18 20:30     ` Alex Deucher
  2025-08-18 22:01       ` Timur Kristóf
  0 siblings, 1 reply; 17+ messages in thread
From: Alex Deucher @ 2025-08-18 20:30 UTC (permalink / raw)
  To: Alex Hung; +Cc: Timur Kristóf, amd-gfx

On Mon, Aug 18, 2025 at 4:11 PM Alex Hung <alex.hung@amd.com> wrote:
>
>
>
> On 8/2/25 10:06, Timur Kristóf wrote:
> > 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.
> >
> > Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> > ---
> >   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 ++++++++++++-------
> >   .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 ++++++++------
> >   2 files changed, 23 insertions(+), 15 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 470f831a17f7..e8d2ba58cbfa 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -2981,14 +2981,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");
> > +                     }
>
> Hi Timur,
>
> There seem to be conflicts to amd-staging-drm-next. Could you please
> rebase and resend? This helps make sure new change fix the problem you
> observed.
>
> Really appreciate it. Thanks.

If it's just the first patch, you can skip that one as the conflict
solves the issue with DSC.

Alex

>
> >
> >                       irq_source = IRQ_TYPE_VBLANK + acrtc->otg_inst;
> >                       /* During gpu-reset we disable and then enable vblank irq, so
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> > index 2551823382f8..f2208e4224f9 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> > @@ -298,13 +298,15 @@ static inline int amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
> >
> >       irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, acrtc->crtc_id);
> >
> > -     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 (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)
>

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

* Re: [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE on DCE 6
  2025-08-18 20:30     ` Alex Deucher
@ 2025-08-18 22:01       ` Timur Kristóf
  2025-08-18 22:03         ` Alex Deucher
  2025-08-18 22:38         ` Alex Hung
  0 siblings, 2 replies; 17+ messages in thread
From: Timur Kristóf @ 2025-08-18 22:01 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Alex Hung, amd-gfx list

[-- Attachment #1: Type: text/plain, Size: 5178 bytes --]

Alex Deucher <alexdeucher@gmail.com> ezt írta (időpont: 2025. aug. 18., Hét
22:30):

> On Mon, Aug 18, 2025 at 4:11 PM Alex Hung <alex.hung@amd.com> wrote:
> >
> >
> >
> > On 8/2/25 10:06, Timur Kristóf wrote:
> > > 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.
> > >
> > > Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> > > ---
> > >   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22
> ++++++++++++-------
> > >   .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 ++++++++------
> > >   2 files changed, 23 insertions(+), 15 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 470f831a17f7..e8d2ba58cbfa 100644
> > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > > @@ -2981,14 +2981,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");
> > > +                     }
> >
> > Hi Timur,
> >
> > There seem to be conflicts to amd-staging-drm-next. Could you please
> > rebase and resend? This helps make sure new change fix the problem you
> > observed.
> >
> > Really appreciate it. Thanks.
>
> If it's just the first patch, you can skip that one as the conflict
> solves the issue with DSC.
>
> Alex
>

Hi Alex,

This is a different series, not the same one that had the patch for the DSC
crash. I can send a rebased version tomorrow.

Additionally, I have one more patch that solves another case of page flip
timeout on DCE 6, I will add that to the next version of the series too if
that's okay.

Thanks,
Timur



> >
> > >
> > >                       irq_source = IRQ_TYPE_VBLANK + acrtc->otg_inst;
> > >                       /* During gpu-reset we disable and then enable
> vblank irq, so
> > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> > > index 2551823382f8..f2208e4224f9 100644
> > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
> > > @@ -298,13 +298,15 @@ static inline int
> amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
> > >
> > >       irq_type = amdgpu_display_crtc_idx_to_irq_type(adev,
> acrtc->crtc_id);
> > >
> > > -     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 (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)
> >
>

[-- Attachment #2: Type: text/html, Size: 7480 bytes --]

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

* Re: [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE on DCE 6
  2025-08-18 22:01       ` Timur Kristóf
@ 2025-08-18 22:03         ` Alex Deucher
  2025-08-18 22:38         ` Alex Hung
  1 sibling, 0 replies; 17+ messages in thread
From: Alex Deucher @ 2025-08-18 22:03 UTC (permalink / raw)
  To: Timur Kristóf; +Cc: Alex Hung, amd-gfx list

On Mon, Aug 18, 2025 at 6:02 PM Timur Kristóf <timur.kristof@gmail.com> wrote:
>
>
> Alex Deucher <alexdeucher@gmail.com> ezt írta (időpont: 2025. aug. 18., Hét 22:30):
>>
>> On Mon, Aug 18, 2025 at 4:11 PM Alex Hung <alex.hung@amd.com> wrote:
>> >
>> >
>> >
>> > On 8/2/25 10:06, Timur Kristóf wrote:
>> > > 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.
>> > >
>> > > Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
>> > > ---
>> > >   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 ++++++++++++-------
>> > >   .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 ++++++++------
>> > >   2 files changed, 23 insertions(+), 15 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 470f831a17f7..e8d2ba58cbfa 100644
>> > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> > > @@ -2981,14 +2981,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");
>> > > +                     }
>> >
>> > Hi Timur,
>> >
>> > There seem to be conflicts to amd-staging-drm-next. Could you please
>> > rebase and resend? This helps make sure new change fix the problem you
>> > observed.
>> >
>> > Really appreciate it. Thanks.
>>
>> If it's just the first patch, you can skip that one as the conflict
>> solves the issue with DSC.
>>
>> Alex
>
>
> Hi Alex,
>
> This is a different series, not the same one that had the patch for the DSC crash. I can send a rebased version tomorrow.
>
> Additionally, I have one more patch that solves another case of page flip timeout on DCE 6, I will add that to the next version of the series too if that's okay.

Sure.  Sorry for the confusion.

Alex

>
> Thanks,
> Timur
>
>
>>
>> >
>> > >
>> > >                       irq_source = IRQ_TYPE_VBLANK + acrtc->otg_inst;
>> > >                       /* During gpu-reset we disable and then enable vblank irq, so
>> > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
>> > > index 2551823382f8..f2208e4224f9 100644
>> > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
>> > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
>> > > @@ -298,13 +298,15 @@ static inline int amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
>> > >
>> > >       irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, acrtc->crtc_id);
>> > >
>> > > -     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 (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)
>> >

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

* Re: [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE on DCE 6
  2025-08-18 22:01       ` Timur Kristóf
  2025-08-18 22:03         ` Alex Deucher
@ 2025-08-18 22:38         ` Alex Hung
  1 sibling, 0 replies; 17+ messages in thread
From: Alex Hung @ 2025-08-18 22:38 UTC (permalink / raw)
  To: Timur Kristóf, Alex Deucher; +Cc: amd-gfx list



On 8/18/25 16:01, Timur Kristóf wrote:
> 
> Alex Deucher <alexdeucher@gmail.com <mailto:alexdeucher@gmail.com>> ezt 
> írta (időpont: 2025. aug. 18., Hét 22:30):
> 
>     On Mon, Aug 18, 2025 at 4:11 PM Alex Hung <alex.hung@amd.com
>     <mailto:alex.hung@amd.com>> wrote:
>      >
>      >
>      >
>      > On 8/2/25 10:06, Timur Kristóf wrote:
>      > > 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.
>      > >
>      > > Signed-off-by: Timur Kristóf <timur.kristof@gmail.com
>     <mailto:timur.kristof@gmail.com>>
>      > > ---
>      > >   .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 22 ++++++++++
>     ++-------
>      > >   .../amd/display/amdgpu_dm/amdgpu_dm_crtc.c    | 16 ++++++++------
>      > >   2 files changed, 23 insertions(+), 15 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 470f831a17f7..e8d2ba58cbfa 100644
>      > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>      > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>      > > @@ -2981,14 +2981,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");
>      > > +                     }
>      >
>      > Hi Timur,
>      >
>      > There seem to be conflicts to amd-staging-drm-next. Could you please
>      > rebase and resend? This helps make sure new change fix the
>     problem you
>      > observed.
>      >
>      > Really appreciate it. Thanks.
> 
>     If it's just the first patch, you can skip that one as the conflict
>     solves the issue with DSC.
> 
>     Alex
> 
> 
> Hi Alex,
> 
> This is a different series, not the same one that had the patch for the 
> DSC crash. I can send a rebased version tomorrow.
> 
> Additionally, I have one more patch that solves another case of page 
> flip timeout on DCE 6, I will add that to the next version of the series 
> too if that's okay.
> 
> Thanks,
> Timur

Sounds good and thanks.

I will send new revision to next promotion test too.

Alex H.

> 
> 
> 
>      >
>      > >
>      > >                       irq_source = IRQ_TYPE_VBLANK + acrtc-
>      >otg_inst;
>      > >                       /* During gpu-reset we disable and then
>     enable vblank irq, so
>      > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/
>     amdgpu_dm_crtc.c b/drivers/gpu/drm/amd/display/amdgpu_dm/
>     amdgpu_dm_crtc.c
>      > > index 2551823382f8..f2208e4224f9 100644
>      > > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
>      > > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
>      > > @@ -298,13 +298,15 @@ static inline int
>     amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
>      > >
>      > >       irq_type = amdgpu_display_crtc_idx_to_irq_type(adev,
>     acrtc->crtc_id);
>      > >
>      > > -     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 (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)
>      >
> 


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

end of thread, other threads:[~2025-08-18 22:38 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-02 16:05 [PATCH 0/3] DC: Fix page flip timeouts on DCE 6 Timur Kristóf
2025-08-02 16:06 ` [PATCH 1/3] drm/amd/display: Disable fastboot on DCE 6 too Timur Kristóf
2025-08-12 21:09   ` Rodrigo Siqueira
2025-08-02 16:06 ` [PATCH 2/3] drm/amd/display: Disable VRR on DCE 6 Timur Kristóf
2025-08-12 21:23   ` Rodrigo Siqueira
2025-08-12 21:25   ` Rodrigo Siqueira
2025-08-02 16:06 ` [PATCH 3/3] drm/amd/display: Don't use non-registered VUPDATE " Timur Kristóf
2025-08-12 21:29   ` Rodrigo Siqueira
2025-08-18 20:11   ` Alex Hung
2025-08-18 20:30     ` Alex Deucher
2025-08-18 22:01       ` Timur Kristóf
2025-08-18 22:03         ` Alex Deucher
2025-08-18 22:38         ` Alex Hung
2025-08-04 15:50 ` [PATCH 0/3] DC: Fix page flip timeouts " Alex Deucher
2025-08-18  3:04 ` Alex Hung
2025-08-18 17:03   ` Alex Deucher
2025-08-18 17:11     ` Hung, Alex

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).