diff options
author | Marek Olšák <[email protected]> | 2016-07-01 00:17:36 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-07-05 00:47:13 +0200 |
commit | 8a4ace4a47a07323997da5c2dbc865a32df52451 (patch) | |
tree | 199241d82bf4465dbfb73074465ec406166540e6 /src/gallium/winsys/amdgpu | |
parent | 027ad71b57a0bec882c604027dc83f42eb2eb54c (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/amdgpu')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index b8fb4dde894..9a04cbe07fa 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -270,6 +270,8 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd) /* Set hardware information. */ ws->info.gart_size = gtt.heap_size; ws->info.vram_size = vram.heap_size; + /* TODO: the kernel reports vram/gart.max_allocation == 251 MB (bug?) */ + ws->info.max_alloc_size = MAX2(ws->info.vram_size, ws->info.gart_size); /* convert the shader clock from KHz to MHz */ ws->info.max_shader_clock = ws->amdinfo.max_engine_clk / 1000; ws->info.max_se = ws->amdinfo.num_shader_engines; |