diff options
author | Matthew Brost <matthew.brost@intel.com> | 2021-09-09 09:47:38 -0700 |
---|---|---|
committer | John Harrison <John.C.Harrison@Intel.com> | 2021-09-13 11:30:47 -0700 |
commit | 0f7976506de615abfcc54e2469417c69ff2b030f (patch) | |
tree | ae5e7d2d91800675746abee0522e673894280ddd /drivers/gpu/drm/i915/gt/intel_context_types.h | |
parent | drm/i915/guc: Move guc_blocked fence to struct guc_state (diff) | |
download | wireguard-linux-0f7976506de615abfcc54e2469417c69ff2b030f.tar.xz wireguard-linux-0f7976506de615abfcc54e2469417c69ff2b030f.zip |
drm/i915/guc: Rework and simplify locking
Rework and simplify the locking with GuC subission. Drop
sched_state_no_lock and move all fields under the guc_state.sched_state
and protect all these fields with guc_state.lock . This requires
changing the locking hierarchy from guc_state.lock -> sched_engine.lock
to sched_engine.lock -> guc_state.lock.
v2:
(Daniele)
- Don't check fields outside of lock during sched disable, check less
fields within lock as some of the outside are no longer needed
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210909164744.31249-18-matthew.brost@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_context_types.h')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_context_types.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_context_types.h b/drivers/gpu/drm/i915/gt/intel_context_types.h index 5aecb9038b5b..d2f798ef678c 100644 --- a/drivers/gpu/drm/i915/gt/intel_context_types.h +++ b/drivers/gpu/drm/i915/gt/intel_context_types.h @@ -161,7 +161,7 @@ struct intel_context { * sched_state: scheduling state of this context using GuC * submission */ - u16 sched_state; + u32 sched_state; /* * fences: maintains of list of requests that have a submit * fence related to GuC submission @@ -178,9 +178,6 @@ struct intel_context { struct list_head requests; } guc_active; - /* GuC scheduling state flags that do not require a lock. */ - atomic_t guc_sched_state_no_lock; - /* GuC LRC descriptor ID */ u16 guc_id; |