@@ -405,12 +405,8 @@ static void print_batch_pool_stats(struct seq_file *m,
#define count_vmas(list, member) do { \
list_for_each_entry(vma, list, member) { \
- size += i915_gem_obj_ggtt_size(vma->obj); \
+ size += vma->node.size; \
++count; \
- if (vma->obj->map_and_fenceable) { \
- mappable_size += i915_gem_obj_ggtt_size(vma->obj); \
- ++mappable_count; \
- } \
} \
} while (0)
@@ -440,15 +436,13 @@ static int i915_gem_object_info(struct seq_file *m, void* data)
seq_printf(m, "%u [%u] objects, %zu [%zu] bytes in gtt\n",
count, mappable_count, size, mappable_size);
- size = count = mappable_size = mappable_count = 0;
+ size = count = 0;
count_vmas(&vm->active_list, mm_list);
- seq_printf(m, " %u [%u] active objects, %zu [%zu] bytes\n",
- count, mappable_count, size, mappable_size);
+ seq_printf(m, " %u active objects, %zu bytes\n", count, size);
- size = count = mappable_size = mappable_count = 0;
+ size = count = 0;
count_vmas(&vm->inactive_list, mm_list);
- seq_printf(m, " %u [%u] inactive objects, %zu [%zu] bytes\n",
- count, mappable_count, size, mappable_size);
+ seq_printf(m, " %u inactive objects, %zu bytes\n", count, size);
size = count = purgeable_size = purgeable_count = 0;
list_for_each_entry(obj, &dev_priv->mm.unbound_list, global_list) {
When walking the vma of the GGTT, we already have the node size available, so no need to do a double lookup. To further simplify, just ignore the mappable counts, which will be useful for inspecting other VM later. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/i915_debugfs.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-)