]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Mark the GT as busy before idling the previous request
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 17 Aug 2017 14:47:19 +0000 (15:47 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 18 Aug 2017 11:01:41 +0000 (12:01 +0100)
commit636918f130296fac1ab195ba087688f91bd627f8
tree44898395a4e5138e6ffb25db5a57915c6747b4a2
parent0519bcb1737c58b91da23735394ecf26ae211fbc
drm/i915: Mark the GT as busy before idling the previous request

In a synchronous setup, we may retire the last request before we
complete allocating the next request. As the last request is retired, we
queue a timer to mark the device as idle, and promptly have to execute
ad cancel that timer once we complete allocating the request and need to
keep the device awake. If we rearrange the mark_busy() to occur before
we retire the previous request, we can skip this ping-pong.

v2: Joonas pointed out that unreserve_seqno() was now doing more than
doing seqno handling and should be renamed to reflect its wider purpose.
That also highlighted the new asymmetry with reserve_seqno(), so fixup
that and rename both to [un]reserve_engine().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170817144719.10968-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_gem_request.c