All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/guc: Always initialize action_lock
@ 2016-11-22 16:22 Arkadiusz Hiler
  2016-11-22 17:05 ` Chris Wilson
  2016-11-22 17:24 ` ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 8+ messages in thread
From: Arkadiusz Hiler @ 2016-11-22 16:22 UTC (permalink / raw)
  To: intel-gfx

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@intel.com>
Cc: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-11-23 12:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-22 16:22 [PATCH] drm/i915/guc: Always initialize action_lock Arkadiusz Hiler
2016-11-22 17:05 ` Chris Wilson
2016-11-22 21:25   ` Srivatsa, Anusha
2016-11-23 12:12     ` Arkadiusz Hiler
2016-11-23  9:41   ` Arkadiusz Hiler
2016-11-23 10:07     ` Chris Wilson
2016-11-23 11:26       ` Arkadiusz Hiler
2016-11-22 17:24 ` ✗ Fi.CI.BAT: failure for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.