[058/136] drm/i915: Add buffer to inactive list immediately during fault

From: Greg KH
Date: Thu Oct 01 2009 - 21:52:22 EST


2.6.31-stable review patch. If anyone has any objections, please let us know.

------------------
From: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

commit 4960aaca14010b9ff92e5726dd178cbd6805d412 upstream.

If we failed to set the domain, the buffer was no longer being tracked
on any list.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/gpu/drm/i915/i915_gem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1155,14 +1155,13 @@ int i915_gem_fault(struct vm_area_struct
mutex_unlock(&dev->struct_mutex);
return VM_FAULT_SIGBUS;
}
+ list_add_tail(&obj_priv->list, &dev_priv->mm.inactive_list);

ret = i915_gem_object_set_to_gtt_domain(obj, write);
if (ret) {
mutex_unlock(&dev->struct_mutex);
return VM_FAULT_SIGBUS;
}
-
- list_add_tail(&obj_priv->list, &dev_priv->mm.inactive_list);
}

/* Need a new fence register? */


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/