diff options
author | Akash Goel <akash.goel@intel.com> | 2016-10-12 18:24:35 +0200 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2016-10-25 10:34:23 +0200 |
commit | 5dd7989bbd28a76f1740344e4e2d01dc848158a9 (patch) | |
tree | 218fe14343b88c3efc2ea33ef2a8dd38f9014196 /drivers/gpu/drm/i915/intel_guc.h | |
parent | drm/i915: Add a relay backed debugfs interface for capturing GuC logs (diff) | |
download | linux-5dd7989bbd28a76f1740344e4e2d01dc848158a9.tar.xz linux-5dd7989bbd28a76f1740344e4e2d01dc848158a9.zip |
drm/i915: New lock to serialize the Host2GuC actions
With the addition of new Host2GuC actions related to GuC logging, there
is a need of a lock to serialize them, as they can execute concurrently
with each other and also with other existing actions.
v2: Use mutex in place of spinlock to serialize, as sleep can happen
while waiting for the action's response from GuC. (Tvrtko)
v3: To conform to the general rules, acquire mutex before taking the
forcewake. (Tvrtko)
Signed-off-by: Akash Goel <akash.goel@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_guc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h index e7999dd0f315..907d13a71c23 100644 --- a/drivers/gpu/drm/i915/intel_guc.h +++ b/drivers/gpu/drm/i915/intel_guc.h @@ -157,6 +157,9 @@ struct intel_guc { uint64_t submissions[I915_NUM_ENGINES]; uint32_t last_seqno[I915_NUM_ENGINES]; + + /* To serialize the Host2GuC actions */ + struct mutex action_lock; }; /* intel_guc_loader.c */ |