From 30449829c0347dc7dbe29acb13e49e2f2cb72ae9 Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Mon, 27 Jul 2009 19:24:13 +0200 Subject: libdrm/nouveau: unmap before ufree means nvbo->sysmem != NULL, which inbalances cpu_prep/cpu_finish - The bo was mapped with sysmem == NULL, so this means cpu prep is called. - The bo was unmapped with sysmem != NULL, so this means cpu finish is not called. - This can lead to a non-zero "cpu writers" count in ttm_bo. --- libdrm/nouveau/nouveau_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libdrm/nouveau/nouveau_bo.c') diff --git a/libdrm/nouveau/nouveau_bo.c b/libdrm/nouveau/nouveau_bo.c index fea3a7de..6c8f6b0d 100644 --- a/libdrm/nouveau/nouveau_bo.c +++ b/libdrm/nouveau/nouveau_bo.c @@ -904,8 +904,8 @@ nouveau_bo_emit_buffer(struct nouveau_channel *chan, struct nouveau_bo *bo) nvbo->sysmem = sysmem_tmp; memcpy(bo->map, nvbo->sysmem, nvbo->base.size); - nouveau_bo_unmap(bo); nouveau_bo_ufree(nvbo); + nouveau_bo_unmap(bo); } } -- cgit v1.2.3