[Intel-gfx] [PATCH 44/70] drm/i915: Prefer to check for idleness in worker rather than sync-flush

Daniel Vetter daniel at ffwll.ch
Fri Apr 10 01:37:44 PDT 2015


On Tue, Apr 07, 2015 at 04:21:08PM +0100, Chris Wilson wrote:
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 9511993daeea..c394c0d13eb7 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2570,7 +2570,6 @@ int __i915_add_request(struct intel_engine_cs *ring,
>  
>  	i915_queue_hangcheck(ring->dev);
>  
> -	cancel_delayed_work_sync(&dev_priv->mm.idle_work);
>  	queue_delayed_work(dev_priv->wq,
>  			   &dev_priv->mm.retire_work,
>  			   round_jiffies_up_relative(HZ));
> @@ -2908,6 +2907,12 @@ i915_gem_idle_work_handler(struct work_struct *work)
>  	struct drm_i915_private *dev_priv =
>  		container_of(work, typeof(*dev_priv), mm.idle_work.work);
>  	struct drm_device *dev = dev_priv->dev;
> +	struct intel_engine_cs *ring;
> +	int i;
> +
> +	for_each_ring(ring, dev_priv, i)
> +		if (!list_empty(&ring->request_list))
> +			return;
>  
>  	intel_mark_idle(dev);
>  
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list