From 75c425e511104136e564efbae5afc41c05ac5d57 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 27 Jan 2017 12:11:33 +0100 Subject: [PATCH] winsys/radeon: clamp vram_vis_size to 256MB MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit the value from the kernel is wrong Reviewed-by: Nicolai Hähnle --- src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */ -- 2.30.2