summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gt/intel_context.c
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2021-07-21 14:50:50 -0700
committerJohn Harrison <John.C.Harrison@Intel.com>2021-07-22 10:07:11 -0700
commitb208f2d51b468f3289208e9d8d3cbbf76e84e426 (patch)
tree9e29733e1d0f03098e79e2b6be7959482c09bf07 /drivers/gpu/drm/i915/gt/intel_context.c
parent3a4cdf1982f05d1da434eb3d777554ea6de6769a (diff)
downloadlinux-b208f2d51b468f3289208e9d8d3cbbf76e84e426.tar.bz2
drm/i915/guc: Insert fence on context when deregistering
Sometimes during context pinning a context with the same guc_id is registered with the GuC. In this a case deregister must be done before the context can be registered. A fence is inserted on all requests while the deregister is in flight. Once the G2H is received indicating the deregistration is complete the context is registered and the fence is released. v2: (John H) - Fix commit message Cc: John Harrison <john.c.harrison@intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: John Harrison <john.c.harrison@intel.com> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210721215101.139794-8-matthew.brost@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_context.c')
-rw-r--r--drivers/gpu/drm/i915/gt/intel_context.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_context.c b/drivers/gpu/drm/i915/gt/intel_context.c
index 090c13287d3e..7c9159517f8a 100644
--- a/drivers/gpu/drm/i915/gt/intel_context.c
+++ b/drivers/gpu/drm/i915/gt/intel_context.c
@@ -385,6 +385,7 @@ intel_context_init(struct intel_context *ce, struct intel_engine_cs *engine)
mutex_init(&ce->pin_mutex);
spin_lock_init(&ce->guc_state.lock);
+ INIT_LIST_HEAD(&ce->guc_state.fences);
ce->guc_id = GUC_INVALID_LRC_ID;
INIT_LIST_HEAD(&ce->guc_id_link);