[Intel-gfx] [PATCH] drm/i915: Increase debugging detail for LRU
Chris Wilson
chris at chris-wilson.co.uk
Wed Feb 11 15:26:40 CET 2009
Dump the lists after retiring requests and update the list output to
include offset, read/write domains and fence status.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem.c | 12 ++++++++--
drivers/gpu/drm/i915/i915_gem_debug.c | 34 ++++++++++++++++++++++++--------
2 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e88f68b..9fbfaab 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -996,8 +996,10 @@ i915_gem_retire_request(struct drm_device *dev,
return;
#if WATCH_LRU
- DRM_INFO("%s: retire %d moves to inactive list %p\n",
- __func__, request->seqno, obj);
+ DRM_INFO("%s: retire %d moves to %s list %p\n",
+ __func__, request->seqno,
+ obj->write_domain != 0 ? "flushing" : "inactive",
+ obj);
#endif
if (obj->write_domain != 0)
@@ -1053,6 +1055,10 @@ i915_gem_retire_requests(struct drm_device *dev)
} else
break;
}
+
+#if WATCH_LRU
+ i915_dump_lru(dev, __func__);
+#endif
}
void
@@ -2630,7 +2636,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
i915_gem_object_move_to_active(obj, seqno);
#if WATCH_LRU
- DRM_INFO("%s: move to exec list %p\n", __func__, obj);
+ DRM_INFO("%s: move to active list %p\n", __func__, obj);
#endif
}
#if WATCH_LRU
diff --git a/drivers/gpu/drm/i915/i915_gem_debug.c b/drivers/gpu/drm/i915/i915_gem_debug.c
index 131c088..21e9565 100644
--- a/drivers/gpu/drm/i915/i915_gem_debug.c
+++ b/drivers/gpu/drm/i915/i915_gem_debug.c
@@ -105,24 +105,40 @@ i915_dump_lru(struct drm_device *dev, const char *where)
struct drm_i915_gem_object *obj_priv;
DRM_INFO("active list %s {\n", where);
- list_for_each_entry(obj_priv, &dev_priv->mm.active_list,
- list)
- {
- DRM_INFO(" %p: %08x\n", obj_priv,
+ list_for_each_entry(obj_priv, &dev_priv->mm.active_list, list) {
+ struct drm_gem_object *obj = obj_priv->obj;
+ DRM_INFO(" %s%p: %08x %08x %08x %08x\n",
+ obj_priv->fence_reg != I915_FENCE_REG_NONE ? "*" : " ",
+ obj,
+ obj_priv->gtt_offset,
+ obj->read_domains,
+ obj->write_domain,
obj_priv->last_rendering_seqno);
}
DRM_INFO("}\n");
+
DRM_INFO("flushing list %s {\n", where);
- list_for_each_entry(obj_priv, &dev_priv->mm.flushing_list,
- list)
- {
- DRM_INFO(" %p: %08x\n", obj_priv,
+ list_for_each_entry(obj_priv, &dev_priv->mm.flushing_list, list) {
+ struct drm_gem_object *obj = obj_priv->obj;
+ DRM_INFO(" %s%p: %08x %08x %08x %08x\n",
+ obj_priv->fence_reg != I915_FENCE_REG_NONE ? "*" : " ",
+ obj_priv,
+ obj_priv->gtt_offset,
+ obj->read_domains,
+ obj->write_domain,
obj_priv->last_rendering_seqno);
}
DRM_INFO("}\n");
+
DRM_INFO("inactive %s {\n", where);
list_for_each_entry(obj_priv, &dev_priv->mm.inactive_list, list) {
- DRM_INFO(" %p: %08x\n", obj_priv,
+ struct drm_gem_object *obj = obj_priv->obj;
+ DRM_INFO(" %s%p: %08x %08x %08x %08x\n",
+ obj_priv->fence_reg != I915_FENCE_REG_NONE ? "*" : " ",
+ obj_priv,
+ obj_priv->gtt_offset,
+ obj->read_domains,
+ obj->write_domain,
obj_priv->last_rendering_seqno);
}
DRM_INFO("}\n");
--
1.6.0.4
More information about the Intel-gfx
mailing list