OSDN Git Service

libdrm/nouveau: unmap before ufree means nvbo->sysmem != NULL, which inbalances cpu_p...
authorMaarten Maathuis <madman2003@gmail.com>
Mon, 27 Jul 2009 17:24:13 +0000 (19:24 +0200)
committerMaarten Maathuis <madman2003@gmail.com>
Mon, 27 Jul 2009 17:24:13 +0000 (19:24 +0200)
- 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

index fea3a7d..6c8f6b0 100644 (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);
                }
        }