drm/amdgpu: Fix API status offset for MES queue reset
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fix API status offset for MES queue reset
The mes_v11_0_reset_hw_queue and mes_v12_0_reset_hw_queue functions were using the wrong union type (MESAPI__REMOVE_QUEUE) when getting the offset for api_status. Since these functions handle queue reset operations, they should use MESAPI__RESET union instead.
This fixes the polling of API status during hardware queue reset operations in the MES for both v11 and v12 versions.
--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1 -1
@@ -497,7 +497,7 @@ static int mes_v11_0_reset_hw_queue(struct amdgpu_mes *mes,return mes_v11_0_submit_pkt_and_poll_completion (mes, &mes_reset_queue_pkt,sizeof (mes_reset_queue_pkt), - offsetof(union MESAPI__REMOVE_QUEUE , api_status)); + offsetof(union MESAPI__RESET , api_status)); } static int mes_v11_0_map_legacy_queue(struct amdgpu_mes *mes,
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +1 -1
@@ -517,7 +517,7 @@ static int mes_v12_0_reset_hw_queue(struct amdgpu_mes *mes,return mes_v12_0_submit_pkt_and_poll_completion (mes, pipe, &mes_reset_queue_pkt,sizeof (mes_reset_queue_pkt), - offsetof(union MESAPI__REMOVE_QUEUE , api_status)); + offsetof(union MESAPI__RESET , api_status)); } static int mes_v12_0_map_legacy_queue(struct amdgpu_mes *mes,
Signature · 1 line
2.49.0
[Public]
Regards,
Prike
Quoted 56 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Jesse.Zhang
Sent: Monday, April 28, 2025 10:40 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Zhang, Jesse(Jie) <[email protected]>; Zhang, Jesse(Jie) <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix API status offset for MES queue resetThe
mes_v11_0_reset_hw_queueandmes_v12_0_reset_hw_queuefunctions were using the wrong union type (MESAPI__REMOVE_QUEUE) when getting the offset forapi_status. Since these functions handle queue reset operations, they should useMESAPI__RESETunion instead.This fixes the polling of API status during hardware queue reset operations in the MES for both v11 and v12 versions.
Signed-off-by Jesse Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1
-1@@ -497,7 +497,7 @@ static int mes_v11_0_reset_hw_queue(structamdgpu_mes *mes, return mes_v11_0_submit_pkt_and_poll_completion(mes, &mes_reset_queue_pkt, sizeof(mes_reset_queue_pkt), -offsetof (union MESAPI__REMOVE_QUEUE ,api_status )); +offsetof (union MESAPI__RESET ,api_status )); }static int mes_v11_0_map_legacy_queue(struct
amdgpu_mes*mes, diff --gita/drivers/gpu/drm/amd/amdgpu/mes_v12_0.cb/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
index1f7614dccb00..ee8b531b713d100644drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +1
-1@@ -517,7 +517,7 @@ static int mes_v12_0_reset_hw_queue(structamdgpu_mes *mes, return mes_v12_0_submit_pkt_and_poll_completion(mes, pipe, &mes_reset_queue_pkt, sizeof(mes_reset_queue_pkt), -offsetof (union MESAPI__REMOVE_QUEUE ,api_status )); +offsetof (union MESAPI__RESET ,api_status )); }static int mes_v12_0_map_legacy_queue(struct
amdgpu_mes*mes,
--
2.49.0
[AMD Official Use Only - AMD Internal Distribution Only]
Looks good to me .
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Jesse.Zhang
Sent: Sunday, April 27, 2025 10:40 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Zhang, Jesse(Jie) <[email protected]>; Zhang, Jesse(Jie) <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix API status offset for MES queue reset
The mes_v11_0_reset_hw_queue and mes_v12_0_reset_hw_queue functions were using the wrong union type (MESAPI__REMOVE_QUEUE) when getting the offset for api_status. Since these functions handle queue reset operations, they should use MESAPI__RESET union instead.
This fixes the polling of API status during hardware queue reset operations in the MES for both v11 and v12 versions.
--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1 -1
@@ -497,7 +497,7 @@ static int mes_v11_0_reset_hw_queue(struct amdgpu_mes *mes,return mes_v11_0_submit_pkt_and_poll_completion (mes, &mes_reset_queue_pkt,sizeof (mes_reset_queue_pkt), - offsetof(union MESAPI__REMOVE_QUEUE , api_status)); + offsetof(union MESAPI__RESET , api_status)); } static int mes_v11_0_map_legacy_queue(struct amdgpu_mes *mes, diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
index 1f7614dccb00..ee8b531b713d 100644
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +1 -1
@@ -517,7 +517,7 @@ static int mes_v12_0_reset_hw_queue(struct amdgpu_mes *mes,return mes_v12_0_submit_pkt_and_poll_completion (mes, pipe, &mes_reset_queue_pkt,sizeof (mes_reset_queue_pkt), - offsetof(union MESAPI__REMOVE_QUEUE , api_status)); + offsetof(union MESAPI__RESET , api_status)); } static int mes_v12_0_map_legacy_queue(struct amdgpu_mes *mes,
--
2.49.0