From: Chris Wilson Date: Thu, 7 Apr 2016 06:29:18 +0000 (+0100) Subject: drm/i915: Simplify check for idleness in hangcheck X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cffa781e5907;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Link: http://patchwork.freedesktop.org/patch/msgid/1460010558-10705-9-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala --- diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index cc9081249836..c30a12ef6daf 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2805,9 +2805,8 @@ static void gen8_disable_vblank(struct drm_device *dev, unsigned int pipe) static bool ring_idle(struct intel_engine_cs *engine, u32 seqno) { - return (list_empty(&engine->request_list) || - i915_seqno_passed(seqno, - READ_ONCE(engine->last_submitted_seqno))); + return i915_seqno_passed(seqno, + READ_ONCE(engine->last_submitted_seqno)); } static bool