RE: [PATCH 21/31] drm/{i915, xe}/display: Move dsm registration under intel_driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----Original Message-----
From: Intel-xe <intel-xe-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Rodrigo Vivi
Sent: Tuesday, September 24, 2024 1:36 PM
To: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; intel-xe@xxxxxxxxxxxxxxxxxxxxx
Cc: Deak, Imre <imre.deak@xxxxxxxxx>; Vivi, Rodrigo <rodrigo.vivi@xxxxxxxxx>
Subject: [PATCH 21/31] drm/{i915, xe}/display: Move dsm registration under intel_driver
> 
> Move dsm register/unregister calls from the drivers to under
> intel_display_driver register/unregister.
> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>

LGTM.

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

> ---
>  drivers/gpu/drm/i915/display/intel_display_driver.c | 4 ++++
>  drivers/gpu/drm/i915/i915_driver.c                  | 5 -----
>  drivers/gpu/drm/xe/display/xe_display.c             | 3 ---
>  3 files changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index 85a51b9d49f8..f3a586913c6f 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -565,6 +565,8 @@ void intel_display_driver_register(struct drm_i915_private *i915)
>  					DISPLAY_RUNTIME_INFO(i915), &p);
>  
>  	intel_power_domains_enable(i915);
> +
> +	intel_register_dsm_handler();
>  }
>  
>  void intel_display_driver_cleanup(struct drm_i915_private *i915)
> @@ -647,6 +649,8 @@ void intel_display_driver_unregister(struct drm_i915_private *i915)
>  	if (!HAS_DISPLAY(i915))
>  		return;
>  
> +	intel_unregister_dsm_handler();
> +
>  	intel_power_domains_disable(i915);
>  
>  	drm_client_dev_unregister(&i915->drm);
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 65f885e03880..7fce210d355d 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -45,7 +45,6 @@
>  #include <drm/drm_managed.h>
>  
>  #include "display/i9xx_display_sr.h"
> -#include "display/intel_acpi.h"
>  #include "display/intel_bw.h"
>  #include "display/intel_cdclk.h"
>  #include "display/intel_crtc.h"
> @@ -629,8 +628,6 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
>  
>  	intel_runtime_pm_enable(&dev_priv->runtime_pm);
>  
> -	intel_register_dsm_handler();
> -
>  	if (i915_switcheroo_register(dev_priv))
>  		drm_err(&dev_priv->drm, "Failed to register vga switcheroo!\n");
>  }
> @@ -646,8 +643,6 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
>  
>  	i915_switcheroo_unregister(dev_priv);
>  
> -	intel_unregister_dsm_handler();
> -
>  	intel_runtime_pm_disable(&dev_priv->runtime_pm);
>  
>  	intel_display_driver_unregister(dev_priv);
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 44850b6cd382..6bfad26a3c06 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -14,7 +14,6 @@
>  #include <uapi/drm/xe_drm.h>
>  
>  #include "soc/intel_dram.h"
> -#include "intel_acpi.h"
>  #include "intel_audio.h"
>  #include "intel_bw.h"
>  #include "intel_display.h"
> @@ -217,7 +216,6 @@ void xe_display_register(struct xe_device *xe)
>  		return;
>  
>  	intel_display_driver_register(xe);
> -	intel_register_dsm_handler();
>  }
>  
>  void xe_display_unregister(struct xe_device *xe)
> @@ -225,7 +223,6 @@ void xe_display_unregister(struct xe_device *xe)
>  	if (!xe->info.probe_display)
>  		return;
>  
> -	intel_unregister_dsm_handler();
>  	intel_display_driver_unregister(xe);
>  }
>  
> -- 
> 2.46.0
> 
> 




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux