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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Oscar Mateo <oscar.mateo@xxxxxxxxx>

Signed-off-by: Oscar Mateo <oscar.mateo@xxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux