diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-14 16:50:25 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-10-05 09:32:07 -0700 |
commit | 485571eb15c87439d56c4bd6ace25ee63d432726 (patch) | |
tree | b38d5a7271a4998227813d15e02b7c856dcc1fc9 | |
parent | a0cea65ea326b6a87487349e04d1b6dd513b9c3b (diff) |
drm/i915: Add buffer to inactive list immediately during fault
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@chris-wilson.co.uk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 81cc7ac745a..f19abbe624d 100644 --- 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 *vma, struct vm_fault *vmf) 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? */ |