@@ -1471,11 +1471,23 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
return 0;
}
+static int context_show(int id, void *p, void *data)
+{
+ struct i915_hw_context *ctx = p;
+ struct seq_file *m = data;
+
+ seq_printf(m, "context = %d\n", id);
+ describe_obj(m, ctx->obj);
+ seq_printf(m, "\n");
+ return 0;
+}
+
static int i915_context_status(struct seq_file *m, void *unused)
{
struct drm_info_node *node = (struct drm_info_node *) m->private;
struct drm_device *dev = node->minor->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
+ struct drm_file *file;
struct intel_ring_buffer *ring;
int ret, i;
@@ -1503,6 +1515,13 @@ static int i915_context_status(struct seq_file *m, void *unused)
}
}
+ list_for_each_entry(file, &dev->filelist, lhead) {
+ struct drm_i915_file_private *file_priv = file->driver_priv;
+ seq_printf(m, "File = %p ", file);
+ idr_for_each(&file_priv->context_idr, context_show, m);
+ seq_printf(m, "\n");
+ }
+
mutex_unlock(&dev->mode_config.mutex);
return 0;
Signed-off-by: Ben Widawsky <ben@bwidawsk.net> --- drivers/gpu/drm/i915/i915_debugfs.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)