summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2013-03-03 14:02:52 +1100
committerJonathan Gray <jsg@jsg.id.au>2013-03-03 14:02:52 +1100
commitecd97f3687eb7da66429f4daa5af554c2440655b (patch)
treecae036db69cddb8ccb4f3a8c420e51a40074e644 /sys
parent8e4d992d8314d591efdddf06767b31b788d20939 (diff)
match 3.4.33 and flush in i915_gem_object_finish_gpu
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915_gem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915_gem.c b/sys/dev/pci/drm/i915_gem.c
index d14ec936a5f..8fe4db4171d 100644
--- a/sys/dev/pci/drm/i915_gem.c
+++ b/sys/dev/pci/drm/i915_gem.c
@@ -2084,6 +2084,12 @@ i915_gem_object_finish_gpu(struct drm_i915_gem_object *obj)
if ((obj->base.read_domains & I915_GEM_GPU_DOMAINS) == 0)
return 0;
+ if (obj->base.write_domain & I915_GEM_GPU_DOMAINS) {
+ ret = i915_gem_flush_ring(obj->ring, 0, obj->base.write_domain);
+ if (ret)
+ return ret;
+ }
+
ret = i915_gem_object_wait_rendering(obj, false);
if (ret)
return ret;