gallium/radeon: Don't assign virtual address space for BO that already has one.
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 15 Aug 2012 13:59:07 +0000 (15:59 +0200)
committerMichel Dänzer <michel@daenzer.net>
Thu, 16 Aug 2012 09:58:24 +0000 (11:58 +0200)
We'd end up re-using the old one and throwing away the new one anyway, but only
after a roundtrip to the kernel.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/winsys/radeon/drm/radeon_drm_bo.c

index 9bddcd347c31835d1cd85ac3d559a35edba5b4d3..090a6faf50db93838dd60291e0ac63b5650091cb 100644 (file)
@@ -905,7 +905,7 @@ done:
     if (stride)
         *stride = whandle->stride;
 
-    if (mgr->va) {
+    if (mgr->va && !bo->va) {
         struct drm_radeon_gem_va va;
 
         bo->va_size = ((bo->base.size + 4095) & ~4095);