AMD General

> -----Original Message-----
> From: Koenig, Christian <[email protected]>
> Sent: Tuesday, July 14, 2026 6:33 PM
> To: SHANMUGAM, SRINIVASAN <[email protected]>;
> Deucher, Alexander <[email protected]>
> Cc: [email protected]
> Subject: Re: [PATCH v9 4/5] drm/amdgpu: Record USERQ_EOP WAIT_EVENT
> notifications
>
> On 7/14/26 10:10, Srinivasan Shanmugam wrote:
> > WAIT_EVENT currently provides the per-file queue, matching, and
> > lifetime infrastructure, but no producer creates records when a user
> > queue fence completes.
> >
> > Add an IRQ-safe helper which appends a WAIT_EVENT record using the
> > queue pointer as the internal routing key. The record takes a queue
> > reference before it is published and releases it through the existing
> > record cleanup paths.
> >
> > The producer does not translate the queue pointer back to a queue ID.
> > Instead, the WAIT_EVENT ioctl adds the queue ID supplied by the waiter
> > to the matched record immediately before returning it to userspace.
> > This keeps queue IDs at the UAPI boundary while retaining
> > queue-pointer-based matching internally.
> >
> > Call the helper from amdgpu_userq_process_fence_irq(), next to the
> > existing EVENTFD notification. This reuses the established
> > doorbell-to-queue lookup and does not add another queue lookup or
> > change the GFX interrupt handling.
> >
> > Signed-off-by: Srinivasan Shanmugam <[email protected]>
> > Reviewed-by: Alex Deucher <[email protected]>
>
> What you do with the queue_id still looks a bit fishy to me, but I don't 
> really have
> time to check that in detail.

Thanks, Christian.
The intent is to keep queue_id at the UAPI boundary only.
The WAIT_EVENT ioctl resolves the userspace queue_id to a struct 
amdgpu_usermode_queue *,
matching is performed using the queue pointer internally,
and the original queue_id from the waiter is populated into the returned 
metadata immediately before copying it to userspace.
This avoids introducing queue_id-based matching internally while preserving the 
existing UAPI.

Best regards,
Srini

>
> Acked-by: Christian König <[email protected]>
>
> Regards,
> Christian.

Reply via email to