drm/i915: Add information on pinning and fencing to the i915 list debug.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, March 30, 2009 - 2:02 pm

Gitweb:     http://git.kernel.org/linus/97d479e77b8621cc6e1cb06eabe5a73390c8149c
Commit:     97d479e77b8621cc6e1cb06eabe5a73390c8149c
Parent:     30106f97a6029f94a8f13a1ace877c850cf5cd37
Author:     Eric Anholt <eric@anholt.net>
AuthorDate: Tue Feb 17 23:53:41 2009 -0800
Committer:  Dave Airlie <airlied@redhat.com>
CommitDate: Fri Mar 13 14:24:08 2009 +1000

    drm/i915: Add information on pinning and fencing to the i915 list debug.
    
    This was inspired by a patch by Chris Wilson, though none of it applied in any
    way due to the debugfs work and I decided to change the formatting of the
    new information anyway.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/i915/i915_gem_debugfs.c |   31 ++++++++++++++++++++-----------
 1 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_debugfs.c b/drivers/gpu/drm/i915/i915_gem_debugfs.c
index 4fc845c..f7e7d37 100644
--- a/drivers/gpu/drm/i915/i915_gem_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_gem_debugfs.c
@@ -70,18 +70,27 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data)
 
 	list_for_each_entry(obj_priv, head, list)
 	{
+		char *pin_description;
 		struct drm_gem_object *obj = obj_priv->obj;
-		if (obj->name) {
-			seq_printf(m, "    %p(%d): %08x %08x %d\n",
-					obj, obj->name,
-					obj->read_domains, obj->write_domain,
-					obj_priv->last_rendering_seqno);
-		} else {
-			seq_printf(m, "       %p: %08x %08x %d\n",
-					obj,
-					obj->read_domains, obj->write_domain,
-					obj_priv->last_rendering_seqno);
-		}
+
+		if (obj_priv->user_pin_count > 0)
+			pin_description = "P";
+		else if (obj_priv->pin_count > 0)
+			pin_description = "p";
+		else
+			pin_description = " ";
+
+		seq_printf(m, "    %p: %s %08x %08x %d",
+			   obj,
+			   pin_description,
+			   obj->read_domains, obj->write_domain,
+			   obj_priv->last_rendering_seqno);
+
+		if (obj->name)
+			seq_printf(m, " (name: %d)", obj->name);
+		if (obj_priv->fence_reg != I915_FENCE_REG_NONE)
+			seq_printf(m, " (fence: %d\n", obj_priv->fence_reg);
+		seq_printf(m, "\n");
 	}
 	return 0;
 }
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
drm/i915: Add information on pinning and fencing to the i9 ..., Linux Kernel Mailing ..., (Mon Mar 30, 2:02 pm)