sna: Only reset the bo->needs_flush flag if the buffer is busy-write

Since the kernel now differentiates whether the buffer is busy for
read/write, we can use that knowledge to better set our own
bo->needs_flush flag only when there are outstanding writes to the
buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-07-24 12:16:02 +01:00
parent 4cc2fb8fbf
commit 8090a65e2d
1 changed files with 1 additions and 1 deletions

View File

@ -2988,7 +2988,7 @@ static bool __kgem_bo_flush(struct kgem *kgem, struct kgem_bo *bo)
__FUNCTION__, bo->handle));
list_add(&bo->request, &kgem->flushing);
bo->rq = MAKE_REQUEST(kgem, !!(busy.busy & ~0x1ffff));
bo->needs_flush = true;
bo->needs_flush = busy.busy & 0xffff;
kgem->need_retire = true;
return true;
}