drm/i915: Assert the engine is idle before overwiting the HWS
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 5 Apr 2017 15:30:54 +0000 (16:30 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Apr 2017 09:10:13 +0000 (10:10 +0100)
commit2ca9faa551c4c97610bb0209e20c7231a93712ff
tree2b3430273a44ee92ceb7efdb81e5a30c7f5fa9aa
parentdb5ba0d8931ee0e470805b972a905c869dc793bb
drm/i915: Assert the engine is idle before overwiting the HWS

When we update the global seqno (on the engine timeline), we modify HW
state (both registers and mapped pages). As we do this, we should be
sure that the HW is idle and we are not causing a conflict. The caller
is supposed to wait_for_idle before calling us to update the seqno, so
let's assert they have and the engine is indeed idle.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170405153055.28123-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_gem_request.c
drivers/gpu/drm/i915/intel_engine_cs.c