[Intel-gfx] [PATCH] drm/i915: Show buffer status in /proc
Chris Wilson
chris at chris-wilson.co.uk
Wed Feb 11 15:26:37 CET 2009
Mark fenced and pinned buffers in the active/flushing/inactive lists.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_proc.c | 38 ++++++++++++++++++++++++++++-----
1 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_proc.c b/drivers/gpu/drm/i915/i915_gem_proc.c
index 4d1b9de..97b4f2b 100644
--- a/drivers/gpu/drm/i915/i915_gem_proc.c
+++ b/drivers/gpu/drm/i915/i915_gem_proc.c
@@ -31,6 +31,12 @@
#include "i915_drm.h"
#include "i915_drv.h"
+static const char *
+is_pinned (struct drm_i915_gem_object *obj_priv)
+{
+ return obj_priv->pin_count ? obj_priv->user_pin_count ? "P" : "p" : " ";
+}
+
static int i915_gem_active_info(char *buf, char **start, off_t offset,
int request, int *eof, void *data)
{
@@ -53,13 +59,19 @@ static int i915_gem_active_info(char *buf, char **start, off_t offset,
{
struct drm_gem_object *obj = obj_priv->obj;
if (obj->name) {
- DRM_PROC_PRINT(" %p(%d): %08x %08x %d\n",
+ DRM_PROC_PRINT(" %s%s%p(%d): %08x %08x %08x %08x %d\n",
+ obj_priv->fence_reg != I915_FENCE_REG_NONE ? "*" : " ",
+ is_pinned(obj_priv),
obj, obj->name,
+ obj_priv->gtt_offset, obj->size,
obj->read_domains, obj->write_domain,
obj_priv->last_rendering_seqno);
} else {
- DRM_PROC_PRINT(" %p: %08x %08x %d\n",
+ DRM_PROC_PRINT(" %s%s%p: %08x %08x %08x %08x %d\n",
+ obj_priv->fence_reg != I915_FENCE_REG_NONE ? "*" : " ",
+ is_pinned(obj_priv),
obj,
+ obj_priv->gtt_offset, obj->size,
obj->read_domains, obj->write_domain,
obj_priv->last_rendering_seqno);
}
@@ -92,12 +104,19 @@ static int i915_gem_flushing_info(char *buf, char **start, off_t offset,
{
struct drm_gem_object *obj = obj_priv->obj;
if (obj->name) {
- DRM_PROC_PRINT(" %p(%d): %08x %08x %d\n",
+ DRM_PROC_PRINT(" %s%s%p(%d): %08x %08x %08x %08x %d\n",
+ obj_priv->fence_reg != I915_FENCE_REG_NONE ? "*" : " ",
+ is_pinned(obj_priv),
obj, obj->name,
+ obj_priv->gtt_offset, obj->size,
obj->read_domains, obj->write_domain,
obj_priv->last_rendering_seqno);
} else {
- DRM_PROC_PRINT(" %p: %08x %08x %d\n", obj,
+ DRM_PROC_PRINT(" %s%s%p: %08x %08x %08x %08x %d\n",
+ obj_priv->fence_reg != I915_FENCE_REG_NONE ? "*" : " ",
+ is_pinned(obj_priv),
+ obj,
+ obj_priv->gtt_offset, obj->size,
obj->read_domains, obj->write_domain,
obj_priv->last_rendering_seqno);
}
@@ -130,12 +149,19 @@ static int i915_gem_inactive_info(char *buf, char **start, off_t offset,
{
struct drm_gem_object *obj = obj_priv->obj;
if (obj->name) {
- DRM_PROC_PRINT(" %p(%d): %08x %08x %d\n",
+ DRM_PROC_PRINT(" %s%s%p(%d): %08x %08x %08x %08x %d\n",
+ obj_priv->fence_reg != I915_FENCE_REG_NONE ? "*" : " ",
+ is_pinned(obj_priv),
obj, obj->name,
+ obj_priv->gtt_offset, obj->size,
obj->read_domains, obj->write_domain,
obj_priv->last_rendering_seqno);
} else {
- DRM_PROC_PRINT(" %p: %08x %08x %d\n", obj,
+ DRM_PROC_PRINT(" %s%s%p: %08x %08x %08x %08x %d\n",
+ obj_priv->fence_reg != I915_FENCE_REG_NONE ? "*" : " ",
+ is_pinned(obj_priv),
+ obj,
+ obj_priv->gtt_offset, obj->size,
obj->read_domains, obj->write_domain,
obj_priv->last_rendering_seqno);
}
--
1.6.0.4
More information about the Intel-gfx
mailing list