sna: Be explicit when checking for an idle bo after CPU synchronisation

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-03-05 11:14:37 +00:00
parent ad4901a035
commit 60ec35b8d2
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}