aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_request.h
diff options
context:
space:
mode:
authorMatthew Brost <[email protected]>2021-09-09 16:47:36 +0000
committerJohn Harrison <[email protected]>2021-09-13 18:30:44 +0000
commitb0d83888a32b30cb95bee7385151ac58d51a2340 (patch)
tree8412aa7f7d633fde28bdd0b72101916210b5cfde /drivers/gpu/drm/i915/i915_request.h
parentdrm/i915/guc: Reset LRC descriptor if register returns -ENODEV (diff)
downloadkernel-b0d83888a32b30cb95bee7385151ac58d51a2340.tar.gz
kernel-b0d83888a32b30cb95bee7385151ac58d51a2340.zip
drm/i915/guc: Release submit fence from an irq_work
A subsequent patch will flip the locking hierarchy from ce->guc_state.lock -> sched_engine->lock to sched_engine->lock -> ce->guc_state.lock. As such we need to release the submit fence for a request from an IRQ to break a lock inversion - i.e. the fence must be release went holding ce->guc_state.lock and the releasing of the can acquire sched_engine->lock. v2: (Daniele) - Delete request from list before calling irq_work_queue Reviewed-by: Daniele Ceraolo Spurio <[email protected]> Signed-off-by: Matthew Brost <[email protected]> Signed-off-by: John Harrison <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/i915/i915_request.h')
-rw-r--r--drivers/gpu/drm/i915/i915_request.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
index 1bc1349ba3c2..d818cfbfc41d 100644
--- a/drivers/gpu/drm/i915/i915_request.h
+++ b/drivers/gpu/drm/i915/i915_request.h
@@ -218,6 +218,11 @@ struct i915_request {
};
struct llist_head execute_cb;
struct i915_sw_fence semaphore;
+ /**
+ * @submit_work: complete submit fence from an IRQ if needed for
+ * locking hierarchy reasons.
+ */
+ struct irq_work submit_work;
/*
* A list of everyone we wait upon, and everyone who waits upon us.