drm/amdgpu: add the doorbell index input for suspending userq
Subsystems (2)
PATCH 1/3 drm/amdgpu: add the doorbell index input for suspending userq
It requires inputing the doorbell offset for MES firmware preempts the userq, and adding the doorbell offset also keep aliging with the union MESAPI__SUSPEND in MES firmware.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h +2 -0
@@ -305,12 +305,14 @@ struct mes_suspend_gang_input {uint64_t gang_context_addr;uint64_t suspend_fence_addr;uint32_t suspend_fence_value; +uint32_t doorbell_offset; };struct mes_resume_gang_input {uint32_t xcc_id;bool resume_all_gangs;uint64_t gang_context_addr; +uint32_t doorbell_offset; };struct mes_reset_queue_input {
Signature · 1 line
2.34.1
PATCH 2/3 drm/amdgpu/mes11: set doorbell offset for suspending userq
Updating the union MESAPI__SUSPEND and union MESAPI__RESUME to add the doorbell offset for suspending userq.
--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ drivers/gpu/drm/amd/include/mes_v11_api_def.h | 2 ++ 2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2 -0
@@ -783,6 +783,7 @@ static int mes_v11_0_suspend_gang(struct amdgpu_mes *mes, mes_suspend_gang_pkt.gang_context_addr = input->gang_context_addr; mes_suspend_gang_pkt.suspend_fence_addr = input->suspend_fence_addr; mes_suspend_gang_pkt.suspend_fence_value = input->suspend_fence_value; + mes_suspend_gang_pkt.doorbell_offset = input->doorbell_offset; return mes_v11_0_submit_pkt_and_poll_completion(mes, &mes_suspend_gang_pkt, sizeof(mes_suspend_gang_pkt),
@@ -802,6 +803,7 @@ static int mes_v11_0_resume_gang(struct amdgpu_mes *mes, mes_resume_gang_pkt.resume_all_gangs = input->resume_all_gangs; mes_resume_gang_pkt.gang_context_addr = input->gang_context_addr; + mes_resume_gang_pkt.doorbell_offset = input->doorbell_offset; return mes_v11_0_submit_pkt_and_poll_completion(mes, &mes_resume_gang_pkt, sizeof(mes_resume_gang_pkt),
drivers/gpu/drm/amd/include/mes_v11_api_def.h +2 -0
@@ -428,6 +428,7 @@ union MESAPI__SUSPEND {uint32_t suspend_fence_value;struct MES_API_STATUS api_status; +uint32_t doorbell_offset; };uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];
@@ -445,6 +446,7 @@ union MESAPI__RESUME {uint64_t gang_context_addr;struct MES_API_STATUS api_status; +uint32_t doorbell_offset; };uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];
Signature · 1 line
2.34.1
Christian König
maintainerRe: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userq
Quoted 42 lines · Prike Liang
Updating the union
MESAPI__SUSPENDand unionMESAPI__RESUMEto add the doorbell offset for suspending userq.Signed-off-by Prike Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ drivers/gpu/drm/amd/include/mes_v11_api_def.h | 2 ++ 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2
-0@@ -783,6 +783,7 @@ static int mes_v11_0_suspend_gang(struct amdgpu_mes *mes, mes_suspend_gang_pkt.gang_context_addr = input->gang_context_addr; mes_suspend_gang_pkt.suspend_fence_addr = input->suspend_fence_addr; mes_suspend_gang_pkt.suspend_fence_value = input->suspend_fence_value; + mes_suspend_gang_pkt.doorbell_offset = input->doorbell_offset; return mes_v11_0_submit_pkt_and_poll_completion(mes, &mes_suspend_gang_pkt, sizeof(mes_suspend_gang_pkt),@@ -802,6 +803,7 @@ static int mes_v11_0_resume_gang(struct amdgpu_mes *mes, mes_resume_gang_pkt.resume_all_gangs = input->resume_all_gangs; mes_resume_gang_pkt.gang_context_addr = input->gang_context_addr; + mes_resume_gang_pkt.doorbell_offset = input->doorbell_offset; return mes_v11_0_submit_pkt_and_poll_completion(mes, &mes_resume_gang_pkt, sizeof(mes_resume_gang_pkt),drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0@@ -428,6 +428,7 @@ union MESAPI__SUSPEND {uint32_t suspend_fence_value;struct MES_API_STATUS api_status; +uint32_t doorbell_offset; };uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];
drivers/gpu/drm/amd/include/mes_v11_api_def.h union MESAPI__RESUME { · line 449
Quoted 4 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0@@ -445,6 +446,7 @@ union MESAPI__RESUME {uint64_t gang_context_addr;struct MES_API_STATUS api_status; +uint32_t doorbell_offset;
Is this backward compatible?
Keep in mind that we can't break the FW interface.
Regards,
Christian.
Quoted 3 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +0
-0};uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];
Re: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userq
Quoted 42 lines · Christian König
Quoted 40 lines · Prike Liang
Updating the union
MESAPI__SUSPENDand unionMESAPI__RESUMEto add the doorbell offset for suspending userq.Signed-off-by Prike Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ drivers/gpu/drm/amd/include/mes_v11_api_def.h | 2 ++ 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2
-0@@ -783,6 +783,7 @@ static int mes_v11_0_suspend_gang(struct amdgpu_mes *mes, mes_suspend_gang_pkt.gang_context_addr = input->gang_context_addr; mes_suspend_gang_pkt.suspend_fence_addr = input->suspend_fence_addr; mes_suspend_gang_pkt.suspend_fence_value = input->suspend_fence_value; + mes_suspend_gang_pkt.doorbell_offset = input->doorbell_offset; return mes_v11_0_submit_pkt_and_poll_completion(mes, &mes_suspend_gang_pkt, sizeof(mes_suspend_gang_pkt),@@ -802,6 +803,7 @@ static int mes_v11_0_resume_gang(struct amdgpu_mes *mes, mes_resume_gang_pkt.resume_all_gangs = input->resume_all_gangs; mes_resume_gang_pkt.gang_context_addr = input->gang_context_addr; + mes_resume_gang_pkt.doorbell_offset = input->doorbell_offset; return mes_v11_0_submit_pkt_and_poll_completion(mes, &mes_resume_gang_pkt, sizeof(mes_resume_gang_pkt),drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0@@ -428,6 +428,7 @@ union MESAPI__SUSPEND {uint32_t suspend_fence_value;struct MES_API_STATUS api_status; +uint32_t doorbell_offset; };
Quoted 6 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h union MESAPI__RESUME { · line 449
Quoted 6 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];@@ -445,6 +446,7 @@ union MESAPI__RESUME {uint64_t gang_context_addr;struct MES_API_STATUS api_status; +uint32_t doorbell_offset;
If my understanding is correct only while adding a queue for the first time doorbell offset is needed, not for anything else but you can check with fw requirements.
Regards
Sunil khatri
Quoted 10 lines
Is this backward compatible?
Keep in mind that we can't break the FW interface.
Regards,
Christian.Quoted 3 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +0
-0};uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];
RE: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userq
AMD General
Regards,
Prike
Quoted 58 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Khatri, Sunil
Sent: Thursday, June 25, 2026 6:43 PM
To: [email protected]
Subject: Re: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userqQuoted 11 lines · Christian König
Quoted 9 lines · Prike Liang
Updating the union
MESAPI__SUSPENDand unionMESAPI__RESUMEto add the doorbell offset for suspending userq.Signed-off-by Prike Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ drivers/gpu/drm/amd/include/mes_v11_api_def.h | 2 ++ 2 files changed, 4 insertions(+)Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c static int mes_v11_0_suspend_gang(struct
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +0
-0@@ -783,6 +783,7 @@ static int mes_v11_0_suspend_gang(struct
amdgpu_mes*mes,Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c static int mes_v11_0_suspend_gang(struct · line 784
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +0
-0mes_suspend_gang_pkt.gang_context_addr = input->gang_context_addr; mes_suspend_gang_pkt.suspend_fence_addr = input-
suspend_fence_addr;Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1
-0mes_suspend_gang_pkt.suspend_fence_value = input->suspend_fence_value; + mes_suspend_gang_pkt.doorbell_offset = input->doorbell_offset; return mes_v11_0_submit_pkt_and_poll_completion(mes,
&mes_suspend_gang_pkt,sizeof(mes_suspend_gang_pkt),@@ -802,6
Quoted 8 lines
Quoted 8 lines
+803,7 @@ static int mes_v11_0_resume_gang(struct
amdgpu_mes*mes,mes_resume_gang_pkt.resume_all_gangs = input->resume_all_gangs; mes_resume_gang_pkt.gang_context_addr = input->gang_context_addr;+ mes_resume_gang_pkt.doorbell_offset =
input->doorbell_offset;return mes_v11_0_submit_pkt_and_poll_completion(mes,
&mes_resume_gang_pkt,sizeof(mes_resume_gang_pkt), diff--git
Quoted 12 lines
Quoted 12 lines
a/drivers/gpu/drm/amd/include/mes_v11_api_def.hb/drivers/gpu/drm/amd/include/mes_v11_api_def.h
index6644fabeb0b7..b06412ac8583100644drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0@@ -428,6 +428,7 @@ union MESAPI__SUSPEND {uint32_t suspend_fence_value;struct MES_API_STATUS api_status; +uint32_t doorbell_offset; };
Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h union MESAPI__RESUME { · line 449
Quoted 6 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];@@ -445,6 +446,7 @@ union MESAPI__RESUME {uint64_t gang_context_addr;struct MES_API_STATUS api_status; +uint32_t doorbell_offset;If my understanding is correct only while adding a queue for the first time doorbell offset is needed, not for anything else but you can check with fw requirements.
This change keeps the driver header aligned with the MES firmware definition. This field is not consumed by MES firmware directly when suspending the userq, so it may be removed in a future revision.
Quoted 12 lines
Regards
Sunil khatriQuoted 10 lines
Is this backward compatible?
Keep in mind that we can't break the FW interface.
Regards,
Christian.Quoted 3 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +0
-0};uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];
RE: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userq
In reply to Christian KönigPublic
Regards,
Prike
Quoted 64 lines
-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Thursday, June 25, 2026 6:40 PM
To: Liang, Prike <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Liu, Shaoyun <[email protected]>
Subject: Re: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userqQuoted 1 line · Prike Liang
Updating the union
MESAPI__SUSPENDand unionMESAPI__RESUMEto addthe
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c static int mes_v11_0_suspend_gang(struct amdgpu_mes
Quoted 14 lines
doorbell offset for suspending userq.
Signed-off-by Prike Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ drivers/gpu/drm/amd/include/mes_v11_api_def.h | 2 ++ 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +0
-0@@ -783,6 +783,7 @@ static int mes_v11_0_suspend_gang(struct amdgpu_mes*mes,
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1
-0mes_suspend_gang_pkt.gang_context_addr = input->gang_context_addr; mes_suspend_gang_pkt.suspend_fence_addr = input- suspend_fence_addr; mes_suspend_gang_pkt.suspend_fence_value = input->suspend_fence_value; + mes_suspend_gang_pkt.doorbell_offset = input->doorbell_offset;return mes_v11_0_submit_pkt_and_poll_completion(mes,
&mes_suspend_gang_pkt,sizeof(mes_suspend_gang_pkt),@@ -802,6
Quoted 8 lines
+803,7 @@ static int mes_v11_0_resume_gang(struct
amdgpu_mes*mes,mes_resume_gang_pkt.resume_all_gangs = input->resume_all_gangs; mes_resume_gang_pkt.gang_context_addr = input->gang_context_addr;+ mes_resume_gang_pkt.doorbell_offset =
input->doorbell_offset;return mes_v11_0_submit_pkt_and_poll_completion(mes,
&mes_resume_gang_pkt,sizeof(mes_resume_gang_pkt), diff--git
Quoted 16 lines
a/drivers/gpu/drm/amd/include/mes_v11_api_def.hb/drivers/gpu/drm/amd/include/mes_v11_api_def.h
index6644fabeb0b7..b06412ac8583100644drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0@@ -428,6 +428,7 @@ union MESAPI__SUSPEND {uint32_t suspend_fence_value;struct MES_API_STATUS api_status; +uint32_t doorbell_offset; };uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];@@ -445,6 +446,7 @@ union MESAPI__RESUME {uint64_t gang_context_addr;
Quoted 6 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h union MESAPI__RESUME { · line 449
Quoted 2 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0struct MES_API_STATUS api_status; +uint32_t doorbell_offset;Is this backward compatible?
Keep in mind that we can't break the FW interface.
This patch aligns the MESAPI__SUSPEND/RESUME structure definition with the MES firmware. In MES11, the doorbell_offset field is also included in the SUSPEND/RESUME structures. However, the driver-provided doorbell_offset is not directly used by MES FW; this field may be removed in a future revision.
Quoted 7 lines
Regards,
Christian.Quoted 3 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +0
-0};uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];
RE: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userq
Public
Hi @Liu, Shaoyun
Could you confirm whether the doorbell_offset field should be included in the MES11 driver's SUSPEND input for userq preemption, to align with the MES FW structure definition? Since this field is not directly consumed by MES firmware during suspend, omitting it should be harmless. However, keeping it maintains a consistent structure definition between the driver and firmware, which is the intent of this change. Or we might need to remove doorbell filed in the MES firmware in the future.
Regards,
Prike
Quoted 103 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Liang, Prike
Sent: Friday, June 26, 2026 12:00 PM
To: Koenig, Christian <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Liu, Shaoyun <[email protected]>
Subject: RE: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userqPublic
Regards,
PrikeQuoted 11 lines
-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Thursday, June 25, 2026 6:40 PM
To: Liang, Prike <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Liu, Shaoyun <[email protected]>
Subject: Re: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userqQuoted 2 lines
Quoted 1 line · Prike Liang
Updating the union
MESAPI__SUSPENDand unionMESAPI__RESUMEtoadd
Quoted 55 lines
the
Quoted 14 lines
doorbell offset for suspending userq.
Signed-off-by Prike Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ drivers/gpu/drm/amd/include/mes_v11_api_def.h | 2 ++ 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +0
-0@@ -783,6 +783,7 @@ static int mes_v11_0_suspend_gang(structQuoted 1 line
amdgpu_mes*mes,
Quoted 10 lines
mes_suspend_gang_pkt.gang_context_addr =
input->gang_context_addr; mes_suspend_gang_pkt.suspend_fence_addr = input-suspend_fence_addr;
mes_suspend_gang_pkt.suspend_fence_value =input->suspend_fence_value;
+ mes_suspend_gang_pkt.doorbell_offset =input->doorbell_offset;return mes_v11_0_submit_pkt_and_poll_completion(mes,
&mes_suspend_gang_pkt,sizeof(mes_suspend_gang_pkt),@@ -802,6
Quoted 10 lines
+803,7 @@ static int mes_v11_0_resume_gang(struct
amdgpu_mes*mes,mes_resume_gang_pkt.resume_all_gangs = input->resume_all_gangs; mes_resume_gang_pkt.gang_context_addr =
input->gang_context_addr;
+ mes_resume_gang_pkt.doorbell_offset =input->doorbell_offset;return mes_v11_0_submit_pkt_and_poll_completion(mes,
&mes_resume_gang_pkt,sizeof(mes_resume_gang_pkt), diff--git
Quoted 16 lines
a/drivers/gpu/drm/amd/include/mes_v11_api_def.hb/drivers/gpu/drm/amd/include/mes_v11_api_def.h
index6644fabeb0b7..b06412ac8583100644drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0@@ -428,6 +428,7 @@ union MESAPI__SUSPEND {uint32_t suspend_fence_value;struct MES_API_STATUS api_status; +uint32_t doorbell_offset; };uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];@@ -445,6 +446,7 @@ union MESAPI__RESUME {uint64_t gang_context_addr;Quoted 6 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h union MESAPI__RESUME { · line 449
Quoted 2 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0struct MES_API_STATUS api_status; +uint32_t doorbell_offset;Is this backward compatible?
Keep in mind that we can't break the FW interface.
This patch aligns the MESAPI__SUSPEND/RESUME structure definition with the MES firmware. In MES11, the
doorbell_offsetfield is also included in the SUSPEND/RESUME structures. However, the driver-provideddoorbell_offsetis not directly used by MES FW; this field may be removed in a future revision.Quoted 7 lines
Regards,
Christian.Quoted 3 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +0
-0};uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];
Christian König
maintainerRe: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userq
In reply to Liang, PrikeQuoted 74 lines · Prike
Public
Regards,
PrikeQuoted 69 lines
-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Thursday, June 25, 2026 6:40 PM
To: Liang, Prike <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Liu, Shaoyun <[email protected]>
Subject: Re: [PATCH 2/3] drm/amdgpu/mes11: set doorbell offset for suspending userqQuoted 1 line · Prike Liang
Updating the union
MESAPI__SUSPENDand unionMESAPI__RESUMEto addthe
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c static int mes_v11_0_suspend_gang(struct amdgpu_mes
Quoted 14 lines
doorbell offset for suspending userq.
Signed-off-by Prike Liang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ drivers/gpu/drm/amd/include/mes_v11_api_def.h | 2 ++ 2 files changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +0
-0@@ -783,6 +783,7 @@ static int mes_v11_0_suspend_gang(struct amdgpu_mes*mes,
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1
-0mes_suspend_gang_pkt.gang_context_addr = input->gang_context_addr; mes_suspend_gang_pkt.suspend_fence_addr = input- suspend_fence_addr; mes_suspend_gang_pkt.suspend_fence_value = input->suspend_fence_value; + mes_suspend_gang_pkt.doorbell_offset = input->doorbell_offset;return mes_v11_0_submit_pkt_and_poll_completion(mes,
&mes_suspend_gang_pkt,sizeof(mes_suspend_gang_pkt),@@ -802,6
Quoted 8 lines
+803,7 @@ static int mes_v11_0_resume_gang(struct
amdgpu_mes*mes,mes_resume_gang_pkt.resume_all_gangs = input->resume_all_gangs; mes_resume_gang_pkt.gang_context_addr = input->gang_context_addr;+ mes_resume_gang_pkt.doorbell_offset =
input->doorbell_offset;return mes_v11_0_submit_pkt_and_poll_completion(mes,
&mes_resume_gang_pkt,sizeof(mes_resume_gang_pkt), diff--git
Quoted 14 lines
a/drivers/gpu/drm/amd/include/mes_v11_api_def.hb/drivers/gpu/drm/amd/include/mes_v11_api_def.h
index6644fabeb0b7..b06412ac8583100644drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0@@ -428,6 +428,7 @@ union MESAPI__SUSPEND {uint32_t suspend_fence_value;struct MES_API_STATUS api_status; +uint32_t doorbell_offset; };uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];drivers/gpu/drm/amd/include/mes_v11_api_def.h union MESAPI__RESUME { · line 449
Quoted 4 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +1
-0@@ -445,6 +446,7 @@ union MESAPI__RESUME {uint64_t gang_context_addr;struct MES_API_STATUS api_status; +uint32_t doorbell_offset;Is this backward compatible?
Quoted 8 lines
Quoted 1 line
Keep in mind that we can't break the FW interface.
This patch aligns the MESAPI__SUSPEND/RESUME structure definition with the MES firmware. In MES11, the
doorbell_offsetfield is also included in the SUSPEND/RESUME structures. However, the driver-provideddoorbell_offsetis not directly used by MES FW; this field may be removed in a future revision.
In that case Acked-by: Christian König <[email protected]> for the whole series.
Thanks,
Christian.
Quoted 9 lines
Quoted 8 lines
Regards,
Christian.Quoted 3 lines
drivers/gpu/drm/amd/include/mes_v11_api_def.h +0
-0};uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS ];
PATCH 3/3 drm/amdgpu/mes12: set doorbell offset for suspending userq
In reply to Prike LiangUpdating the union MESAPI__SUSPEND and union MESAPI__RESUME to add the doorbell offset for suspending userq.
--- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/mes_v12_1.c | 2 ++ 2 files changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/mes_v12_0.c +2 -0
@@ -792,6 +792,7 @@ static int mes_v12_0_suspend_gang(struct amdgpu_mes *mes, mes_suspend_gang_pkt.gang_context_addr = input->gang_context_addr; mes_suspend_gang_pkt.suspend_fence_addr = input->suspend_fence_addr; mes_suspend_gang_pkt.suspend_fence_value = input->suspend_fence_value; + mes_suspend_gang_pkt.doorbell_offset = input->doorbell_offset; return mes_v12_0_submit_pkt_and_poll_completion(mes, AMDGPU_MES_SCHED_PIPE, &mes_suspend_gang_pkt, sizeof(mes_suspend_gang_pkt),
@@ -811,6 +812,7 @@ static int mes_v12_0_resume_gang(struct amdgpu_mes *mes, mes_resume_gang_pkt.resume_all_gangs = input->resume_all_gangs; mes_resume_gang_pkt.gang_context_addr = input->gang_context_addr; + mes_resume_gang_pkt.doorbell_offset = input->doorbell_offset; return mes_v12_0_submit_pkt_and_poll_completion(mes, AMDGPU_MES_SCHED_PIPE, &mes_resume_gang_pkt, sizeof(mes_resume_gang_pkt),
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c +2 -0
@@ -494,6 +494,7 @@ static int mes_v12_1_suspend_gang(struct amdgpu_mes *mes, mes_suspend_gang_pkt.gang_context_addr = input->gang_context_addr; mes_suspend_gang_pkt.suspend_fence_addr = input->suspend_fence_addr; mes_suspend_gang_pkt.suspend_fence_value = input->suspend_fence_value; + mes_suspend_gang_pkt.doorbell_offset = input->doorbell_offset;/* Suspend gang is handled by master MES */ return mes_v12_1_submit_pkt_and_poll_completion(mes, input->xcc_id, AMDGPU_MES_SCHED_PIPE,
@@ -514,6 +515,7 @@ static int mes_v12_1_resume_gang(struct amdgpu_mes *mes, mes_resume_gang_pkt.resume_all_gangs = input->resume_all_gangs; mes_resume_gang_pkt.gang_context_addr = input->gang_context_addr; + mes_resume_gang_pkt.doorbell_offset = input->doorbell_offset;/* Resume gang is handled by master MES */ return mes_v12_1_submit_pkt_and_poll_completion(mes, input->xcc_id, AMDGPU_MES_SCHED_PIPE,
Signature · 1 line
2.34.1