mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
ac/gpu_info: query the number of ip instance
query the number of ip instances for VCN and JPEG v2: use num_queues and remove new variable (Marek) v3: remove whitespace (Leo) v4: remove redundant print jpeg_decode (Marek) Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27884>
This commit is contained in:
parent
29df85788a
commit
f3ab454f07
1 changed files with 14 additions and 1 deletions
|
|
@ -292,6 +292,11 @@ static int amdgpu_query_hw_ip_info(amdgpu_device_handle dev, unsigned type,
|
|||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static int amdgpu_query_hw_ip_count(amdgpu_device_handle dev, unsigned type,
|
||||
uint32_t *count)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
static int amdgpu_query_heap_info(amdgpu_device_handle dev, uint32_t heap,
|
||||
uint32_t flags, struct amdgpu_heap_info *info)
|
||||
{
|
||||
|
|
@ -678,7 +683,15 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
|
|||
device_info.family == FAMILY_MDN)
|
||||
info->ip[AMD_IP_GFX].ver_minor = info->ip[AMD_IP_COMPUTE].ver_minor = 3;
|
||||
}
|
||||
info->ip[ip_type].num_queues = util_bitcount(ip_info.available_rings);
|
||||
if (ip_type >= AMD_IP_VCN_DEC && ip_type <= AMD_IP_VCN_JPEG) {
|
||||
uint32_t num_inst;
|
||||
r = amdgpu_query_hw_ip_count(dev, ip_type, &num_inst);
|
||||
if (r)
|
||||
fprintf(stderr, "amdgpu: failed to query ip count for vcn or jpeg\n");
|
||||
else
|
||||
info->ip[ip_type].num_queues = num_inst;
|
||||
} else
|
||||
info->ip[ip_type].num_queues = util_bitcount(ip_info.available_rings);
|
||||
|
||||
/* According to the kernel, only SDMA and VPE require 256B alignment, but use it
|
||||
* for all queues because the kernel reports wrong limits for some of the queues.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue