From: Marek Olšák Date: Fri, 27 Jan 2017 11:11:33 +0000 (+0100) Subject: winsys/radeon: clamp vram_vis_size to 256MB X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=75c425e511104136e564efbae5afc41c05ac5d57;p=mesa.git winsys/radeon: clamp vram_vis_size to 256MB the value from the kernel is wrong Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c index 278d4f317e8..a8da62fd361 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c @@ -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. */