winsys/radeon: clamp vram_vis_size to 256MB
authorMarek Olšák <marek.olsak@amd.com>
Fri, 27 Jan 2017 11:11:33 +0000 (12:11 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 30 Jan 2017 16:45:29 +0000 (17:45 +0100)
the value from the kernel is wrong

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c

index 278d4f3..a8da62f 100644 (file)
@@ -372,7 +372,7 @@ static bool do_winsys_init(struct radeon_drm_winsys *ws)
     }
     ws->info.gart_size = gem_info.gart_size;
     ws->info.vram_size = gem_info.vram_size;
-    ws->info.vram_vis_size = gem_info.vram_visible;
+    ws->info.vram_vis_size = MIN2(gem_info.vram_visible, 256*1024*1024);
 
     /* Radeon allocates all buffers as contigous, which makes large allocations
      * unlikely to succeed. */