[Intel-gfx] [PATCH] drm/i915/guc: Keep irq enabled during GuC cmd submission
yu.dai at intel.com
yu.dai at intel.com
Thu Nov 19 16:15:22 PST 2015
From: Alex Dai <yu.dai at 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 at 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
More information about the Intel-gfx
mailing list