summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_debugfs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-20 17:36:15 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-21 11:24:17 +0100
commitf13d3f7311add99d1f874a6b67d56426afa35664 (patch)
tree949e7d6e4606f1b8051a8821a0694d1c5fd65027 /drivers/gpu/drm/i915/i915_debugfs.c
parent265db9585e570814d2f7aca109c5563bcde9c948 (diff)
drm/i915: Track pinned objects
Keep a list of pinned objects and display it via debugfs. Now all objects that exist in the GTT are always tracked on one of the active, flushing, inactive or pinned lists. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index ac48115429ed..36f0e3630f74 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -40,10 +40,13 @@
#if defined(CONFIG_DEBUG_FS)
-#define RENDER_LIST 1
-#define BSD_LIST 2
-#define FLUSHING_LIST 3
-#define INACTIVE_LIST 4
+enum {
+ RENDER_LIST,
+ BSD_LIST,
+ FLUSHING_LIST,
+ INACTIVE_LIST,
+ PINNED_LIST
+};
static const char *yesno(int v)
{
@@ -150,6 +153,10 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data)
seq_printf(m, "Inactive:\n");
head = &dev_priv->mm.inactive_list;
break;
+ case PINNED_LIST:
+ seq_printf(m, "Pinned:\n");
+ head = &dev_priv->mm.pinned_list;
+ break;
case FLUSHING_LIST:
seq_printf(m, "Flushing:\n");
head = &dev_priv->mm.flushing_list;
@@ -983,6 +990,7 @@ static struct drm_info_list i915_debugfs_list[] = {
{"i915_gem_bsd_active", i915_gem_object_list_info, 0, (void *) BSD_LIST},
{"i915_gem_flushing", i915_gem_object_list_info, 0, (void *) FLUSHING_LIST},
{"i915_gem_inactive", i915_gem_object_list_info, 0, (void *) INACTIVE_LIST},
+ {"i915_gem_pinned", i915_gem_object_list_info, 0, (void *) PINNED_LIST},
{"i915_gem_pageflip", i915_gem_pageflip_info, 0},
{"i915_gem_request", i915_gem_request_info, 0},
{"i915_gem_seqno", i915_gem_seqno_info, 0},