winsys/radeon: clamp vram_vis_size to 256MB

the value from the kernel is wrong

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Marek Olšák
2017-01-27 12:11:33 +01:00
parent eba9e9dd1d
commit 75c425e511
@@ -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. */