drm/amdgpu: update MES v11/v12 API for mes_dbgext
Subsystems (2)
PATCH 1/3 drm/amdgpu: update MES v11/v12 API for mes_dbgext
Add the MES firmware debug-extension ("mes_dbgext") API definitions to the shared MES v11 and v12 interface headers: the MESAPI_MISC__SETUP_MES_DBGEXT misc opcode, the MES_DBGEXT_INIT_DATA struct (log buffer MC address + option bits), and the corresponding dbgext_init_data member of union MESAPI__MISC.
These describe the SETUP_MES_DBGEXT packet the firmware expects and are consumed by the per-IP mes_dbgext wiring for gfx11 and gfx12.
--- drivers/gpu/drm/amd/include/mes_v11_api_def.h | 18 ++++++++++++++++++ drivers/gpu/drm/amd/include/mes_v12_api_def.h | 17 +++++++++++++++++ 2 files changed, 35 insertions(+)
drivers/gpu/drm/amd/include/mes_v11_api_def.h +18 -0
@@ -622,6 +622,7 @@ enum MESAPI_MISC_OPCODE {MESAPI_MISC__NOTIFY_TO_UNMAP_PROCESSES ,MESAPI_MISC__CHANGE_CONFIG ,MESAPI_MISC__LAUNCH_CLEANER_SHADER , +MESAPI_MISC__SETUP_MES_DBGEXT , MESAPI_MISC__MAX, };
@@ -702,6 +703,22 @@ struct CHANGE_CONFIG { } tdr_config; }; +/* +* MES firmware debug extension ("mes_dbgext"): the driver hands the MES a +* GART/GTT log buffer; the MES firmware writes text/binary log items into a +* circular, zone-partitioned buffer that the driver drains and prints. +*/ +struct MES_DBGEXT_INIT_DATA { +uint64_t dbg_ext_mc_addr; +union { +struct { +uint64_t trigger_interrupt_per_new_msg :1 ; +uint64_t reserved :63 ; + }; +uint64_t u64_all; + }; +}; + union MESAPI__MISC { struct { union MES_API_HEADER header;
@@ -717,6 +734,7 @@ union MESAPI__MISC {struct SET_SHADER_DEBUGGER set_shader_debugger;enum MES_AMD_PRIORITY_LEVEL queue_sch_level;struct CHANGE_CONFIG change_config; +struct MES_DBGEXT_INIT_DATA dbgext_init_data;uint32_t data[MISC_DATA_MAX_SIZE_IN_DWORDS ]; };
drivers/gpu/drm/amd/include/mes_v12_api_def.h +17 -0
@@ -839,6 +839,22 @@ struct CHANGE_CONFIG { } tdr_config; }; +/* +* MES firmware debug extension ("mes_dbgext"): the driver hands the MES a +* GART/GTT log buffer; the MES firmware writes text/binary log items into a +* circular, zone-partitioned buffer that the driver drains and prints. +*/ +struct MES_DBGEXT_INIT_DATA { +uint64_t dbg_ext_mc_addr; +union { +struct { +uint64_t trigger_interrupt_per_new_msg :1 ; +uint64_t reserved :63 ; + }; +uint64_t u64_all; + }; +}; + union MESAPI__MISC { struct { union MES_API_HEADER header;
@@ -853,6 +869,7 @@ union MESAPI__MISC {struct SET_SHADER_DEBUGGER set_shader_debugger;enum MES_AMD_PRIORITY_LEVEL queue_sch_level;struct CHANGE_CONFIG change_config; +struct MES_DBGEXT_INIT_DATA dbgext_init_data;uint32_t data[MISC_DATA_MAX_SIZE_IN_DWORDS ]; };uint64_t timestamp;
Signature · 1 line
2.43.0
AMD General
Looks ok to me . You can add me as RB .
Regards
Shaoyun.liu
-----Original Message-----
From: Sun, Yongqiang <[email protected]>
Sent: Wednesday, September 23, 2026 3:19 PM
To: [email protected]
Cc: Liu, Shaoyun <[email protected]>; Sun, Yongqiang <[email protected]>
Subject: [PATCH 1/3] drm/amdgpu: update MES v11/v12 API for mes_dbgext
Add the MES firmware debug-extension ("mes_dbgext") API definitions to the shared MES v11 and v12 interface headers: the MESAPI_MISC__SETUP_MES_DBGEXT misc opcode, the MES_DBGEXT_INIT_DATA struct (log buffer MC address + option bits), and the corresponding dbgext_init_data member of union MESAPI__MISC.
These describe the SETUP_MES_DBGEXT packet the firmware expects and are consumed by the per-IP mes_dbgext wiring for gfx11 and gfx12.
--- drivers/gpu/drm/amd/include/mes_v11_api_def.h | 18 ++++++++++++++++++ drivers/gpu/drm/amd/include/mes_v12_api_def.h | 17 +++++++++++++++++ 2 files changed, 35 insertions(+)
drivers/gpu/drm/amd/include/mes_v11_api_def.h +19 -0
@@ -622,6 +622,7 @@ enum MESAPI_MISC_OPCODE {MESAPI_MISC__NOTIFY_TO_UNMAP_PROCESSES ,MESAPI_MISC__CHANGE_CONFIG ,MESAPI_MISC__LAUNCH_CLEANER_SHADER , +MESAPI_MISC__SETUP_MES_DBGEXT , MESAPI_MISC__MAX, };
@@ -702,6 +703,22 @@ struct CHANGE_CONFIG { } tdr_config; }; +/* +* MES firmware debug extension ("mes_dbgext"): the driver hands the +MES a +* GART/GTT log buffer; the MES firmware writes text/binary log items +into a +* circular, zone-partitioned buffer that the driver drains and prints. +*/ +struct MES_DBGEXT_INIT_DATA { +uint64_t dbg_ext_mc_addr; +union { +struct { +uint64_t trigger_interrupt_per_new_msg :1 ; +uint64_t reserved :63 ; + }; +uint64_t u64_all; + }; +}; +union MESAPI__MISC {
struct {
union MES_API_HEADER header;
@@ -717,6 +734,7 @@ union MESAPI__MISC {
struct SET_SHADER_DEBUGGER set_shader_debugger;
enum MES_AMD_PRIORITY_LEVEL queue_sch_level;
struct CHANGE_CONFIG change_config;+ struct MES_DBGEXT_INIT_DATA dbgext_init_data;
uint32_t data[MISC_DATA_MAX_SIZE_IN_DWORDS];
};drivers/gpu/drm/amd/include/mes_v12_api_def.h +18 -0
@@ -839,6 +839,22 @@ struct CHANGE_CONFIG { } tdr_config; }; +/* +* MES firmware debug extension ("mes_dbgext"): the driver hands the +MES a +* GART/GTT log buffer; the MES firmware writes text/binary log items +into a +* circular, zone-partitioned buffer that the driver drains and prints. +*/ +struct MES_DBGEXT_INIT_DATA { +uint64_t dbg_ext_mc_addr; +union { +struct { +uint64_t trigger_interrupt_per_new_msg :1 ; +uint64_t reserved :63 ; + }; +uint64_t u64_all; + }; +}; +union MESAPI__MISC {
struct {
union MES_API_HEADER header;
@@ -853,6 +869,7 @@ union MESAPI__MISC {
struct SET_SHADER_DEBUGGER set_shader_debugger;
enum MES_AMD_PRIORITY_LEVEL queue_sch_level;
struct CHANGE_CONFIG change_config;
+ struct MES_DBGEXT_INIT_DATA dbgext_init_data;
uint32_t data[MISC_DATA_MAX_SIZE_IN_DWORDS];
};
uint64_t timestamp;--
2.43.0