diff mbox

[09/14] drm/i915: Remove check for conflicting relocation write-domains

Message ID 1354535352-3506-10-git-send-email-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Dec. 3, 2012, 11:49 a.m. UTC
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>
---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |   11 -----------
 1 file changed, 11 deletions(-)

Comments

Daniel Vetter Dec. 3, 2012, 7:18 p.m. UTC | #1
On Mon, Dec 03, 2012 at 11:49:07AM +0000, Chris Wilson wrote:
> 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>

This and the previous patch are merged to dinq, thanks.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index c77a57d..1e53828 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -159,17 +159,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;