aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2016-12-17 19:10:35 +0100
committerBas Nieuwenhuizen <[email protected]>2016-12-18 20:52:20 +0100
commit71dabe1c16f5a6ae5784c1de46cf965fb3d8b753 (patch)
treebc633557f417b7edf50a296dfbae568593144993 /src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
parentd028bd7b55c39fa714a48998bbcbb04ec86afe48 (diff)
radv/winsys: Make WaitIdle queue aware.
Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c')
-rw-r--r--src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
index 1ae78ac8d17..35b6bc57a42 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
@@ -301,8 +301,10 @@ do_winsys_init(struct radv_amdgpu_winsys *ws, int fd)
ws->info.num_tile_pipes = radv_cik_get_num_tile_pipes(&ws->amdinfo);
ws->info.pipe_interleave_bytes = 256 << ((ws->amdinfo.gb_addr_cfg >> 4) & 0x7);
ws->info.has_virtual_memory = TRUE;
- ws->info.sdma_rings = util_bitcount(dma.available_rings);
- ws->info.compute_rings = util_bitcount(compute.available_rings);
+ ws->info.sdma_rings = MIN2(util_bitcount(dma.available_rings),
+ MAX_RINGS_PER_TYPE);
+ ws->info.compute_rings = MIN2(util_bitcount(compute.available_rings),
+ MAX_RINGS_PER_TYPE);
/* Get the number of good compute units. */
ws->info.num_good_compute_units = 0;