summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-01-24 14:33:39 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-01-24 21:08:24 +0000
commit0ea60c1d7343e2e757ed519ad82be9f198d1a58b (patch)
tree5cd7df6c24c4c1fe08ba3f7a38354b42702c00ff /drivers
parent646603d9aba7c360ff9e5201bec479219c0a0a7e (diff)
downloadlwn-0ea60c1d7343e2e757ed519ad82be9f198d1a58b.tar.gz
lwn-0ea60c1d7343e2e757ed519ad82be9f198d1a58b.zip
drm/i915/gt: Flush engine parking before release
Due to the asynchronous nature of releasing our wakerefs, we can signal the main GT wakeref as complete before the individual engines have cleared their own wakerefs. During shutdown we assert that the engines are indeed parked before we release them, but for this to be always true we need to flush their workers as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200124143339.140988-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/gt/intel_engine_cs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index 084abc577b14..9b965d1f811d 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -408,6 +408,7 @@ void intel_engines_release(struct intel_gt *gt)
/* Decouple the backend; but keep the layout for late GPU resets */
for_each_engine(engine, gt, id) {
+ intel_wakeref_wait_for_idle(&engine->wakeref);
GEM_BUG_ON(intel_engine_pm_is_awake(engine));
if (!engine->release)