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:
parent
c1a1cdc159
commit
4960aaca14
|
@ -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? */
|
||||
|
|
Loading…
Reference in New Issue