[Intel-gfx] [PATCH 1/2] drm/i915: use runtime irq suspend/resume in freeze/thaw

Imre Deak imre.deak at intel.com
Thu Jun 19 15:24:21 CEST 2014


On Wed, 2014-06-18 at 09:52 -0700, Jesse Barnes wrote:
> We don't need to uninstall the full handler, simply disabling interrupts
> ought to be enough.
> 
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>

Reviewed-by: Imre Deak <imre.deak at intel.com>

For follow-up:
I agree with Daniel that we should add a new helper and use it instead
of the current dev->irq_enabled checks elsewhere.

Also we should add this check to the irq handlers themselves.

--Imre

> ---
>  drivers/gpu/drm/i915/i915_drv.c | 5 ++---
>  drivers/gpu/drm/i915/intel_pm.c | 4 ++--
>  2 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 7ae4e2a..be97741 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -522,7 +522,7 @@ static int i915_drm_freeze(struct drm_device *dev)
>  			return error;
>  		}
>  
> -		drm_irq_uninstall(dev);
> +		intel_runtime_pm_disable_interrupts(dev);
>  		dev_priv->enable_hotplug_processing = false;
>  
>  		intel_suspend_gt_powersave(dev);
> @@ -646,8 +646,7 @@ static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings)
>  		}
>  		mutex_unlock(&dev->struct_mutex);
>  
> -		/* We need working interrupts for modeset enabling ... */
> -		drm_irq_install(dev, dev->pdev->irq);
> +		intel_runtime_pm_restore_interrupts(dev);
>  
>  		intel_modeset_init_hw(dev);
>  
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 2043c4b..0bf9b0c 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4879,7 +4879,7 @@ void intel_suspend_gt_powersave(struct drm_device *dev)
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  
>  	/* Interrupts should be disabled already to avoid re-arming. */
> -	WARN_ON(dev->irq_enabled);
> +	WARN_ON(dev->irq_enabled && !dev_priv->pm.irqs_disabled);
>  
>  	flush_delayed_work(&dev_priv->rps.delayed_resume_work);
>  
> @@ -4891,7 +4891,7 @@ void intel_disable_gt_powersave(struct drm_device *dev)
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  
>  	/* Interrupts should be disabled already to avoid re-arming. */
> -	WARN_ON(dev->irq_enabled);
> +	WARN_ON(dev->irq_enabled && !dev_priv->pm.irqs_disabled);
>  
>  	if (IS_IRONLAKE_M(dev)) {
>  		ironlake_disable_drps(dev);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140619/5cae747b/attachment.sig>


More information about the Intel-gfx mailing list