summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-01-27 12:11:33 +0100
committerMarek Olšák <[email protected]>2017-01-30 17:45:29 +0100
commit75c425e511104136e564efbae5afc41c05ac5d57 (patch)
treeb246bba9464a2613b347e1a0dfa9152a08fb61b3 /src
parenteba9e9dd1d24f8f495f8db1a26d8ec9028f94eec (diff)
winsys/radeon: clamp vram_vis_size to 256MB
the value from the kernel is wrong Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c2
1 files changed, 1 insertions, 1 deletions
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. */