diff options
author | Marek Olšák <[email protected]> | 2018-06-08 19:09:02 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-06-19 12:52:28 -0400 |
commit | a2451a4c2343acf0e6b79a50a8bd2febd2572cc6 (patch) | |
tree | 8c1f8c5f0ee33b786fae3e99838a081e9ee81d84 /src/amd/common/ac_gpu_info.c | |
parent | 166c00e28e453e1510e2cabed028eb18bf7d8bd9 (diff) |
ac/gpu_info: add radeon_info::num_tcc_blocks
The values for the radeon winsys were copied from the kernel driver.
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/amd/common/ac_gpu_info.c')
-rw-r--r-- | src/amd/common/ac_gpu_info.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index e885c0538e9..40441ec0c67 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -96,6 +96,7 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev, struct radeon_info *info, struct amdgpu_gpu_info *amdinfo) { + struct drm_amdgpu_info_device device_info = {}; struct amdgpu_buffer_size_alignments alignment_info = {}; struct drm_amdgpu_info_hw_ip dma = {}, compute = {}, uvd = {}; struct drm_amdgpu_info_hw_ip uvd_enc = {}, vce = {}, vcn_dec = {}; @@ -124,6 +125,13 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev, return false; } + r = amdgpu_query_info(dev, AMDGPU_INFO_DEV_INFO, sizeof(device_info), + &device_info); + if (r) { + fprintf(stderr, "amdgpu: amdgpu_query_info(dev_info) failed.\n"); + return false; + } + r = amdgpu_query_buffer_size_alignment(dev, &alignment_info); if (r) { fprintf(stderr, "amdgpu: amdgpu_query_buffer_size_alignment failed.\n"); @@ -324,6 +332,7 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev, info->gds_gfx_partition_size = gds.gds_gfx_partition_size; /* convert the shader clock from KHz to MHz */ info->max_shader_clock = amdinfo->max_engine_clk / 1000; + info->num_tcc_blocks = device_info.num_tcc_blocks; info->max_se = amdinfo->num_shader_engines; info->max_sh_per_se = amdinfo->num_shader_arrays_per_engine; info->has_hw_decode = @@ -530,6 +539,7 @@ void ac_print_gpu_info(struct radeon_info *info) printf("Shader core info:\n"); printf(" max_shader_clock = %i\n", info->max_shader_clock); printf(" num_good_compute_units = %i\n", info->num_good_compute_units); + printf(" num_tcc_blocks = %i\n", info->num_tcc_blocks); printf(" max_se = %i\n", info->max_se); printf(" max_sh_per_se = %i\n", info->max_sh_per_se); |