[Intel-gfx] [PATCH] drm/i915/guc: Always initialize action_lock
Arkadiusz Hiler
arkadiusz.hiler at intel.com
Tue Nov 22 16:22:47 UTC 2016
Action lock is not being initialized if the GuC submission is disabled
(i.e. i915.guc_submission=0).
host2guc_action(), which uses the action_lock can be used for
non-submission purposes, e.g. triggering HuC authentication.
Moving action_lock initialization before enablement check will allow us
to use the host2guc_action no matter whether submission is enabled or
not.
Cc: Anusha Srivatsa <anusha.srivatsa at intel.com>
Cc: Jeff McGee <jeff.mcgee at intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
---
drivers/gpu/drm/i915/i915_guc_submission.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 4462112..17c06d5 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -1484,6 +1484,8 @@ int i915_guc_submission_init(struct drm_i915_private *dev_priv)
struct intel_guc *guc = &dev_priv->guc;
struct i915_vma *vma;
+ mutex_init(&guc->action_lock);
+
/* Wipe bitmap & delete client in case of reinitialisation */
bitmap_clear(guc->doorbell_bitmap, 0, GUC_MAX_DOORBELLS);
i915_guc_submission_disable(dev_priv);
@@ -1500,7 +1502,6 @@ int i915_guc_submission_init(struct drm_i915_private *dev_priv)
guc->ctx_pool_vma = vma;
ida_init(&guc->ctx_ids);
- mutex_init(&guc->action_lock);
guc_log_create(guc);
guc_addon_create(guc);
--
2.7.4
More information about the Intel-gfx
mailing list