All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/guc: Keep irq enabled during GuC cmd submission
@ 2015-11-20  0:15 yu.dai
  2015-11-20  8:45 ` Daniel Vetter
  0 siblings, 1 reply; 24+ messages in thread
From: yu.dai @ 2015-11-20  0:15 UTC (permalink / raw)
  To: intel-gfx

From: Alex Dai <yu.dai@intel.com>

When GuC Work Queue is full, driver will wait GuC for avaliable
space by calling wait_for_atomic. If irq is disabled, lockup will
happen because jiffies won't be updated.

Issue is found in igt/gem_close_race.

Signed-off-by: Alex Dai <yu.dai@intel.com>
---
 drivers/gpu/drm/i915/i915_guc_submission.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 0a6b007..bbfa6ed 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -597,14 +597,13 @@ int i915_guc_submit(struct i915_guc_client *client,
 {
 	struct intel_guc *guc = client->guc;
 	enum intel_ring_id ring_id = rq->ring->id;
-	unsigned long flags;
 	int q_ret, b_ret;
 
 	/* Need this because of the deferred pin ctx and ring */
 	/* Shall we move this right after ring is pinned? */
 	lr_context_update(rq);
 
-	spin_lock_irqsave(&client->wq_lock, flags);
+	spin_lock(&client->wq_lock);
 
 	q_ret = guc_add_workqueue_item(client, rq);
 	if (q_ret == 0)
@@ -620,7 +619,7 @@ int i915_guc_submit(struct i915_guc_client *client,
 	} else {
 		client->retcode = 0;
 	}
-	spin_unlock_irqrestore(&client->wq_lock, flags);
+	spin_unlock(&client->wq_lock);
 
 	spin_lock(&guc->host2guc_lock);
 	guc->submissions[ring_id] += 1;
-- 
2.5.0

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

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

end of thread, other threads:[~2016-01-26 17:11 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-20  0:15 [PATCH] drm/i915/guc: Keep irq enabled during GuC cmd submission yu.dai
2015-11-20  8:45 ` Daniel Vetter
2015-11-23 23:02   ` [PATCH] drm/i915/guc: Move wait for GuC out of spinlock/unlock yu.dai
2015-11-24 13:04     ` Daniel Vetter
2015-11-24 13:26       ` Imre Deak
2015-11-24 17:00         ` Yu Dai
2015-11-24 17:05           ` Imre Deak
2015-11-24 18:08             ` Daniel Vetter
2015-11-24 18:36               ` Yu Dai
2015-11-24 19:13                 ` Daniel Vetter
2015-11-24 22:34                   ` Yu Dai
2015-11-25  8:45                     ` Daniel Vetter
2015-11-25 19:29     ` [PATCH v2] drm/i915/guc: Clean up locks in GuC yu.dai
2015-11-26  9:16       ` Nick Hoath
2015-12-01  0:15     ` [PATCH v3] " yu.dai
2015-12-02 19:50       ` Dave Gordon
2015-12-03  0:56     ` [PATCH v4] " yu.dai
2015-12-03  7:52       ` Daniel Vetter
2016-01-22 10:54       ` Tvrtko Ursulin
2016-01-25 16:01         ` Daniel Vetter
2016-01-26 11:53           ` Tvrtko Ursulin
2016-01-26 12:08             ` Chris Wilson
2016-01-26 16:54               ` Daniel Vetter
2016-01-26 17:11                 ` Chris Wilson

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.