diff mbox series

[07/31] drm/{i915, xe}/display: Move DP MST calls to display_driver

Message ID 20240924204222.246862-8-rodrigo.vivi@intel.com (mailing list archive)
State New, archived
Headers show
Series Reconcile i915's and xe's display power mgt sequences | expand

Commit Message

Rodrigo Vivi Sept. 24, 2024, 8:35 p.m. UTC
Move dp_mst suspend/resume functions from the drivers towards
intel_display_driver to continue with the unification.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_driver.c | 6 ++++++
 drivers/gpu/drm/i915/i915_driver.c                  | 4 ----
 drivers/gpu/drm/xe/display/xe_display.c             | 7 -------
 3 files changed, 6 insertions(+), 11 deletions(-)

Comments

Cavitt, Jonathan Oct. 7, 2024, 7:46 p.m. UTC | #1
-----Original Message-----
From: Intel-xe <intel-xe-bounces@lists.freedesktop.org> On Behalf Of Rodrigo Vivi
Sent: Tuesday, September 24, 2024 1:35 PM
To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org
Cc: Deak, Imre <imre.deak@intel.com>; Vivi, Rodrigo <rodrigo.vivi@intel.com>
Subject: [PATCH 07/31] drm/{i915, xe}/display: Move DP MST calls to display_driver
> 
> Move dp_mst suspend/resume functions from the drivers towards
> intel_display_driver to continue with the unification.
> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

There's probably an argument to be made that this should be two patches,
one for each platform, but I think it's fine.

Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
-Jonathan Cavitt

> ---
>  drivers/gpu/drm/i915/display/intel_display_driver.c | 6 ++++++
>  drivers/gpu/drm/i915/i915_driver.c                  | 4 ----
>  drivers/gpu/drm/xe/display/xe_display.c             | 7 -------
>  3 files changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index e40b1105168e..51fc1c148283 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -676,6 +676,9 @@ int intel_display_driver_suspend(struct drm_i915_private *i915)
>  			ret);
>  	else
>  		i915->display.restore.modeset_state = state;
> +
> +	intel_dp_mst_suspend(i915);
> +
>  	return ret;
>  }
>  
> @@ -729,6 +732,9 @@ void intel_display_driver_resume(struct drm_i915_private *i915)
>  	if (!HAS_DISPLAY(i915))
>  		return;
>  
> +	/* MST sideband requires HPD interrupts enabled */
> +	intel_dp_mst_resume(i915);
> +
>  	i915->display.restore.modeset_state = NULL;
>  	if (state)
>  		state->acquire_ctx = &ctx;
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 38c845ad86e5..d166a8164b42 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -1013,8 +1013,6 @@ static int i915_drm_suspend(struct drm_device *dev)
>  
>  	intel_display_driver_suspend(dev_priv);
>  
> -	intel_dp_mst_suspend(dev_priv);
> -
>  	intel_irq_suspend(dev_priv);
>  	intel_hpd_cancel_work(dev_priv);
>  
> @@ -1182,8 +1180,6 @@ static int i915_drm_resume(struct drm_device *dev)
>  
>  	intel_hpd_init(dev_priv);
>  
> -	/* MST sideband requires HPD interrupts enabled */
> -	intel_dp_mst_resume(dev_priv);
>  	intel_display_driver_resume(dev_priv);
>  
>  	if (HAS_DISPLAY(dev_priv)) {
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index b5a2a09e7a71..bc5c00437ab3 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -332,9 +332,6 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime)
>  
>  	xe_display_flush_cleanup_work(xe);
>  
> -	if (!runtime)
> -		intel_dp_mst_suspend(xe);
> -
>  	intel_hpd_cancel_work(xe);
>  
>  	if (!runtime && has_display(xe)) {
> @@ -426,10 +423,6 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime)
>  	if (!runtime && has_display(xe))
>  		intel_display_driver_resume_access(xe);
>  
> -	/* MST sideband requires HPD interrupts enabled */
> -	if (!runtime)
> -		intel_dp_mst_resume(xe);
> -
>  	if (!runtime && has_display(xe)) {
>  		intel_display_driver_resume(xe);
>  		drm_kms_helper_poll_enable(&xe->drm);
> -- 
> 2.46.0
> 
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index e40b1105168e..51fc1c148283 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -676,6 +676,9 @@  int intel_display_driver_suspend(struct drm_i915_private *i915)
 			ret);
 	else
 		i915->display.restore.modeset_state = state;
+
+	intel_dp_mst_suspend(i915);
+
 	return ret;
 }
 
@@ -729,6 +732,9 @@  void intel_display_driver_resume(struct drm_i915_private *i915)
 	if (!HAS_DISPLAY(i915))
 		return;
 
+	/* MST sideband requires HPD interrupts enabled */
+	intel_dp_mst_resume(i915);
+
 	i915->display.restore.modeset_state = NULL;
 	if (state)
 		state->acquire_ctx = &ctx;
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 38c845ad86e5..d166a8164b42 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -1013,8 +1013,6 @@  static int i915_drm_suspend(struct drm_device *dev)
 
 	intel_display_driver_suspend(dev_priv);
 
-	intel_dp_mst_suspend(dev_priv);
-
 	intel_irq_suspend(dev_priv);
 	intel_hpd_cancel_work(dev_priv);
 
@@ -1182,8 +1180,6 @@  static int i915_drm_resume(struct drm_device *dev)
 
 	intel_hpd_init(dev_priv);
 
-	/* MST sideband requires HPD interrupts enabled */
-	intel_dp_mst_resume(dev_priv);
 	intel_display_driver_resume(dev_priv);
 
 	if (HAS_DISPLAY(dev_priv)) {
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index b5a2a09e7a71..bc5c00437ab3 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -332,9 +332,6 @@  static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime)
 
 	xe_display_flush_cleanup_work(xe);
 
-	if (!runtime)
-		intel_dp_mst_suspend(xe);
-
 	intel_hpd_cancel_work(xe);
 
 	if (!runtime && has_display(xe)) {
@@ -426,10 +423,6 @@  static void __xe_display_pm_resume(struct xe_device *xe, bool runtime)
 	if (!runtime && has_display(xe))
 		intel_display_driver_resume_access(xe);
 
-	/* MST sideband requires HPD interrupts enabled */
-	if (!runtime)
-		intel_dp_mst_resume(xe);
-
 	if (!runtime && has_display(xe)) {
 		intel_display_driver_resume(xe);
 		drm_kms_helper_poll_enable(&xe->drm);