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
> -----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
> userq
>
> Public
>
> Regards,
> Prike
>
> > -----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 userq
> >
> >
> >
> > On 6/25/26 05:12, Prike Liang wrote:
> > > Updating the union MESAPI__SUSPEND and union MESAPI__RESUME to
> 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(+)
> > >
> > > diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> > > b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> > > index 9e27d01cbfa3..ab0de6d04ff8 100644
> > > --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> > > +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> > > @@ -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), 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 6644fabeb0b7..b06412ac8583 100644
> > > --- a/drivers/gpu/drm/amd/include/mes_v11_api_def.h
> > > +++ b/drivers/gpu/drm/amd/include/mes_v11_api_def.h
> > > @@ -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;
> >
> > 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.
>
> >
> > Regards,
> > Christian.
> >
> > > };
> > >
> > > uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];