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>
This commit is contained in:
Chris Wilson 2009-09-14 16:50:25 +01:00 committed by Jesse Barnes
parent c1a1cdc159
commit 4960aaca14
1 changed files with 1 additions and 2 deletions

View File

@ -1160,14 +1160,13 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
return VM_FAULT_SIGBUS; 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); ret = i915_gem_object_set_to_gtt_domain(obj, write);
if (ret) { if (ret) {
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
return VM_FAULT_SIGBUS; return VM_FAULT_SIGBUS;
} }
list_add_tail(&obj_priv->list, &dev_priv->mm.inactive_list);
} }
/* Need a new fence register? */ /* Need a new fence register? */