aboutsummaryrefslogtreecommitdiff
path: root/libdrm/nouveau/nouveau_bo.c
diff options
context:
space:
mode:
authorMaarten Maathuis <madman2003@gmail.com>2009-07-27 19:24:13 +0200
committerMaarten Maathuis <madman2003@gmail.com>2009-07-27 19:24:13 +0200
commit30449829c0347dc7dbe29acb13e49e2f2cb72ae9 (patch)
treea3291352d96a9649c88e3371a1b957b2a4a4d69d /libdrm/nouveau/nouveau_bo.c
parent9aed44beeac4f250a58c792d64a4dee1dde3d086 (diff)
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.
Diffstat (limited to 'libdrm/nouveau/nouveau_bo.c')
-rw-r--r--libdrm/nouveau/nouveau_bo.c2
1 files changed, 1 insertions, 1 deletions
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);
}
}