aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 2bba4c25c53e..049dcb5256d1 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -301,7 +301,9 @@ static int i915_gem_stolen_list_info(struct seq_file *m, void *data)
301struct file_stats { 301struct file_stats {
302 struct drm_i915_file_private *file_priv; 302 struct drm_i915_file_private *file_priv;
303 int count; 303 int count;
304 size_t total, global, active, inactive, unbound; 304 size_t total, unbound;
305 size_t global, shared;
306 size_t active, inactive;
305}; 307};
306 308
307static int per_file_stats(int id, void *ptr, void *data) 309static int per_file_stats(int id, void *ptr, void *data)
@@ -313,6 +315,9 @@ static int per_file_stats(int id, void *ptr, void *data)
313 stats->count++; 315 stats->count++;
314 stats->total += obj->base.size; 316 stats->total += obj->base.size;
315 317
318 if (obj->base.name || obj->base.dma_buf)
319 stats->shared += obj->base.size;
320
316 if (USES_FULL_PPGTT(obj->base.dev)) { 321 if (USES_FULL_PPGTT(obj->base.dev)) {
317 list_for_each_entry(vma, &obj->vma_list, vma_link) { 322 list_for_each_entry(vma, &obj->vma_list, vma_link) {
318 struct i915_hw_ppgtt *ppgtt; 323 struct i915_hw_ppgtt *ppgtt;
@@ -450,13 +455,14 @@ static int i915_gem_object_info(struct seq_file *m, void* data)
450 */ 455 */
451 rcu_read_lock(); 456 rcu_read_lock();
452 task = pid_task(file->pid, PIDTYPE_PID); 457 task = pid_task(file->pid, PIDTYPE_PID);
453 seq_printf(m, "%s: %u objects, %zu bytes (%zu active, %zu inactive, %zu global, %zu unbound)\n", 458 seq_printf(m, "%s: %u objects, %zu bytes (%zu active, %zu inactive, %zu global, %zu shared, %zu unbound)\n",
454 task ? task->comm : "<unknown>", 459 task ? task->comm : "<unknown>",
455 stats.count, 460 stats.count,
456 stats.total, 461 stats.total,
457 stats.active, 462 stats.active,
458 stats.inactive, 463 stats.inactive,
459 stats.global, 464 stats.global,
465 stats.shared,
460 stats.unbound); 466 stats.unbound);
461 rcu_read_unlock(); 467 rcu_read_unlock();
462 } 468 }