drm/i915: Double check the active status on the batch pool
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 Aug 2016 15:32:19 +0000 (16:32 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 Aug 2016 19:19:50 +0000 (20:19 +0100)
commit115003e9ff0454687af35b9cb16ba970bf28dc61
tree79b421f8ccd321facc0133c7f79743ccf16b9f8c
parente522ac2324f384e1fafd1a4ae6ebf38095dc6695
drm/i915: Double check the active status on the batch pool

We should not rely on obj->active being uptodate unless we manually
flush it. Instead, we can verify that the next available batch object is
idle by looking at its last active request (and checking it for
completion).

v2: remove the struct drm_device forward declaration added in the
process of removing its necessity

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470324762-2545-3-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_batch_pool.c
drivers/gpu/drm/i915/i915_gem_batch_pool.h
drivers/gpu/drm/i915/intel_engine_cs.c