summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2013-03-01 21:56:30 +1100
committerJonathan Gray <jsg@jsg.id.au>2013-03-01 21:56:30 +1100
commit3475ee6ae2086e27f1c3996e0d7a647746c275a6 (patch)
tree1c8e9aed44cc939ba71abf611b838defdea6f62b /sys/dev
parent999e3f57791f7567aba254cdd0e5e6f80709a76f (diff)
move i915_gem_object_unbind closer to linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/i915_gem.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/pci/drm/i915_gem.c b/sys/dev/pci/drm/i915_gem.c
index 89003c941dc..9f8b086c522 100644
--- a/sys/dev/pci/drm/i915_gem.c
+++ b/sys/dev/pci/drm/i915_gem.c
@@ -1292,17 +1292,16 @@ i915_gem_object_unbind(struct drm_i915_gem_object *obj)
return (EINVAL);
}
+ ret = i915_gem_object_finish_gpu(obj);
+ if (ret)
+ return ret;
+
KASSERT(obj->madv != __I915_MADV_PURGED);
i915_gem_object_finish_gtt(obj);
- /* Move the object to the CPU domain to ensure that
- * any possible CPU writes while it's not in the GTT
- * are flushed when we go to remap it. This will
- * also ensure that all pending GPU writes are finished
- * before we unbind.
- */
- ret = i915_gem_object_set_to_cpu_domain(obj, 1);
+ /* release the fence reg _after_ flushing */
+ ret = i915_gem_object_put_fence(obj);
if (ret)
return ret;