diff mbox series

[18/31] drm/i915/display: Split resume_noirq calls for now

Message ID 20240924204222.246862-19-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
Some functions are not yet called from Xe. Move them to a
separate function that will be only used in i915 for now.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_driver.c | 10 ++++++++++
 drivers/gpu/drm/i915/display/intel_display_driver.h |  1 +
 drivers/gpu/drm/i915/i915_driver.c                  |  1 +
 3 files changed, 12 insertions(+)

Comments

Cavitt, Jonathan Oct. 7, 2024, 9:29 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:36 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 18/31] drm/i915/display: Split resume_noirq calls for now
> 
> Some functions are not yet called from Xe. Move them to a
> separate function that will be only used in i915 for now.
> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

s/be only/only be
But otherwise:

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

> ---
>  drivers/gpu/drm/i915/display/intel_display_driver.c | 10 ++++++++++
>  drivers/gpu/drm/i915/display/intel_display_driver.h |  1 +
>  drivers/gpu/drm/i915/i915_driver.c                  |  1 +
>  3 files changed, 12 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index a64468e3a052..85a51b9d49f8 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -729,6 +729,16 @@ void intel_display_driver_resume_noirq(struct drm_i915_private *i915)
>  	intel_dpt_resume(i915);
>  
>  	intel_dmc_resume(display);
> +}
> +
> +/*
> + * TODO: Current sequences missing from Xe! Check and merge with above function.
> + *       DPT is also a missing case there, but the TODO is recorded as the
> + *       empty stub DPT functions inside Xe.
> + */
> +void intel_display_driver_resume_noirq_legacy(struct drm_i915_private *i915)
> +{
> +	struct intel_display *display = &i915->display;
>  
>  	intel_vga_redisable(display);
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h
> index 4b2c041667e0..e287574fcd35 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h
> @@ -31,6 +31,7 @@ void intel_display_driver_suspend_noirq(struct drm_i915_private *i915);
>  void intel_display_driver_suspend_noggtt(struct intel_display *display, bool s2idle);
>  void intel_display_driver_resume(struct drm_i915_private *i915);
>  void intel_display_driver_resume_noirq(struct drm_i915_private *i915);
> +void intel_display_driver_resume_noirq_legacy(struct drm_i915_private *i915);
>  void intel_display_driver_resume_nogem(struct intel_display *display);
>  void intel_display_driver_shutdown(struct drm_i915_private *i915);
>  void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915);
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 53960326b68d..65f885e03880 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -1113,6 +1113,7 @@ static int i915_drm_resume(struct drm_device *dev)
>  	i9xx_display_sr_restore(dev_priv);
>  
>  	intel_display_driver_resume_noirq(dev_priv);
> +	intel_display_driver_resume_noirq_legacy(dev_priv);
>  
>  	/*
>  	 * Interrupts have to be enabled before any batches are run. If not the
> -- 
> 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 a64468e3a052..85a51b9d49f8 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -729,6 +729,16 @@  void intel_display_driver_resume_noirq(struct drm_i915_private *i915)
 	intel_dpt_resume(i915);
 
 	intel_dmc_resume(display);
+}
+
+/*
+ * TODO: Current sequences missing from Xe! Check and merge with above function.
+ *       DPT is also a missing case there, but the TODO is recorded as the
+ *       empty stub DPT functions inside Xe.
+ */
+void intel_display_driver_resume_noirq_legacy(struct drm_i915_private *i915)
+{
+	struct intel_display *display = &i915->display;
 
 	intel_vga_redisable(display);
 
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h
index 4b2c041667e0..e287574fcd35 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.h
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.h
@@ -31,6 +31,7 @@  void intel_display_driver_suspend_noirq(struct drm_i915_private *i915);
 void intel_display_driver_suspend_noggtt(struct intel_display *display, bool s2idle);
 void intel_display_driver_resume(struct drm_i915_private *i915);
 void intel_display_driver_resume_noirq(struct drm_i915_private *i915);
+void intel_display_driver_resume_noirq_legacy(struct drm_i915_private *i915);
 void intel_display_driver_resume_nogem(struct intel_display *display);
 void intel_display_driver_shutdown(struct drm_i915_private *i915);
 void intel_display_driver_shutdown_noirq(struct drm_i915_private *i915);
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 53960326b68d..65f885e03880 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -1113,6 +1113,7 @@  static int i915_drm_resume(struct drm_device *dev)
 	i9xx_display_sr_restore(dev_priv);
 
 	intel_display_driver_resume_noirq(dev_priv);
+	intel_display_driver_resume_noirq_legacy(dev_priv);
 
 	/*
 	 * Interrupts have to be enabled before any batches are run. If not the