summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Gordon <david.s.gordon@intel.com>2015-09-25 15:59:38 +0100
committerJohn Harrison <John.C.Harrison@Intel.com>2016-06-28 17:19:10 +0100
commit27f326a40ca1803756ca18e65baebcc76ce75edc (patch)
tree47f05a7cfc2a31fae94ab56feb635fe5221b16b8
parent695290f64d9b46778a79b366d6ad80830288d80e (diff)
drm/i915: recalculate ring space after reset
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@intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 3a4d3d427254..5f42e45bc015 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -2818,5 +2818,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);
}
}