[Intel-gfx] [PATCH 64/66] drm/i915: Dump all ppgtt
Ben Widawsky
ben at bwidawsk.net
Fri Jun 28 01:31:05 CEST 2013
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
---
drivers/gpu/drm/i915/i915_debugfs.c | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 2dfa784..20d6265 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1814,11 +1814,22 @@ static int i915_swizzle_info(struct seq_file *m, void *data)
return 0;
}
+static int per_file_ctx(int id, void *ptr, void *data)
+{
+ struct i915_hw_context *ctx = ptr;
+ struct seq_file *m = data;
+
+ ctx->ppgtt.debug_dump(&ctx->ppgtt, m);
+
+ return 0;
+}
+
static int i915_ppgtt_info(struct seq_file *m, void *data)
{
struct drm_info_node *node = (struct drm_info_node *) m->private;
struct drm_device *dev = node->minor->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
+ struct drm_file *file;
struct intel_ring_buffer *ring;
int i, ret;
@@ -1837,12 +1848,28 @@ static int i915_ppgtt_info(struct seq_file *m, void *data)
seq_printf(m, "PP_DIR_BASE_READ: 0x%08x\n", I915_READ(RING_PP_DIR_BASE_READ(ring)));
seq_printf(m, "PP_DIR_DCLV: 0x%08x\n", I915_READ(RING_PP_DIR_DCLV(ring)));
}
+ seq_printf(m, "ECOCHK: 0x%08x\n", I915_READ(GAM_ECOCHK));
+
if (dev_priv->gtt.aliasing_ppgtt) {
struct i915_hw_ppgtt *ppgtt = dev_priv->gtt.aliasing_ppgtt;
seq_printf(m, "aliasing PPGTT:\n");
ppgtt->debug_dump(ppgtt, m);
+ } else
+ goto out;
+
+ list_for_each_entry_reverse(file, &dev->filelist, lhead) {
+ struct drm_i915_file_private *file_priv = file->driver_priv;
+ struct i915_hw_ppgtt *pvt_ppgtt;
+
+ pvt_ppgtt = &file_priv->private_default_ctx->ppgtt;
+ seq_printf(m, "proc: %s\n",
+ get_pid_task(file->pid, PIDTYPE_PID)->comm);
+ seq_puts(m, " default context:\n");
+ pvt_ppgtt->debug_dump(pvt_ppgtt, m);
+ idr_for_each(&file_priv->context_idr, per_file_ctx, m);
}
- seq_printf(m, "ECOCHK: 0x%08x\n", I915_READ(GAM_ECOCHK));
+
+out:
mutex_unlock(&dev->struct_mutex);
return 0;
--
1.8.3.1
More information about the Intel-gfx
mailing list