Skip to content

Commit

Permalink
drm/i915/execlists: Add interrupt-pending check to intel_execlists_id…
Browse files Browse the repository at this point in the history
…le()

Primarily this serves as a sanity check that the bit has been cleared
before we suspend (and hasn't reappeared after resume).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170201131222.11882-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
  • Loading branch information
Chris Wilson committed Feb 1, 2017
1 parent e2de845 commit 453cfe2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/gpu/drm/i915/intel_lrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,15 @@ bool intel_execlists_idle(struct drm_i915_private *dev_priv)
if (!i915.enable_execlists)
return true;

for_each_engine(engine, dev_priv, id)
for_each_engine(engine, dev_priv, id) {
/* Interrupt/tasklet pending? */
if (test_bit(ENGINE_IRQ_EXECLIST, &engine->irq_posted))
return false;

/* Both ports drained, no more ELSP submission? */
if (!execlists_elsp_idle(engine))
return false;
}

return true;
}
Expand Down

0 comments on commit 453cfe2

Please sign in to comment.