summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915_gem.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2013-02-26 21:45:06 +1100
committerJonathan Gray <jsg@jsg.id.au>2013-02-26 21:45:06 +1100
commit83ffe489ef0fe14cbeaeb83ad6eb0cd2ab38c18d (patch)
tree532494d418499db6e1cfe2baa6cb1f9d918b369a /sys/dev/pci/drm/i915_gem.c
parentd405facafba886d45e9b62d6cd52215743811bb7 (diff)
add some additional flushes found in linux 3.4.33
Diffstat (limited to 'sys/dev/pci/drm/i915_gem.c')
-rw-r--r--sys/dev/pci/drm/i915_gem.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915_gem.c b/sys/dev/pci/drm/i915_gem.c
index d355ffc8483..6dd3b0dfbe9 100644
--- a/sys/dev/pci/drm/i915_gem.c
+++ b/sys/dev/pci/drm/i915_gem.c
@@ -1496,8 +1496,19 @@ i915_gem_object_update_fence(struct drm_i915_gem_object *obj,
int
i915_gem_object_flush_fence(struct drm_i915_gem_object *obj)
{
+ int ret;
+
+ if (obj->fenced_gpu_access) {
+ 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;
+ }
+ }
+
if (obj->last_fenced_seqno) {
- int ret = i915_wait_seqno(obj->ring, obj->last_fenced_seqno);
+ ret = i915_wait_seqno(obj->ring, obj->last_fenced_seqno);
if (ret)
return ret;