summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_debug.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-03-20 19:54:25 +0100
committerEric Anholt <eric@anholt.net>2009-04-02 00:22:07 +0200
commit5e118f4139feafe97e913df67b1f7c1e5083e535 (patch)
treea4d73fb1bb51083ab95b6167c6a8c621f6245a63 /drivers/gpu/drm/i915/i915_gem_debug.c
parentdrm/i915: Fix SDVO TV support (diff)
downloadlinux-5e118f4139feafe97e913df67b1f7c1e5083e535.tar.xz
linux-5e118f4139feafe97e913df67b1f7c1e5083e535.zip
drm/i915: Add a spinlock to protect the active_list
This is a baby-step in the direction of having finer-grained locking than the struct_mutex. Specifically, this will enable new debugging code to read the active list for printing out GPU state when the GPU is wedged, (while the struct_mutex is held, of course). Signed-off-by: Carl Worth <cworth@cworth.org> [anholt: indentation fix] Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_debug.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_debug.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_debug.c b/drivers/gpu/drm/i915/i915_gem_debug.c
index 131c088f8c8a..8d0b943e2c5a 100644
--- a/drivers/gpu/drm/i915/i915_gem_debug.c
+++ b/drivers/gpu/drm/i915/i915_gem_debug.c
@@ -105,12 +105,14 @@ i915_dump_lru(struct drm_device *dev, const char *where)
struct drm_i915_gem_object *obj_priv;
DRM_INFO("active list %s {\n", where);
+ spin_lock(&dev_priv->mm.active_list_lock);
list_for_each_entry(obj_priv, &dev_priv->mm.active_list,
list)
{
DRM_INFO(" %p: %08x\n", obj_priv,
obj_priv->last_rendering_seqno);
}
+ spin_unlock(&dev_priv->mm.active_list_lock);
DRM_INFO("}\n");
DRM_INFO("flushing list %s {\n", where);
list_for_each_entry(obj_priv, &dev_priv->mm.flushing_list,