From 60ec35b8d25ecfabf1744ea7bc81109d7f2a90e2 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 5 Mar 2013 11:14:37 +0000 Subject: [PATCH] sna: Be explicit when checking for an idle bo after CPU synchronisation Signed-off-by: Chris Wilson --- src/sna/kgem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 324df6da..16f60bb4 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -4793,7 +4793,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 (bo->exec == NULL) kgem_bo_retire(kgem, bo); bo->domain = write ? DOMAIN_CPU : DOMAIN_NONE; }