diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-20 12:36:15 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-21 06:24:17 -0400 |
commit | f13d3f7311add99d1f874a6b67d56426afa35664 (patch) | |
tree | 949e7d6e4606f1b8051a8821a0694d1c5fd65027 /drivers/gpu/drm/i915/i915_debugfs.c | |
parent | 265db9585e570814d2f7aca109c5563bcde9c948 (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.c | 16 |
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 @@ | |||
40 | 40 | ||
41 | #if defined(CONFIG_DEBUG_FS) | 41 | #if defined(CONFIG_DEBUG_FS) |
42 | 42 | ||
43 | #define RENDER_LIST 1 | 43 | enum { |
44 | #define BSD_LIST 2 | 44 | RENDER_LIST, |
45 | #define FLUSHING_LIST 3 | 45 | BSD_LIST, |
46 | #define INACTIVE_LIST 4 | 46 | FLUSHING_LIST, |
47 | INACTIVE_LIST, | ||
48 | PINNED_LIST | ||
49 | }; | ||
47 | 50 | ||
48 | static const char *yesno(int v) | 51 | static const char *yesno(int v) |
49 | { | 52 | { |
@@ -150,6 +153,10 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data) | |||
150 | seq_printf(m, "Inactive:\n"); | 153 | seq_printf(m, "Inactive:\n"); |
151 | head = &dev_priv->mm.inactive_list; | 154 | head = &dev_priv->mm.inactive_list; |
152 | break; | 155 | break; |
156 | case PINNED_LIST: | ||
157 | seq_printf(m, "Pinned:\n"); | ||
158 | head = &dev_priv->mm.pinned_list; | ||
159 | break; | ||
153 | case FLUSHING_LIST: | 160 | case FLUSHING_LIST: |
154 | seq_printf(m, "Flushing:\n"); | 161 | seq_printf(m, "Flushing:\n"); |
155 | head = &dev_priv->mm.flushing_list; | 162 | head = &dev_priv->mm.flushing_list; |
@@ -983,6 +990,7 @@ static struct drm_info_list i915_debugfs_list[] = { | |||
983 | {"i915_gem_bsd_active", i915_gem_object_list_info, 0, (void *) BSD_LIST}, | 990 | {"i915_gem_bsd_active", i915_gem_object_list_info, 0, (void *) BSD_LIST}, |
984 | {"i915_gem_flushing", i915_gem_object_list_info, 0, (void *) FLUSHING_LIST}, | 991 | {"i915_gem_flushing", i915_gem_object_list_info, 0, (void *) FLUSHING_LIST}, |
985 | {"i915_gem_inactive", i915_gem_object_list_info, 0, (void *) INACTIVE_LIST}, | 992 | {"i915_gem_inactive", i915_gem_object_list_info, 0, (void *) INACTIVE_LIST}, |
993 | {"i915_gem_pinned", i915_gem_object_list_info, 0, (void *) PINNED_LIST}, | ||
986 | {"i915_gem_pageflip", i915_gem_pageflip_info, 0}, | 994 | {"i915_gem_pageflip", i915_gem_pageflip_info, 0}, |
987 | {"i915_gem_request", i915_gem_request_info, 0}, | 995 | {"i915_gem_request", i915_gem_request_info, 0}, |
988 | {"i915_gem_seqno", i915_gem_seqno_info, 0}, | 996 | {"i915_gem_seqno", i915_gem_seqno_info, 0}, |