Re: [PATCH 21/49] drm/i915: Use the global runtime-pm wakelock for a busy GPU for execlists

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

 



On Fri, Mar 27, 2015 at 11:01:53AM +0000, Chris Wilson wrote:
> When we submit a request to the GPU, we first take the rpm wakelock, and
> only release it once the GPU has been idle for a small period of time
> after all requests have been complete. This means that we are sure no
> new interrupt can arrive whilst we do not hold the rpm wakelock and so
> can drop the individual get/put around every single request inside
> execlists.
> 
> Note: to close one potential issue we should mark the GPU as busy
> earlier in __i915_add_request.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

With the create/add_request rework from John, should we do the idle->busy
check in the request alloc function, together with latching the worker?
Not perfect if the execbuf doesn't go through, but leaves no races and
userspace better submit valid execbufs anyway if it expects performance.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_gem.c  | 1 -
>  drivers/gpu/drm/i915/intel_lrc.c | 3 ---
>  2 files changed, 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 7e6f2560bf35..4ec195a63d60 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2646,7 +2646,6 @@ static void i915_gem_reset_ring_cleanup(struct drm_i915_private *dev_priv,
>  				struct drm_i915_gem_request,
>  				execlist_link);
>  		list_del(&submit_req->execlist_link);
> -		intel_runtime_pm_put(dev_priv);
>  
>  		if (submit_req->ctx != ring->default_context)
>  			intel_lr_context_unpin(ring, submit_req->ctx);
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 9b7824ac35dc..2ed1cf448c6f 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -525,8 +525,6 @@ static int execlists_context_queue(struct intel_engine_cs *ring,
>  	}
>  	request->tail = tail;
>  
> -	intel_runtime_pm_get(dev_priv);
> -
>  	spin_lock_irq(&ring->execlist_lock);
>  
>  	list_for_each_entry(cursor, &ring->execlist_queue, execlist_link)
> @@ -740,7 +738,6 @@ void intel_execlists_retire_requests(struct intel_engine_cs *ring)
>  
>  		if (ctx_obj && (ctx != ring->default_context))
>  			intel_lr_context_unpin(ring, ctx);
> -		intel_runtime_pm_put(dev_priv);
>  		list_del(&req->execlist_link);
>  		i915_gem_request_unreference(req);
>  	}
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux