[PATCH v3 1/9] drm/amdgpu: UAPI for user queue management

Alex Deucher alexdeucher at gmail.com
Thu Mar 30 15:08:07 UTC 2023


On Thu, Mar 30, 2023 at 6:40 AM Christian König
<ckoenig.leichtzumerken at gmail.com> wrote:
>
> Am 30.03.23 um 10:15 schrieb Shashank Sharma:
> > Hello Pierre-Eric,
> > [SNIP]
> >> I'm also wondering why the doorbell needs a handle+offset but
> >> other buffers are passed in as virtual addresses?
> >>
> > As you know, doorbell offset here will be an relative offset in this
> > doorbell page, but the MQD needs the absolute offset on the doorbell
> > PCI BAR.
> >
> > So kernel needs both the object as well as relative offset to
> > calculate absolute offset.
> >
> > something like: absolute offset = base offset of this doorbell page +
> > relative offset of this doorbell.
>
> Another much more obvious reason is that the doorbell doesn't have a
> virtual address.
>
> At least for GFX the doorbell is used to signal to the hw that new
> commands are available. So as long as we don't want a shader to kick of
> other work we don't need to map the doorbell into the GPUVM address space.

This certainly could be done if the app wanted to, but to set up the
queue in the firmware API we need the index within the doorbell BAR.

Alex


More information about the amd-gfx mailing list