[Intel-gfx] [PATCH] drm/i915: Disable runtime power management during shutdown

Almahallawy, Khaled khaled.almahallawy at intel.com
Wed Jan 27 21:14:44 UTC 2021


On Wed, 2021-01-27 at 20:19 +0200, Imre Deak wrote:
> At least on some TGL platforms PUNIT wants to access some display HW
> registers, but it doesn't handle display power managment (disabling
> DC
> states as required) and so this register access will lead to a hang.
> To
> prevent this disable runtime power management for poweroff and
> reboot.
> 
> Reported-and-tested-by: Khaled Almahallawy <
> khaled.almahallawy at intel.com>
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c
> b/drivers/gpu/drm/i915/i915_drv.c
> index 0037b81d991e..6f83cca8e27b 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1054,6 +1054,8 @@ static void intel_shutdown_encoders(struct
> drm_i915_private *dev_priv)
>  void i915_driver_shutdown(struct drm_i915_private *i915)
>  {
>  	disable_rpm_wakeref_asserts(&i915->runtime_pm);
> +	intel_runtime_pm_disable(&i915->runtime_pm);
> +	intel_power_domains_disable(i915);
>  
>  	i915_gem_suspend(i915);
>  
> @@ -1069,7 +1071,10 @@ void i915_driver_shutdown(struct
> drm_i915_private *i915)
>  	intel_suspend_encoders(i915);
>  	intel_shutdown_encoders(i915);
>  
> +	intel_power_domains_driver_remove(i915);
>  	enable_rpm_wakeref_asserts(&i915->runtime_pm);
> +
> +	intel_runtime_pm_driver_release(&i915->runtime_pm);
>  }
>  
>  static bool suspend_to_idle(struct drm_i915_private *dev_priv)

Reviewed-by: Khaled Almahallawy <khaled.almahallawy at intel.com>


More information about the Intel-gfx mailing list