Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0da1b79 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter
Browse files

drm/i915: Suppress empty lines from debugfs/i915_gem_objects



This is just so that I don't have to read about the batch pool on
systems that are not using it! Rather than using a newline between the
kernel clients and userspace clients, just distinguish the internal
allocations with a '[k]'

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 481a3d43
Loading
Loading
Loading
Loading
+13 −13
Original line number Original line Diff line number Diff line
@@ -362,7 +362,8 @@ static int per_file_stats(int id, void *ptr, void *data)
	return 0;
	return 0;
}
}


#define print_file_stats(m, name, stats) \
#define print_file_stats(m, name, stats) do { \
	if (stats.count) \
		seq_printf(m, "%s: %u objects, %zu bytes (%zu active, %zu inactive, %zu global, %zu shared, %zu unbound)\n", \
		seq_printf(m, "%s: %u objects, %zu bytes (%zu active, %zu inactive, %zu global, %zu shared, %zu unbound)\n", \
			   name, \
			   name, \
			   stats.count, \
			   stats.count, \
@@ -371,7 +372,8 @@ static int per_file_stats(int id, void *ptr, void *data)
			   stats.inactive, \
			   stats.inactive, \
			   stats.global, \
			   stats.global, \
			   stats.shared, \
			   stats.shared, \
		   stats.unbound)
			   stats.unbound); \
} while (0)


static void print_batch_pool_stats(struct seq_file *m,
static void print_batch_pool_stats(struct seq_file *m,
				   struct drm_i915_private *dev_priv)
				   struct drm_i915_private *dev_priv)
@@ -392,7 +394,7 @@ static void print_batch_pool_stats(struct seq_file *m,
		}
		}
	}
	}


	print_file_stats(m, "batch pool", stats);
	print_file_stats(m, "[k]batch pool", stats);
}
}


#define count_vmas(list, member) do { \
#define count_vmas(list, member) do { \
@@ -478,8 +480,6 @@ static int i915_gem_object_info(struct seq_file *m, void* data)


	seq_putc(m, '\n');
	seq_putc(m, '\n');
	print_batch_pool_stats(m, dev_priv);
	print_batch_pool_stats(m, dev_priv);

	seq_putc(m, '\n');
	list_for_each_entry_reverse(file, &dev->filelist, lhead) {
	list_for_each_entry_reverse(file, &dev->filelist, lhead) {
		struct file_stats stats;
		struct file_stats stats;
		struct task_struct *task;
		struct task_struct *task;