]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
drm/i915/gt: Adapt engine_park synchronisation rules for engine_retire
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 25 Nov 2019 10:58:57 +0000 (10:58 +0000)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 24 Feb 2020 20:36:00 +0000 (21:36 +0100)
commit14cb294ef0ce748d6cdc7f175f370fc468ca3962
tree1c6665880503922c28a59936ad55a1ab4e43f0db
parentd1caae473da118bd6ebe2c89e9a0acd56dbda1e7
drm/i915/gt: Adapt engine_park synchronisation rules for engine_retire

BugLink: https://bugs.launchpad.net/bugs/1853044
In the next patch, we will introduce a new asynchronous retirement
worker, fed by execlists CS events. Here we may queue a retirement as
soon as a request is submitted to HW (and completes instantly), and we
also want to process that retirement as early as possible and cannot
afford to postpone (as there may not be another opportunity to retire it
for a few seconds). To allow the new async retirer to run in parallel
with our submission, pull the __i915_request_queue (that passes the
request to HW) inside the timelines spinlock so that the retirement
cannot release the timeline before we have completed the submission.

v2: Actually to play nicely with engine_retire, we have to raise the
timeline.active_lock before releasing the HW. intel_gt_retire_requsts()
is still serialised by the outer lock so they cannot see this
intermediate state, and engine_retire is serialised by HW submission.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-2-chris@chris-wilson.co.uk
(cherry picked from commit 88a4655e75ac8f55eea5e3f38b176cba9cf653b5)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/gpu/drm/i915/gt/intel_engine_pm.c