summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-09-14 16:50:25 +0100
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-17 14:43:28 -0700
commit4960aaca14010b9ff92e5726dd178cbd6805d412 (patch)
tree7795fc2e101ff49d9ad99386c1d6a8d0c1263bae
parentc1a1cdc159e211f045290f61ac95092e9708f5bc (diff)
downloadlinux-4960aaca14010b9ff92e5726dd178cbd6805d412.tar.gz
linux-4960aaca14010b9ff92e5726dd178cbd6805d412.tar.bz2
linux-4960aaca14010b9ff92e5726dd178cbd6805d412.zip
drm/i915: Add buffer to inactive list immediately during fault
If we failed to set the domain, the buffer was no longer being tracked on any list. Cc: stable@kernel.org Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c3
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 f0f6f668a61e..441088b37d9f 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1160,14 +1160,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? */