Skip to content

Commit

Permalink
drm/i915: Pretend the engine is always idle when mocking
Browse files Browse the repository at this point in the history
If we have a mock engine and it has no more requests in flight, report
it as idle as there is no hardware to contradict us! Otherwise we
attempt to query the hw that doesn't exist and find that the hw hasn't
set its idle bit and we get upset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170411234427.14841-2-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
  • Loading branch information
Chris Wilson committed Apr 12, 2017
1 parent 0757ac8 commit 8968a36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/intel_engine_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,9 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
intel_engine_last_submit(engine)))
return false;

if (I915_SELFTEST_ONLY(engine->breadcrumbs.mock))
return true;

/* Interrupt/tasklet pending? */
if (test_bit(ENGINE_IRQ_EXECLIST, &engine->irq_posted))
return false;
Expand Down

0 comments on commit 8968a36

Please sign in to comment.