drm/amdgpu: refine PSP TA firmware info print in debugfs
refine PSP TA firmware info print in amdgpu_firmware_info(). Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
183b451d9f
commit
4d5ae731c4
@ -286,23 +286,23 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info,
|
||||
break;
|
||||
case AMDGPU_INFO_FW_TA:
|
||||
switch (query_fw->index) {
|
||||
case 0:
|
||||
case TA_FW_TYPE_PSP_XGMI:
|
||||
fw_info->ver = adev->psp.ta_fw_version;
|
||||
fw_info->feature = adev->psp.ta_xgmi_ucode_version;
|
||||
break;
|
||||
case 1:
|
||||
case TA_FW_TYPE_PSP_RAS:
|
||||
fw_info->ver = adev->psp.ta_fw_version;
|
||||
fw_info->feature = adev->psp.ta_ras_ucode_version;
|
||||
break;
|
||||
case 2:
|
||||
case TA_FW_TYPE_PSP_HDCP:
|
||||
fw_info->ver = adev->psp.ta_fw_version;
|
||||
fw_info->feature = adev->psp.ta_hdcp_ucode_version;
|
||||
break;
|
||||
case 3:
|
||||
case TA_FW_TYPE_PSP_DTM:
|
||||
fw_info->ver = adev->psp.ta_fw_version;
|
||||
fw_info->feature = adev->psp.ta_dtm_ucode_version;
|
||||
break;
|
||||
case 4:
|
||||
case TA_FW_TYPE_PSP_RAP:
|
||||
fw_info->ver = adev->psp.ta_fw_version;
|
||||
fw_info->feature = adev->psp.ta_rap_ucode_version;
|
||||
break;
|
||||
@ -1330,6 +1330,16 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused)
|
||||
struct atom_context *ctx = adev->mode_info.atom_context;
|
||||
int ret, i;
|
||||
|
||||
static const char *ta_fw_name[TA_FW_TYPE_MAX_INDEX] = {
|
||||
#define TA_FW_NAME(type) [TA_FW_TYPE_PSP_##type] = #type
|
||||
TA_FW_NAME(XGMI),
|
||||
TA_FW_NAME(RAS),
|
||||
TA_FW_NAME(HDCP),
|
||||
TA_FW_NAME(DTM),
|
||||
TA_FW_NAME(RAP),
|
||||
#undef TA_FW_NAME
|
||||
};
|
||||
|
||||
/* VCE */
|
||||
query_fw.fw_type = AMDGPU_INFO_FW_VCE;
|
||||
ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
|
||||
@ -1447,35 +1457,14 @@ static int amdgpu_debugfs_firmware_info_show(struct seq_file *m, void *unused)
|
||||
fw_info.feature, fw_info.ver);
|
||||
|
||||
query_fw.fw_type = AMDGPU_INFO_FW_TA;
|
||||
for (i = 0; i < 5; i++) {
|
||||
for (i = TA_FW_TYPE_PSP_XGMI; i < TA_FW_TYPE_MAX_INDEX; i++) {
|
||||
query_fw.index = i;
|
||||
ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
|
||||
if (ret)
|
||||
continue;
|
||||
switch (query_fw.index) {
|
||||
case 0:
|
||||
seq_printf(m, "TA %s feature version: 0x%08x, firmware version: 0x%08x\n",
|
||||
"RAS", fw_info.feature, fw_info.ver);
|
||||
break;
|
||||
case 1:
|
||||
seq_printf(m, "TA %s feature version: 0x%08x, firmware version: 0x%08x\n",
|
||||
"XGMI", fw_info.feature, fw_info.ver);
|
||||
break;
|
||||
case 2:
|
||||
seq_printf(m, "TA %s feature version: 0x%08x, firmware version: 0x%08x\n",
|
||||
"HDCP", fw_info.feature, fw_info.ver);
|
||||
break;
|
||||
case 3:
|
||||
seq_printf(m, "TA %s feature version: 0x%08x, firmware version: 0x%08x\n",
|
||||
"DTM", fw_info.feature, fw_info.ver);
|
||||
break;
|
||||
case 4:
|
||||
seq_printf(m, "TA %s feature version: 0x%08x, firmware version: 0x%08x\n",
|
||||
"RAP", fw_info.feature, fw_info.ver);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
seq_printf(m, "TA %s feature version: 0x%08x, firmware version: 0x%08x\n",
|
||||
ta_fw_name[i], fw_info.feature, fw_info.ver);
|
||||
}
|
||||
|
||||
/* SMC */
|
||||
|
@ -136,6 +136,7 @@ enum ta_fw_type {
|
||||
TA_FW_TYPE_PSP_DTM,
|
||||
TA_FW_TYPE_PSP_RAP,
|
||||
TA_FW_TYPE_PSP_SECUREDISPLAY,
|
||||
TA_FW_TYPE_MAX_INDEX,
|
||||
};
|
||||
|
||||
struct ta_fw_bin_desc {
|
||||
|
Loading…
x
Reference in New Issue
Block a user