mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 14:50:10 +01:00
ac/gpu_info: Fix broken UVD firmware query
UVD and VCE are separated engines, and not co-exist with VCNs
Fixes: c34cfc1a3b (ac/gpu_info: update multimedia info)
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28863>
This commit is contained in:
parent
f0ddba819f
commit
dc85832c35
1 changed files with 18 additions and 14 deletions
|
|
@ -760,20 +760,24 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
|
|||
info->vcn_enc_major_version = (vidip_fw_version & 0x00F00000) >> 20;
|
||||
info->vcn_enc_minor_version = (vidip_fw_version & 0x000FF000) >> 12;
|
||||
}
|
||||
} else if (info->ip[AMD_IP_VCE].num_queues) {
|
||||
r = amdgpu_query_firmware_version(dev, AMDGPU_INFO_FW_VCE, 0, 0, &vidip_fw_version, &vidip_fw_feature);
|
||||
if (r) {
|
||||
fprintf(stderr, "amdgpu: amdgpu_query_firmware_version(vce) failed.\n");
|
||||
return false;
|
||||
} else
|
||||
info->vce_fw_version = vidip_fw_version;
|
||||
} else if (info->ip[AMD_IP_UVD].num_queues) {
|
||||
r = amdgpu_query_firmware_version(dev, AMDGPU_INFO_FW_UVD, 0, 0, &vidip_fw_version, &vidip_fw_feature);
|
||||
if (r) {
|
||||
fprintf(stderr, "amdgpu: amdgpu_query_firmware_version(uvd) failed.\n");
|
||||
return false;
|
||||
} else
|
||||
info->uvd_fw_version = vidip_fw_version;
|
||||
} else {
|
||||
if (info->ip[AMD_IP_VCE].num_queues) {
|
||||
r = amdgpu_query_firmware_version(dev, AMDGPU_INFO_FW_VCE, 0, 0, &vidip_fw_version, &vidip_fw_feature);
|
||||
if (r) {
|
||||
fprintf(stderr, "amdgpu: amdgpu_query_firmware_version(vce) failed.\n");
|
||||
return false;
|
||||
} else
|
||||
info->vce_fw_version = vidip_fw_version;
|
||||
}
|
||||
|
||||
if (info->ip[AMD_IP_UVD].num_queues) {
|
||||
r = amdgpu_query_firmware_version(dev, AMDGPU_INFO_FW_UVD, 0, 0, &vidip_fw_version, &vidip_fw_feature);
|
||||
if (r) {
|
||||
fprintf(stderr, "amdgpu: amdgpu_query_firmware_version(uvd) failed.\n");
|
||||
return false;
|
||||
} else
|
||||
info->uvd_fw_version = vidip_fw_version;
|
||||
}
|
||||
}
|
||||
|
||||
r = amdgpu_query_sw_info(dev, amdgpu_sw_info_address32_hi, &info->address32_hi);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue