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.
This commit is contained in:
Maarten Maathuis 2009-07-27 19:24:13 +02:00
parent 9aed44beea
commit 30449829c0

View file

@ -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);
}
}