Commit cffa781e authored by Chris Wilson's avatar Chris Wilson

drm/i915: Simplify check for idleness in hangcheck

Having fixed the tracking of the engine's last_submitted_seqno, we can
now rely on it for detecting when the engine is idle (and not have to
touch the requests pointer).

Testcase: igt/gem_exec_whisper
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1460010558-10705-9-git-send-email-chris@chris-wilson.co.ukReviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
parent 7c90b7de
...@@ -2805,9 +2805,8 @@ static void gen8_disable_vblank(struct drm_device *dev, unsigned int pipe) ...@@ -2805,9 +2805,8 @@ static void gen8_disable_vblank(struct drm_device *dev, unsigned int pipe)
static bool static bool
ring_idle(struct intel_engine_cs *engine, u32 seqno) ring_idle(struct intel_engine_cs *engine, u32 seqno)
{ {
return (list_empty(&engine->request_list) || return i915_seqno_passed(seqno,
i915_seqno_passed(seqno, READ_ONCE(engine->last_submitted_seqno));
READ_ONCE(engine->last_submitted_seqno)));
} }
static bool static bool
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment