From 973bb23766cec1c9c3e2bc45b75b2a6ea94d6990 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 4 Mar 2013 11:12:01 +0000 Subject: [PATCH] sna: Always force a full CPU synchronization after writing --- src/sna/kgem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 324df6d..aa4676d 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -4778,7 +4778,9 @@ void kgem_bo_sync__cpu_full(struct kgem *kgem, struct kgem_bo *bo, bool write) { assert(bo->proxy == NULL); - if (write || bo->needs_flush) + if (bo->needs_flush) + write = true; + if (write) kgem_bo_submit(kgem, bo); if (bo->domain != DOMAIN_CPU) { @@ -4793,7 +4795,7 @@ void kgem_bo_sync__cpu_full(struct kgem *kgem, struct kgem_bo *bo, bool write) set_domain.write_domain = write ? I915_GEM_DOMAIN_CPU : 0; if (drmIoctl(kgem->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &set_domain) == 0) { - if (write || bo->needs_flush) + if (write) kgem_bo_retire(kgem, bo); bo->domain = write ? DOMAIN_CPU : DOMAIN_NONE; } -- 1.7.10.4