aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-07-01 00:17:36 +0200
committerMarek Olšák <[email protected]>2016-07-05 00:47:13 +0200
commit8a4ace4a47a07323997da5c2dbc865a32df52451 (patch)
tree199241d82bf4465dbfb73074465ec406166540e6 /src/gallium/winsys/radeon
parent027ad71b57a0bec882c604027dc83f42eb2eb54c (diff)
gallium/radeon: add and use radeon_info::max_alloc_size (v2)
v2: - squashed the patches - use INT_MAX - clamp max_const_buffer_size - check the DRM version in radeon Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Vedran Miletić <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_winsys.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index c4d28ffe4e4..1b32c377452 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -373,6 +373,10 @@ 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.max_alloc_size = MAX2(ws->info.vram_size, ws->info.gart_size);
+ if (ws->info.drm_minor < 40)
+ ws->info.max_alloc_size = MIN2(ws->info.max_alloc_size, 256*1024*1024);
+
/* Get max clock frequency info and convert it to MHz */
radeon_get_drm_value(ws->fd, RADEON_INFO_MAX_SCLK, NULL,
&ws->info.max_shader_clock);