[Intel-gfx] [PATCH 45/49] drm/i915/bdw: Display context ringbuffer info in debugfs

oscar.mateo at intel.com oscar.mateo at intel.com
Thu Mar 27 19:00:14 CET 2014


From: Oscar Mateo <oscar.mateo at intel.com>

Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 226b630..c52108d 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1648,6 +1648,14 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
 
 	return 0;
 }
+static void describe_ctx_ringbuf(struct seq_file *m, struct i915_hw_context *ctx)
+{
+	struct intel_ringbuffer *ringbuf = ctx->ringbuf;
+
+	seq_printf(m, " (ringbuffer type: %d, space: %d, head: %u, tail: %u, last head: %d)",
+			ctx->ring_id, ringbuf->space, ringbuf->head, ringbuf->tail,
+			ringbuf->last_retired_head);
+}
 
 static int i915_context_status(struct seq_file *m, void *unused)
 {
@@ -1682,6 +1690,8 @@ static int i915_context_status(struct seq_file *m, void *unused)
 				seq_printf(m, "(default context %s) ", ring->name);
 
 		describe_obj(m, ctx->obj);
+		if (dev_priv->lrc_enabled)
+			describe_ctx_ringbuf(m, ctx);
 		seq_putc(m, '\n');
 	}
 
-- 
1.9.0




More information about the Intel-gfx mailing list