Commit f399d4de authored by Changfeng's avatar Changfeng Committed by Alex Deucher

drm/amdgpu: add ta DTM/HDCP print in amdgpu_firmware_info for apu

It needs to add ta DTM/HDCP print to get HDCP/DTM version info when cat
amdgpu_firmware_info
Signed-off-by: default avatarChangfeng <Changfeng.Zhu@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9c1615be
...@@ -282,14 +282,25 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info, ...@@ -282,14 +282,25 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info,
fw_info->feature = 0; fw_info->feature = 0;
break; break;
case AMDGPU_INFO_FW_TA: case AMDGPU_INFO_FW_TA:
if (query_fw->index > 1) switch (query_fw->index) {
return -EINVAL; case 0:
if (query_fw->index == 0) {
fw_info->ver = adev->psp.ta_fw_version; fw_info->ver = adev->psp.ta_fw_version;
fw_info->feature = adev->psp.ta_xgmi_ucode_version; fw_info->feature = adev->psp.ta_xgmi_ucode_version;
} else { break;
case 1:
fw_info->ver = adev->psp.ta_fw_version; fw_info->ver = adev->psp.ta_fw_version;
fw_info->feature = adev->psp.ta_ras_ucode_version; fw_info->feature = adev->psp.ta_ras_ucode_version;
break;
case 2:
fw_info->ver = adev->psp.ta_fw_version;
fw_info->feature = adev->psp.ta_hdcp_ucode_version;
break;
case 3:
fw_info->ver = adev->psp.ta_fw_version;
fw_info->feature = adev->psp.ta_dtm_ucode_version;
break;
default:
return -EINVAL;
} }
break; break;
case AMDGPU_INFO_FW_SDMA: case AMDGPU_INFO_FW_SDMA:
...@@ -1385,13 +1396,31 @@ static int amdgpu_debugfs_firmware_info(struct seq_file *m, void *data) ...@@ -1385,13 +1396,31 @@ static int amdgpu_debugfs_firmware_info(struct seq_file *m, void *data)
fw_info.feature, fw_info.ver); fw_info.feature, fw_info.ver);
query_fw.fw_type = AMDGPU_INFO_FW_TA; query_fw.fw_type = AMDGPU_INFO_FW_TA;
for (i = 0; i < 2; i++) { for (i = 0; i < 4; i++) {
query_fw.index = i; query_fw.index = i;
ret = amdgpu_firmware_info(&fw_info, &query_fw, adev); ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
if (ret) if (ret)
continue; continue;
seq_printf(m, "TA %s feature version: %u, firmware version: 0x%08x\n", switch (query_fw.index) {
i ? "RAS" : "XGMI", fw_info.feature, fw_info.ver); 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;
default:
return -EINVAL;
}
} }
/* SMC */ /* SMC */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment