From abb522e07a2c3bf39e2587ddedc4bb8ac955c536 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 18 Jun 2013 09:01:49 +0100 Subject: [PATCH] sna: Do not sync after a failed mapping The domain update should be a redundant operation, causing needless extra transitions. Signed-off-by: Chris Wilson --- src/sna/kgem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 41ed27de..65d12053 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -4607,7 +4607,8 @@ void *kgem_bo_map(struct kgem *kgem, struct kgem_bo *bo) DBG(("%s: converting request for GTT map into CPU map\n", __FUNCTION__)); ptr = kgem_bo_map__cpu(kgem, bo); - kgem_bo_sync__cpu(kgem, bo); + if (ptr) + kgem_bo_sync__cpu(kgem, bo); return ptr; }