* [PATCH v4] drm/amdgpu/mes_v12: use mes schedule pipe for legacy queues on unified MES
@ 2026-04-14 5:09 Jesse Zhang
0 siblings, 0 replies; only message in thread
From: Jesse Zhang @ 2026-04-14 5:09 UTC (permalink / raw)
To: amd-gfx
Cc: Alexander.Deucher, Christian Koenig, Jesse Zhang, Michael Chen,
Alex Deucher, Shaoyun Liu, Jesse Zhang
when suspend_all_gangs is issued to pipe0 MES during system suspend or runtime PM, pipe0 can only suspend and resume queues it has tracked.
KCQs registered with a non-zero pipe slot may not be correctly handled, leaving them in an inconsistent state after resume.
v3: fix the schedule pipe issue
Suggested-by: Michael Chen <michael.chen@amd.com>
Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Suggested-by: Shaoyun Liu <shaoyun.liu@amd.com>
Signed-off-by: Jesse Zhang <jesse.zhang@amd.com>
---
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
index 023c7345ea54..47afc99796c0 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
@@ -528,10 +528,15 @@ static int mes_v12_0_map_legacy_queue(struct amdgpu_mes *mes,
convert_to_mes_queue_type(input->queue_type);
mes_add_queue_pkt.map_legacy_kq = 1;
- if (mes->adev->enable_uni_mes)
- pipe = AMDGPU_MES_KIQ_PIPE;
- else
+ if (mes->adev->enable_uni_mes) {
+ /* Keep scheduler queue on KIQ pipe; map all other kernel queues on sched pipe. */
+ if (input->queue_type == AMDGPU_RING_TYPE_MES)
+ pipe = AMDGPU_MES_KIQ_PIPE;
+ else
+ pipe = AMDGPU_MES_SCHED_PIPE;
+ } else {
pipe = AMDGPU_MES_SCHED_PIPE;
+ }
return mes_v12_0_submit_pkt_and_poll_completion(mes, pipe,
&mes_add_queue_pkt, sizeof(mes_add_queue_pkt),
@@ -567,10 +572,15 @@ static int mes_v12_0_unmap_legacy_queue(struct amdgpu_mes *mes,
convert_to_mes_queue_type(input->queue_type);
}
- if (mes->adev->enable_uni_mes)
- pipe = AMDGPU_MES_KIQ_PIPE;
- else
+ if (mes->adev->enable_uni_mes) {
+ /* Keep scheduler queue on KIQ pipe; map all other kernel queues on sched pipe. */
+ if (input->queue_type == AMDGPU_RING_TYPE_MES)
+ pipe = AMDGPU_MES_KIQ_PIPE;
+ else
+ pipe = AMDGPU_MES_SCHED_PIPE;
+ } else {
pipe = AMDGPU_MES_SCHED_PIPE;
+ }
return mes_v12_0_submit_pkt_and_poll_completion(mes, pipe,
&mes_remove_queue_pkt, sizeof(mes_remove_queue_pkt),
--
2.49.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-14 5:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-14 5:09 [PATCH v4] drm/amdgpu/mes_v12: use mes schedule pipe for legacy queues on unified MES Jesse Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox