From: Chris Wilson Date: Fri, 21 Jul 2017 12:32:24 +0000 (+0100) Subject: drm/i915: Check the execlist queue for pending requests before declaring idle X-Git-Tag: v4.14-rc1~8^2~20^2~135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6edb6e3b63faae5cd96993e0977d3807bd87be6;p=platform%2Fkernel%2Flinux-rpi3.git drm/i915: Check the execlist queue for pending requests before declaring idle Including a check against the execlist queue before calling the engine idle and passing hangcheck. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20170721123238.16428-6-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c index 24db316..c6ebfe7 100644 --- a/drivers/gpu/drm/i915/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/intel_engine_cs.c @@ -1283,6 +1283,10 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine) if (port_request(&engine->execlist_port[0])) return false; + /* ELSP is empty, but there are ready requests? */ + if (READ_ONCE(engine->execlist_first)) + return false; + /* Ring stopped? */ if (!ring_is_idle(engine)) return false;