drm/i915: Only show view type for GGTT VMAs
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 27 May 2015 09:52:32 +0000 (10:52 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 29 May 2015 08:15:26 +0000 (10:15 +0200)
Printing it for PPGTT VMAs only adds noise since we have defined
view types are only applicable for GGTT.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c

index 88cc793c46d36777ca07331c18c2f4634b3aab7e..3e17210c3277e1a1bee1d7e8bd6db5024ec4ab15 100644 (file)
@@ -156,13 +156,13 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
        if (obj->fence_reg != I915_FENCE_REG_NONE)
                seq_printf(m, " (fence: %d)", obj->fence_reg);
        list_for_each_entry(vma, &obj->vma_list, vma_link) {
-               if (!i915_is_ggtt(vma->vm))
-                       seq_puts(m, " (pp");
+               seq_printf(m, " (%sgtt offset: %08llx, size: %08llx",
+                          i915_is_ggtt(vma->vm) ? "g" : "pp",
+                          vma->node.start, vma->node.size);
+               if (i915_is_ggtt(vma->vm))
+                       seq_printf(m, ", type: %u)", vma->ggtt_view.type);
                else
-                       seq_puts(m, " (g");
-               seq_printf(m, "gtt offset: %08llx, size: %08llx, type: %u)",
-                          vma->node.start, vma->node.size,
-                          vma->ggtt_view.type);
+                       seq_puts(m, ")");
        }
        if (obj->stolen)
                seq_printf(m, " (stolen: %08llx)", obj->stolen->start);