AMD General Hi Christian,
> -----Original Message----- > From: Koenig, Christian <[email protected]> > Sent: Tuesday, June 16, 2026 2:28 PM > To: SHANMUGAM, SRINIVASAN <[email protected]>; > Deucher, Alexander <[email protected]> > Cc: [email protected] > Subject: Re: [PATCH 2/5] drm/amdgpu: Signal QUEUE_RESET EVENTFD > notifications > > > > On 6/12/26 07:52, Srinivasan Shanmugam wrote: > > Signal QUEUE_RESET EVENTFD subscriptions when hung user queues are > > detected. > > > > The queue reset path already identifies the affected user queues. Use > > those queue objects to wake up the matching EVENTFD subscribers. > > > > EVENTFD remains notification-only. > > > > Cc: Alex Deucher <[email protected]> > > Cc: Christian König <[email protected]> > > Signed-off-by: Srinivasan Shanmugam <[email protected]> > > --- > > drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c > > b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c > > index e9189f07c6dc..ee8dbd70e1c8 100644 > > --- a/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c > > +++ b/drivers/gpu/drm/amd/amdgpu/mes_userqueue.c > > @@ -238,7 +238,16 @@ static int mes_userq_detect_and_reset(struct > amdgpu_device *adev, > > if (queue->queue_type == queue_type) { > > for (i = 0; i < hung_db_num; i++) { > > if (queue->doorbell_index == > > db_array[i]) { > > That code is extremely questionable to begin with. > > My suggestion is to clean that up first and add a function in amdgpu_userq.c > which > gets the doorbell index and does the necessary handling. > > E.g. actually lock the doorbell XA, lookup the queue and then do the right > handling. Just one clarification pls regarding the QUEUE_RESET feedback. Would you prefer the new helper in amdgpu_userq.c to only perform the doorbell_index -> queue lookup and return the queue, with the caller handling the reset/eventfd logic? Or should the helper encapsulate the full handling for a hung doorbell (queue state updates, force completion, EVENTFD signaling, etc.)? Thanks, Srini > > Regards, > Christian. >
