[Intel-gfx] [PATCH 52/66] drm/i915: dump error state based on capture

Ben Widawsky ben at bwidawsk.net
Fri Jun 28 01:30:53 CEST 2013


In case something bad happens to the rings on init after a reset, but
debugfs is still available - we should still dump the information. This
is only possible with the change to do more teardown on reset.

NOTE: I've hit this in development, but it should be very unlikely once
the patches are stable.

Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 60d2a94..15f29de 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -815,7 +815,6 @@ static int i915_error_state(struct i915_error_state_file_priv *error_priv,
 	struct drm_device *dev = error_priv->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
 	struct drm_i915_error_state *error = error_priv->error;
-	struct intel_ring_buffer *ring;
 	int i, j, page, offset, elt;
 
 	if (!error) {
@@ -849,8 +848,9 @@ static int i915_error_state(struct i915_error_state_file_priv *error_priv,
 	if (INTEL_INFO(dev)->gen == 7)
 		err_printf(m, "ERR_INT: 0x%08x\n", error->err_int);
 
-	for_each_ring(ring, dev_priv, i)
-		i915_ring_error_state(m, dev, error, i);
+	for (i = 0; i < I915_NUM_RINGS; i++)
+		if (error->ring[i].ringbuffer)
+			i915_ring_error_state(m, dev, error, i);
 
 	if (error->active_bo)
 		print_error_buffers(m, "Active",
-- 
1.8.3.1




More information about the Intel-gfx mailing list