Re: [PATCH 06/46] drm/i915: Track the rpm wakerefs for error handling

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

 



Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:

> Keep hold of the local wakeref used in error handling, to cancel
> the tracking upon release so that leaks can be identified.
>
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>

Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/i915_irq.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 72b799c5e8f6..3272bd02c3cf 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -3292,6 +3292,7 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
>  		       const char *fmt, ...)
>  {
>  	struct intel_engine_cs *engine;
> +	intel_wakeref_t wakeref;
>  	unsigned int tmp;
>  	char error_msg[80];
>  	char *msg = NULL;
> @@ -3313,7 +3314,7 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
>  	 * isn't the case at least when we get here by doing a
>  	 * simulated reset via debugfs, so get an RPM reference.
>  	 */
> -	intel_runtime_pm_get(dev_priv);
> +	wakeref = intel_runtime_pm_get(dev_priv);
>  
>  	engine_mask &= INTEL_INFO(dev_priv)->ring_mask;
>  
> @@ -3375,7 +3376,7 @@ void i915_handle_error(struct drm_i915_private *dev_priv,
>  	wake_up_all(&dev_priv->gpu_error.reset_queue);
>  
>  out:
> -	intel_runtime_pm_put_unchecked(dev_priv);
> +	intel_runtime_pm_put(dev_priv, wakeref);
>  }
>  
>  /* Called from drm generic code, passed 'crtc' which
> -- 
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




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

  Powered by Linux