[PATCH] drm/amd: Move `enum drm_amdgpu_ta_fw_type` to uapi

Mario Limonciello mario.limonciello at amd.com
Tue Sep 26 12:37:41 UTC 2023


Enum values used by the ioctl `AMDGPU_INFO_FW_VERSION`/`AMDGPU_INFO_FW_TA`
are not exported so clients need to keep their own copy of the definitions
while looking up firmware versions for the TA.

Move this to uapi instead.

Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 12 ------------
 include/uapi/drm/amdgpu_drm.h             | 12 ++++++++++++
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
index ae5fa61d2890..73a84af54d70 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h
@@ -145,18 +145,6 @@ struct ta_firmware_header_v1_0 {
 	struct psp_fw_legacy_bin_desc securedisplay;
 };
 
-enum ta_fw_type {
-	TA_FW_TYPE_UNKOWN,
-	TA_FW_TYPE_PSP_ASD,
-	TA_FW_TYPE_PSP_XGMI,
-	TA_FW_TYPE_PSP_RAS,
-	TA_FW_TYPE_PSP_HDCP,
-	TA_FW_TYPE_PSP_DTM,
-	TA_FW_TYPE_PSP_RAP,
-	TA_FW_TYPE_PSP_SECUREDISPLAY,
-	TA_FW_TYPE_MAX_INDEX,
-};
-
 /* version_major=2, version_minor=0 */
 struct ta_firmware_header_v2_0 {
 	struct common_firmware_header header;
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index 984fc16577ca..225dec3634f0 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -912,6 +912,18 @@ struct drm_amdgpu_cs_chunk_cp_gfx_shadow {
 #define AMDGPU_INFO_MMR_SH_INDEX_SHIFT	8
 #define AMDGPU_INFO_MMR_SH_INDEX_MASK	0xff
 
+enum drm_amdgpu_ta_fw_type {
+	TA_FW_TYPE_UNKOWN,
+	TA_FW_TYPE_PSP_ASD,
+	TA_FW_TYPE_PSP_XGMI,
+	TA_FW_TYPE_PSP_RAS,
+	TA_FW_TYPE_PSP_HDCP,
+	TA_FW_TYPE_PSP_DTM,
+	TA_FW_TYPE_PSP_RAP,
+	TA_FW_TYPE_PSP_SECUREDISPLAY,
+	TA_FW_TYPE_MAX_INDEX,
+};
+
 struct drm_amdgpu_query_fw {
 	/** AMDGPU_INFO_FW_* */
 	__u32 fw_type;
-- 
2.34.1



More information about the amd-gfx mailing list