提交 a17458fc 编写于 作者: B Ben Gamari 提交者: Eric Anholt

drm/i915: Move lock to more reasonable location

Make this consistent with the unlock statement. Also fix a
minor typo in debugfs formatting
Signed-off-by: NBen Gamari <bgamari.foss@gmail.com>
Signed-off-by: NEric Anholt <eric@anholt.net>
上级 a01c75b3
...@@ -75,11 +75,10 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data) ...@@ -75,11 +75,10 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data)
case ACTIVE_LIST: case ACTIVE_LIST:
seq_printf(m, "Active:\n"); seq_printf(m, "Active:\n");
lock = &dev_priv->mm.active_list_lock; lock = &dev_priv->mm.active_list_lock;
spin_lock(lock);
head = &dev_priv->mm.active_list; head = &dev_priv->mm.active_list;
break; break;
case INACTIVE_LIST: case INACTIVE_LIST:
seq_printf(m, "Inctive:\n"); seq_printf(m, "Inactive:\n");
head = &dev_priv->mm.inactive_list; head = &dev_priv->mm.inactive_list;
break; break;
case FLUSHING_LIST: case FLUSHING_LIST:
...@@ -91,6 +90,8 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data) ...@@ -91,6 +90,8 @@ static int i915_gem_object_list_info(struct seq_file *m, void *data)
return 0; return 0;
} }
if (lock)
spin_lock(lock);
list_for_each_entry(obj_priv, head, list) list_for_each_entry(obj_priv, head, list)
{ {
struct drm_gem_object *obj = obj_priv->obj; struct drm_gem_object *obj = obj_priv->obj;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册