ac: Query the amdgpu MEC firmware version.
MEC (Micro Engine Compute) is the firmware which is responsible for the compute-only queues on AMD GPUs. It is present on GFX7 and newer. This patch will query the version of this firmware and print it among the others. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15283>
This commit is contained in:
parent
f4ec900953
commit
75a783ea73
|
@ -591,6 +591,13 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
|
|||
return false;
|
||||
}
|
||||
|
||||
r = amdgpu_query_firmware_version(dev, AMDGPU_INFO_FW_GFX_MEC, 0, 0, &info->mec_fw_version,
|
||||
&info->mec_fw_feature);
|
||||
if (r) {
|
||||
fprintf(stderr, "amdgpu: amdgpu_query_firmware_version(mec) failed.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
r = amdgpu_query_firmware_version(dev, AMDGPU_INFO_FW_GFX_PFP, 0, 0, &info->pfp_fw_version,
|
||||
&info->pfp_fw_feature);
|
||||
if (r) {
|
||||
|
@ -1390,6 +1397,8 @@ void ac_print_gpu_info(struct radeon_info *info, FILE *f)
|
|||
fprintf(f, " ib_alignment = %u\n", info->ib_alignment);
|
||||
fprintf(f, " me_fw_version = %i\n", info->me_fw_version);
|
||||
fprintf(f, " me_fw_feature = %i\n", info->me_fw_feature);
|
||||
fprintf(f, " mec_fw_version = %i\n", info->mec_fw_version);
|
||||
fprintf(f, " mec_fw_feature = %i\n", info->mec_fw_feature);
|
||||
fprintf(f, " pfp_fw_version = %i\n", info->pfp_fw_version);
|
||||
fprintf(f, " pfp_fw_feature = %i\n", info->pfp_fw_feature);
|
||||
fprintf(f, " ce_fw_version = %i\n", info->ce_fw_version);
|
||||
|
|
|
@ -134,6 +134,8 @@ struct radeon_info {
|
|||
unsigned ib_alignment; /* both start and size alignment */
|
||||
uint32_t me_fw_version;
|
||||
uint32_t me_fw_feature;
|
||||
uint32_t mec_fw_version;
|
||||
uint32_t mec_fw_feature;
|
||||
uint32_t pfp_fw_version;
|
||||
uint32_t pfp_fw_feature;
|
||||
uint32_t ce_fw_version;
|
||||
|
|
Loading…
Reference in New Issue