Skip to content

Commit

Permalink
drm/i915: Add buffer to inactive list immediately during fault
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Wilson authored and Jesse Barnes committed Sep 17, 2009
1 parent c1a1cdc commit 4960aac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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? */
Expand Down

0 comments on commit 4960aac

Please sign in to comment.