drm/i915/execlists: Reset CSB write pointer after reset
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 Jun 2018 20:12:08 +0000 (21:12 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 Jun 2018 21:55:07 +0000 (22:55 +0100)
commitf4b58f0438ba53002e2032e3817c8e847da9a9e1
tree232b69e75b4be506c19e54300a8aa61a0b2bb095
parentbc4237ec8deaaee5f75d1afa91a19bfe6f948c6f
drm/i915/execlists: Reset CSB write pointer after reset

On HW reset, the HW clears the write pointer (to 0). But since it also
writes its first CSB entry to slot 0, we need to reset the write pointer
back to the element before (so the first entry we read is 0).

This is required for the next patch, where we trust the CSB completely!

v2: Use _MASKED_FIELD
v3: Store the reset value, so that we differentiate between mmio/hwsp
transparently and without pretense.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180628201211.13837-6-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.h