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

Chris Wilson chris at chris-wilson.co.uk
Fri Mar 27 07:25:28 PDT 2015


On Fri, Mar 27, 2015 at 03:19:20PM +0100, Daniel Vetter wrote:
> 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 at chris-wilson.co.uk>
> 
> 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.

I think it should be done in i915_request_commit(). The argument is that
that are quite a few places where we may start building a request to
decide that it is a no-op (e.g. fixing i915_gpu_idle() for execlists).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list