drm/i915: Check signaled state after enabling signaling
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 8 Jun 2017 11:14:02 +0000 (12:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 8 Jun 2017 11:33:08 +0000 (12:33 +0100)
commit9f90ff392877581e2c9b54a2d5ecfd1f50d1f170
tree1fe7a750cabdfc7a1473aa9417f71fbc3ce55d99
parentc4a8952612f6c1c28bab200c45d773e08dfd24d5
drm/i915: Check signaled state after enabling signaling

Setting up the irq to signal the request completion takes a finite
amount of time, during which it is possible that the request already
completed. Check afterwards, just in case, so that we can respond
immediately.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170608111405.16466-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_request.c