[Intel-gfx] [PATCH 3/4] drm/i915/guc: Init action_lock in the loader
Arkadiusz Hiler
arkadiusz.hiler at intel.com
Thu Nov 24 11:30:42 UTC 2016
Action_lock is a mutex used to serialise communication with GuC.
Since some functions which utilize the mutex (host2guc_*()) are no
longer limited to submission, initialization should be handled as a
part of GuC setup.
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski at intel.com>
---
drivers/gpu/drm/i915/i915_guc_submission.c | 1 -
drivers/gpu/drm/i915/intel_guc_loader.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 556b7f8..7c20721 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -1362,7 +1362,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);
diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 27f6fd5..a3e1c08 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -484,6 +484,7 @@ int intel_guc_setup(struct drm_device *dev)
goto fail;
}
+ mutex_init(&dev_priv->guc.action_lock);
guc_interrupts_release(dev_priv);
gen9_reset_guc_interrupts(dev_priv);
--
2.7.4
More information about the Intel-gfx
mailing list