aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_debugfs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-04-24 10:47:30 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-03 05:18:11 -0400
commit1b50247a8ddde4af5aaa0e6bc125615372ce6c16 (patch)
tree98f5a6a590242476b863e1a3caffa6ea8fcdba58 /drivers/gpu/drm/i915/i915_debugfs.c
parenta39d7efc6200d05b9ca3cfeec5dd82f6dd03f4e8 (diff)
drm/i915: Remove the list of pinned inactive objects
Simplify object tracking by removing the inactive but pinned list. The only place where this was used is for counting the available memory, which is just as easy performed by checking all objects on the rare occasions it is required (application startup). For ease of debugging, we keep the reporting of pinned objects through the error-state and debugfs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 54a10667fe82..ecf746837b23 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -178,10 +178,6 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data)
178 seq_printf(m, "Inactive:\n"); 178 seq_printf(m, "Inactive:\n");
179 head = &dev_priv->mm.inactive_list; 179 head = &dev_priv->mm.inactive_list;
180 break; 180 break;
181 case PINNED_LIST:
182 seq_printf(m, "Pinned:\n");
183 head = &dev_priv->mm.pinned_list;
184 break;
185 case FLUSHING_LIST: 181 case FLUSHING_LIST:
186 seq_printf(m, "Flushing:\n"); 182 seq_printf(m, "Flushing:\n");
187 head = &dev_priv->mm.flushing_list; 183 head = &dev_priv->mm.flushing_list;
@@ -252,11 +248,6 @@ static int i915_gem_object_info(struct seq_file *m, void* data)
252 count, mappable_count, size, mappable_size); 248 count, mappable_count, size, mappable_size);
253 249
254 size = count = mappable_size = mappable_count = 0; 250 size = count = mappable_size = mappable_count = 0;
255 count_objects(&dev_priv->mm.pinned_list, mm_list);
256 seq_printf(m, " %u [%u] pinned objects, %zu [%zu] bytes\n",
257 count, mappable_count, size, mappable_size);
258
259 size = count = mappable_size = mappable_count = 0;
260 count_objects(&dev_priv->mm.inactive_list, mm_list); 251 count_objects(&dev_priv->mm.inactive_list, mm_list);
261 seq_printf(m, " %u [%u] inactive objects, %zu [%zu] bytes\n", 252 seq_printf(m, " %u [%u] inactive objects, %zu [%zu] bytes\n",
262 count, mappable_count, size, mappable_size); 253 count, mappable_count, size, mappable_size);
@@ -294,6 +285,7 @@ static int i915_gem_gtt_info(struct seq_file *m, void* data)
294{ 285{
295 struct drm_info_node *node = (struct drm_info_node *) m->private; 286 struct drm_info_node *node = (struct drm_info_node *) m->private;
296 struct drm_device *dev = node->minor->dev; 287 struct drm_device *dev = node->minor->dev;
288 uintptr_t list = (uintptr_t) node->info_ent->data;
297 struct drm_i915_private *dev_priv = dev->dev_private; 289 struct drm_i915_private *dev_priv = dev->dev_private;
298 struct drm_i915_gem_object *obj; 290 struct drm_i915_gem_object *obj;
299 size_t total_obj_size, total_gtt_size; 291 size_t total_obj_size, total_gtt_size;
@@ -305,6 +297,9 @@ static int i915_gem_gtt_info(struct seq_file *m, void* data)
305 297
306 total_obj_size = total_gtt_size = count = 0; 298 total_obj_size = total_gtt_size = count = 0;
307 list_for_each_entry(obj, &dev_priv->mm.gtt_list, gtt_list) { 299 list_for_each_entry(obj, &dev_priv->mm.gtt_list, gtt_list) {
300 if (list == PINNED_LIST && obj->pin_count == 0)
301 continue;
302
308 seq_printf(m, " "); 303 seq_printf(m, " ");
309 describe_obj(m, obj); 304 describe_obj(m, obj);
310 seq_printf(m, "\n"); 305 seq_printf(m, "\n");
@@ -321,7 +316,6 @@ static int i915_gem_gtt_info(struct seq_file *m, void* data)
321 return 0; 316 return 0;
322} 317}
323 318
324
325static int i915_gem_pageflip_info(struct seq_file *m, void *data) 319static int i915_gem_pageflip_info(struct seq_file *m, void *data)
326{ 320{
327 struct drm_info_node *node = (struct drm_info_node *) m->private; 321 struct drm_info_node *node = (struct drm_info_node *) m->private;
@@ -1842,10 +1836,10 @@ static struct drm_info_list i915_debugfs_list[] = {
1842 {"i915_capabilities", i915_capabilities, 0}, 1836 {"i915_capabilities", i915_capabilities, 0},
1843 {"i915_gem_objects", i915_gem_object_info, 0}, 1837 {"i915_gem_objects", i915_gem_object_info, 0},
1844 {"i915_gem_gtt", i915_gem_gtt_info, 0}, 1838 {"i915_gem_gtt", i915_gem_gtt_info, 0},
1839 {"i915_gem_pinned", i915_gem_gtt_info, 0, (void *) PINNED_LIST},
1845 {"i915_gem_active", i915_gem_object_list_info, 0, (void *) ACTIVE_LIST}, 1840 {"i915_gem_active", i915_gem_object_list_info, 0, (void *) ACTIVE_LIST},
1846 {"i915_gem_flushing", i915_gem_object_list_info, 0, (void *) FLUSHING_LIST}, 1841 {"i915_gem_flushing", i915_gem_object_list_info, 0, (void *) FLUSHING_LIST},
1847 {"i915_gem_inactive", i915_gem_object_list_info, 0, (void *) INACTIVE_LIST}, 1842 {"i915_gem_inactive", i915_gem_object_list_info, 0, (void *) INACTIVE_LIST},
1848 {"i915_gem_pinned", i915_gem_object_list_info, 0, (void *) PINNED_LIST},
1849 {"i915_gem_deferred_free", i915_gem_object_list_info, 0, (void *) DEFERRED_FREE_LIST}, 1843 {"i915_gem_deferred_free", i915_gem_object_list_info, 0, (void *) DEFERRED_FREE_LIST},
1850 {"i915_gem_pageflip", i915_gem_pageflip_info, 0}, 1844 {"i915_gem_pageflip", i915_gem_pageflip_info, 0},
1851 {"i915_gem_request", i915_gem_request_info, 0}, 1845 {"i915_gem_request", i915_gem_request_info, 0},