drm/i915: Record the position of the request upon error
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Feb 2012 11:25:38 +0000 (11:25 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 15 Feb 2012 13:27:18 +0000 (14:27 +0100)
So that we can tally the request against the command sequence in the
ringbuffer, or merely jump to the interesting locations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c

index 45876e5bf2aa80ef34d60600ad36025733c8f0fb..fdb7ccefffbdfc77a1dc7328c2ae727e371a7bad 100644 (file)
@@ -799,9 +799,10 @@ static int i915_error_state(struct seq_file *m, void *unused)
                                   dev_priv->ring[i].name,
                                   error->ring[i].num_requests);
                        for (j = 0; j < error->ring[i].num_requests; j++) {
-                               seq_printf(m, "  seqno 0x%08x, emitted %ld\n",
+                               seq_printf(m, "  seqno 0x%08x, emitted %ld, tail 0x%08x\n",
                                           error->ring[i].requests[j].seqno,
-                                          error->ring[i].requests[j].jiffies);
+                                          error->ring[i].requests[j].jiffies,
+                                          error->ring[i].requests[j].tail);
                        }
                }
 
index 5622ec8907f7e7a00cf98c2ecf295ec06ea24d53..b8397282153b8567970c07f651250715696e1fb0 100644 (file)
@@ -183,6 +183,7 @@ struct drm_i915_error_state {
                struct drm_i915_error_request {
                        long jiffies;
                        u32 seqno;
+                       u32 tail;
                } *requests;
                int num_requests;
        } ring[I915_NUM_RINGS];
index 85504fb1a4b3edbd39e6ae7a86dc0c0910479488..afd4e03e337e130b1d68cfa53759911768120ee1 100644 (file)
@@ -975,6 +975,7 @@ static void i915_gem_record_rings(struct drm_device *dev,
                        erq = &error->ring[i].requests[count++];
                        erq->seqno = request->seqno;
                        erq->jiffies = request->emitted_jiffies;
+                       erq->tail = request->tail;
                }
        }
 }