From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Alex Deucher <alexander.deucher@amd.com>,
Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Subject: [PATCH 04/11] drm/amdgpu/mes11: add support for setting gang submit
Date: Wed, 2 Dec 2026 10:51:30 -0500 [thread overview]
Message-ID: <20261202155137.1102730-4-alexander.deucher@amd.com> (raw)
In-Reply-To: <20261202155137.1102730-1-alexander.deucher@amd.com>
Enable a primary and secondary queue that schedule together.
v2: fix offset of api_status (Prike)
v3: handle array indices
v3: leader/follower rename
Cc: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
index b9a3652496a5e..8540d3409589a 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
@@ -1285,6 +1285,31 @@ static int mes_v11_0_enable_dbgext_irq(struct amdgpu_mes *mes, bool enable)
return 0;
}
+static int mes_v11_0_set_gang_submit(struct amdgpu_mes *mes,
+ struct mes_set_gang_submit_input *input)
+{
+ union MESAPI__SET_GANG_SUBMIT mes_gang_submit_pkt;
+
+ memset(&mes_gang_submit_pkt, 0, sizeof(mes_gang_submit_pkt));
+
+ mes_gang_submit_pkt.header.type = MES_API_TYPE_SCHEDULER;
+ mes_gang_submit_pkt.header.opcode = MES_SCH_API_SET_GANG_SUBMIT;
+ mes_gang_submit_pkt.header.dwsize = API_FRAME_SIZE_IN_DWORDS;
+
+ mes_gang_submit_pkt.set_gang_submit.gang_context_addr =
+ input->leader_gang_context_addr;
+ mes_gang_submit_pkt.set_gang_submit.slave_gang_context_addr =
+ input->follower_gang_context_addr;
+ mes_gang_submit_pkt.set_gang_submit.gang_context_array_index =
+ input->leader_gang_context_array_idx;
+ mes_gang_submit_pkt.set_gang_submit.slave_gang_context_array_index =
+ input->follower_gang_context_array_idx;
+
+ return mes_v11_0_submit_pkt_and_poll_completion(mes,
+ &mes_gang_submit_pkt, sizeof(mes_gang_submit_pkt),
+ offsetof(union MESAPI__SET_GANG_SUBMIT, api_status));
+}
+
static const struct amdgpu_mes_funcs mes_v11_0_funcs = {
.add_hw_queue = mes_v11_0_add_hw_queue,
.remove_hw_queue = mes_v11_0_remove_hw_queue,
@@ -1296,6 +1321,7 @@ static const struct amdgpu_mes_funcs mes_v11_0_funcs = {
.enable_dbgext_irq = mes_v11_0_enable_dbgext_irq,
.reset_hw_queue = mes_v11_0_reset_hw_queue,
.detect_and_reset_hung_queues = mes_v11_0_detect_and_reset_hung_queues,
+ .set_gang_submit = mes_v11_0_set_gang_submit,
};
static int mes_v11_0_allocate_ucode_buffer(struct amdgpu_device *adev,
--
2.56.1
next prev parent reply other threads:[~2026-12-02 15:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 15:51 [PATCH 01/11] drm/amdgpu/userq: Add INFO IOCTL query for doorbell ranges Alex Deucher
2026-12-02 15:51 ` [PATCH 02/11] drm/amdgpu/mes11: add API for gang submit Alex Deucher
2026-12-02 15:51 ` [PATCH 03/11] drm/amdgpu/mes: add callback " Alex Deucher
2026-12-02 15:51 ` Alex Deucher [this message]
2026-12-02 15:51 ` [PATCH 05/11] drm/amdgpu/mes12: add support for setting " Alex Deucher
2026-12-02 15:51 ` [PATCH 06/11] drm/amdgpu/userq: add callback for gang setup Alex Deucher
2026-12-02 15:51 ` [PATCH 07/11] drm/amdgpu/userq/mes: implement set gang submit Alex Deucher
2026-12-02 15:51 ` [PATCH 08/11] drm/amdgpu/userq: add handling for set_gang Alex Deucher
2026-12-02 16:10 ` sashiko-bot
2026-12-02 15:51 ` [PATCH 09/11] drm/amdgpu: add UAPI to create user queue gangs Alex Deucher
2026-12-02 16:16 ` Mohan Marimuthu, Yogesh
2026-12-02 23:02 ` Alex Deucher
2026-12-02 15:51 ` [PATCH 10/11] drm/amdgpu/userq: enable support for creating gangs Alex Deucher
2026-12-02 16:09 ` sashiko-bot
2026-12-02 15:51 ` [PATCH 11/11] drm/amdgpu: bump driver version for userq updates Alex Deucher
-- strict thread matches above, loose matches on Subject: below --
2026-11-18 22:37 [PATCH 01/11] drm/amdgpu/userq: Add INFO IOCTL query for doorbell ranges Alex Deucher
2026-11-18 22:37 ` [PATCH 04/11] drm/amdgpu/mes11: add support for setting gang submit Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202155137.1102730-4-alexander.deucher@amd.com \
--to=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=yogesh.mohanmarimuthu@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.