Add API for setting up a gang.  Gangs schedule together.

Acked-by: Sunil Khatri <sunil.kha...@amd.com>
Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c        |  2 +-
 drivers/gpu/drm/amd/include/mes_v11_api_def.h | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c 
b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
index c9eba537de094..8a31bd81bcb9d 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
@@ -125,7 +125,7 @@ static const char *mes_v11_0_opcodes[] = {
        "UPDATE_ROOT_PAGE_TABLE",
        "AMD_LOG",
        "unused",
-       "unused",
+       "SET_GANG_SUBMIT",
        "SET_HW_RSRC_1",
 };
 
diff --git a/drivers/gpu/drm/amd/include/mes_v11_api_def.h 
b/drivers/gpu/drm/amd/include/mes_v11_api_def.h
index 15680c3f49704..d1933bc3669d7 100644
--- a/drivers/gpu/drm/amd/include/mes_v11_api_def.h
+++ b/drivers/gpu/drm/amd/include/mes_v11_api_def.h
@@ -64,6 +64,7 @@ enum MES_SCH_API_OPCODE {
        MES_SCH_API_MISC                        = 14,
        MES_SCH_API_UPDATE_ROOT_PAGE_TABLE      = 15,
        MES_SCH_API_AMD_LOG                     = 16,
+       MES_SCH_API_SET_GANG_SUBMIT             = 18,
        MES_SCH_API_SET_HW_RSRC_1               = 19,
        MES_SCH_API_MAX                         = 0xFF
 };
@@ -633,6 +634,13 @@ struct SET_SHADER_DEBUGGER {
        uint32_t trap_en;
 };
 
+struct SET_GANG_SUBMIT {
+       uint64_t gang_context_addr;
+       uint64_t slave_gang_context_addr;
+       uint32_t gang_context_array_index;
+       uint32_t slave_gang_context_array_index;
+};
+
 enum MESAPI_MISC__CHANGE_CONFIG_OPTION {
        MESAPI_MISC__CHANGE_CONFIG_OPTION_LIMIT_SINGLE_PROCESS = 0,
        MESAPI_MISC__CHANGE_CONFIG_OPTION_ENABLE_HWS_LOGGING_BUFFER = 1,
@@ -703,5 +711,15 @@ union MESAPI_AMD_LOG {
        uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
 };
 
+union MESAPI__SET_GANG_SUBMIT {
+       struct {
+               union MES_API_HEADER    header;
+               struct MES_API_STATUS   api_status;
+               struct SET_GANG_SUBMIT  set_gang_submit;
+       };
+
+       uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
+};
+
 #pragma pack(pop)
 #endif
-- 
2.49.0

Reply via email to