]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use the global runtime-pm wakelock for a busy GPU for execlists
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 7 Apr 2015 15:20:49 +0000 (16:20 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 10 Apr 2015 06:56:14 +0000 (08:56 +0200)
commit4b922a52b5ee90e275753c7e49a45910a7ec5544
treec4e25342351ace931026bf40d91abe92496da39b
parent42cd9008b607e6c55c08d1d45788cce5ef4987d1
drm/i915: Use the global runtime-pm wakelock for a busy GPU for execlists

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.

To elaborate: The issue is that we emit the irq signalling sequence
before we grab the rpm reference, which means we could miss the
resulting interrupt (since that's not set up when suspended). The only
bad side effect is a missed interrupt, gt mmio writes automatically
wake up the hw itself. But otoh we have an umbrella rpm reference for
the entirety of execbuf, as long as that's there we're covered.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Explain a bit more about the add_request issue, which after
some irc chatting with Chris turns out to not be an issue really.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_lrc.c