[Intel-gfx] [RFC 02/37] drm/i915: recalculate ring space after reset
John.C.Harrison at Intel.com
John.C.Harrison at Intel.com
Mon Nov 23 03:41:37 PST 2015
From: Dave Gordon <david.s.gordon at intel.com>
To reinitialise a ringbuffer after a hang (or preemption), we need to not
only to not only set both h/w and s/w HEAD and TAIL to 0, but also clear
last_retired_head and recalculate the available space.
For: VIZ-2021
Signed-off-by: Dave Gordon <david.s.gordon at intel.com>
---
drivers/gpu/drm/i915/intel_lrc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index f64283f..296d900 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -2675,5 +2675,7 @@ void intel_lr_context_reset(struct drm_device *dev,
ringbuf->head = 0;
ringbuf->tail = 0;
+ ringbuf->last_retired_head = -1;
+ intel_ring_update_space(ringbuf);
}
}
--
1.9.1
More information about the Intel-gfx
mailing list