From 8090a65e2df522e54bf9e4d63dc6ab1ceee19910 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 24 Jul 2015 12:16:02 +0100 Subject: [PATCH] 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 --- 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 24c82101..16f49ba2 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -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; }