mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
drm/amdgpu: export ta fw info
Output the ta fw, aka xgmi/ras, via debugfs. Signed-off-by: xinhui pan <xinhui.pan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c6eec90219
commit
9b9ca62dde
@ -295,6 +295,17 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info,
|
||||
fw_info->ver = adev->pm.fw_version;
|
||||
fw_info->feature = 0;
|
||||
break;
|
||||
case AMDGPU_INFO_FW_TA:
|
||||
if (query_fw->index > 1)
|
||||
return -EINVAL;
|
||||
if (query_fw->index == 0) {
|
||||
fw_info->ver = adev->psp.ta_fw_version;
|
||||
fw_info->feature = adev->psp.ta_xgmi_ucode_version;
|
||||
} else {
|
||||
fw_info->ver = adev->psp.ta_fw_version;
|
||||
fw_info->feature = adev->psp.ta_ras_ucode_version;
|
||||
}
|
||||
break;
|
||||
case AMDGPU_INFO_FW_SDMA:
|
||||
if (query_fw->index >= adev->sdma.num_instances)
|
||||
return -EINVAL;
|
||||
@ -1327,6 +1338,16 @@ static int amdgpu_debugfs_firmware_info(struct seq_file *m, void *data)
|
||||
seq_printf(m, "ASD feature version: %u, firmware version: 0x%08x\n",
|
||||
fw_info.feature, fw_info.ver);
|
||||
|
||||
query_fw.fw_type = AMDGPU_INFO_FW_TA;
|
||||
for (i = 0; i < 2; i++) {
|
||||
query_fw.index = i;
|
||||
ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
|
||||
if (ret)
|
||||
continue;
|
||||
seq_printf(m, "TA %s feature version: %u, firmware version: 0x%08x\n",
|
||||
i ? "RAS" : "XGMI", fw_info.feature, fw_info.ver);
|
||||
}
|
||||
|
||||
/* SMC */
|
||||
query_fw.fw_type = AMDGPU_INFO_FW_SMC;
|
||||
ret = amdgpu_firmware_info(&fw_info, &query_fw, adev);
|
||||
|
@ -680,6 +680,7 @@ struct drm_amdgpu_cs_chunk_data {
|
||||
#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11
|
||||
/* Subquery id: Query DMCU firmware version */
|
||||
#define AMDGPU_INFO_FW_DMCU 0x12
|
||||
#define AMDGPU_INFO_FW_TA 0x13
|
||||
/* number of bytes moved for TTM migration */
|
||||
#define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f
|
||||
/* the used VRAM size */
|
||||
|
Loading…
Reference in New Issue
Block a user