diff options
author | Ben Widawsky <ben@bwidawsk.net> | 2011-03-19 21:14:29 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-05-10 16:56:42 -0400 |
commit | e76d3630810b0ac5b07aa7ef28428c1bc2d10861 (patch) | |
tree | 480f8a0276e0e0084d01fc01c67ac0742a90f1cd /drivers/gpu | |
parent | 7df8721beb9cbd849dce2b153e3b287c98adbb7f (diff) |
drm/i915: debugfs for context information
Currently this is only useful for the rc6 stuff. But this would also be
useful when I finally get around to the logical context + ppgtt stuff.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 87c8e29465e3..289dcbc81054 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
@@ -1186,6 +1186,30 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) | |||
1186 | return 0; | 1186 | return 0; |
1187 | } | 1187 | } |
1188 | 1188 | ||
1189 | static int i915_context_status(struct seq_file *m, void *unused) | ||
1190 | { | ||
1191 | struct drm_info_node *node = (struct drm_info_node *) m->private; | ||
1192 | struct drm_device *dev = node->minor->dev; | ||
1193 | drm_i915_private_t *dev_priv = dev->dev_private; | ||
1194 | int ret; | ||
1195 | |||
1196 | ret = mutex_lock_interruptible(&dev->mode_config.mutex); | ||
1197 | if (ret) | ||
1198 | return ret; | ||
1199 | |||
1200 | seq_printf(m, "power context "); | ||
1201 | describe_obj(m, dev_priv->pwrctx); | ||
1202 | seq_printf(m, "\n"); | ||
1203 | |||
1204 | seq_printf(m, "render context "); | ||
1205 | describe_obj(m, dev_priv->renderctx); | ||
1206 | seq_printf(m, "\n"); | ||
1207 | |||
1208 | mutex_unlock(&dev->mode_config.mutex); | ||
1209 | |||
1210 | return 0; | ||
1211 | } | ||
1212 | |||
1189 | static int | 1213 | static int |
1190 | i915_wedged_open(struct inode *inode, | 1214 | i915_wedged_open(struct inode *inode, |
1191 | struct file *filp) | 1215 | struct file *filp) |
@@ -1324,6 +1348,7 @@ static struct drm_info_list i915_debugfs_list[] = { | |||
1324 | {"i915_sr_status", i915_sr_status, 0}, | 1348 | {"i915_sr_status", i915_sr_status, 0}, |
1325 | {"i915_opregion", i915_opregion, 0}, | 1349 | {"i915_opregion", i915_opregion, 0}, |
1326 | {"i915_gem_framebuffer", i915_gem_framebuffer_info, 0}, | 1350 | {"i915_gem_framebuffer", i915_gem_framebuffer_info, 0}, |
1351 | {"i915_context_status", i915_context_status, 0}, | ||
1327 | }; | 1352 | }; |
1328 | #define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list) | 1353 | #define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list) |
1329 | 1354 | ||