Message ID | 20181121130823.4642-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/execlists: Poison the CSB after use | expand |
Quoting Chris Wilson (2018-11-21 13:08:23) > After reading the event status from the CSB, write back 0 (an invalid > value) so we can detect if the HW should signal a new event without > writing the event in the future. > > References: https://bugs.freedesktop.org/show_bug.cgi?id=108315 > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> Wrong branch, ignore this. -Chris
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 2fad093d644d..38a6c39ca957 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -1222,6 +1222,9 @@ static void process_csb(struct intel_engine_cs *engine) execlists->active); status = buf[2 * head]; + GEM_BUG_ON(!status); + GEM_DEBUG_EXEC(WRITE_ONCE(*(u32 *)(buf + 2 * head), 0)); + if (status & (GEN8_CTX_STATUS_IDLE_ACTIVE | GEN8_CTX_STATUS_PREEMPTED)) execlists_set_active(execlists,
After reading the event status from the CSB, write back 0 (an invalid value) so we can detect if the HW should signal a new event without writing the event in the future. References: https://bugs.freedesktop.org/show_bug.cgi?id=108315 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com> --- drivers/gpu/drm/i915/intel_lrc.c | 3 +++ 1 file changed, 3 insertions(+)