aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1506-drm-amdgpu-export-ta-fw-info.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1506-drm-amdgpu-export-ta-fw-info.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/1506-drm-amdgpu-export-ta-fw-info.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1506-drm-amdgpu-export-ta-fw-info.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1506-drm-amdgpu-export-ta-fw-info.patch
new file mode 100644
index 00000000..1f718509
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1506-drm-amdgpu-export-ta-fw-info.patch
@@ -0,0 +1,69 @@
+From 9ea5e80098e21893c7f87106bff6b5b52e85de46 Mon Sep 17 00:00:00 2001
+From: xinhui pan <xinhui.pan@amd.com>
+Date: Tue, 20 Nov 2018 10:22:36 +0800
+Subject: [PATCH 1506/2940] 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: Chaudhary Amit Kumar <Chaudharyamit.Kumar@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 21 +++++++++++++++++++++
+ include/uapi/drm/amdgpu_drm.h | 1 +
+ 2 files changed, 22 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+index 75dd9885c65d..00ca09b6682b 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+@@ -293,6 +293,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;
+@@ -1367,6 +1378,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);
+diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
+index 32208b1d4e0d..c7d5bc34e18f 100644
+--- a/include/uapi/drm/amdgpu_drm.h
++++ b/include/uapi/drm/amdgpu_drm.h
+@@ -739,6 +739,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 */
+--
+2.17.1
+