drm/i915: Remove check for conflicting relocation write-domains
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 3 Dec 2012 11:49:07 +0000 (11:49 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 3 Dec 2012 19:13:16 +0000 (20:13 +0100)
Simply use the last write-domain set for the object in the batch,
trusting userspace to have correctly flushed the caches between usage as
a write target. This check dates back from the golden age of having only
a single operation per batch with the kernel repeating it for each
cliprect, and conflicts both with userspace trying to efficiently batch
multiple operations and with reducing the kernel overhead of relocation
processing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_execbuffer.c

index 802d925b2b576db4cce3b3cbe73bca32558879f3..6cd3e1c1629edf9e685d05a28553b2e025abdb51 100644 (file)
@@ -150,17 +150,6 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj,
                          reloc->write_domain);
                return ret;
        }
-       if (unlikely(reloc->write_domain && target_obj->pending_write_domain &&
-                    reloc->write_domain != target_obj->pending_write_domain)) {
-               DRM_DEBUG("Write domain conflict: "
-                         "obj %p target %d offset %d "
-                         "new %08x old %08x\n",
-                         obj, reloc->target_handle,
-                         (int) reloc->offset,
-                         reloc->write_domain,
-                         target_obj->pending_write_domain);
-               return ret;
-       }
 
        target_obj->pending_read_domains |= reloc->read_domains;
        target_obj->pending_write_domain |= reloc->write_domain;