[RFC 0/7] RFC: Usermode queue for AMDGPU driver

Alex Deucher alexdeucher at gmail.com
Thu Dec 29 18:02:58 UTC 2022


On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma <shashank.sharma at amd.com> wrote:
>
> This is a RFC series to implement usermode graphics queues for AMDGPU
> driver (Navi 3X and above). The idea of usermode graphics queue is to
> allow direct workload submission from a userspace graphics process who
> has amdgpu graphics context.
>
> Once we have some initial feedback on the design, we will publish a
> follow up V1 series with a libdrm consumer test.

I think this should look more like the following:
1. Convert doorbells to full fledged GEM objects just like vram.  Then
update the GEM IOCTL to allow allocation of doorbell BOs.
2. Store MQD data per amdgpu_ctx.
3. Create secure semaphore pool and map RO into each GPUVM.
4. Add callbacks to each IP type that supports user mode queues.
These callbacks should handle the IP specific MQD initialization and
mapping/unmapping details including allocation of BOs for the MQD
itself and any relevant metadata.  The USERQ IOCTL handler will look
up the callback based on the IP type specified in the IOCTL.

Alex

>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Christian Koenig <christian.koenig at amd.com>
>
> Alex Deucher (1):
>   drm/amdgpu: UAPI for user queue management
>
> Arunpravin Paneer Selvam (1):
>   drm/amdgpu: Secure semaphore for usermode queue
>
> Arvind Yadav (1):
>   drm/amdgpu: Create MQD for userspace queue
>
> Shashank Sharma (4):
>   drm/amdgpu: Add usermode queue for gfx work
>   drm/amdgpu: Allocate doorbell slot for user queue
>   drm/amdgpu: Create context for usermode queue
>   drm/amdgpu: Map userqueue into HW
>
>  drivers/gpu/drm/amd/amdgpu/Makefile           |   3 +
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h           |  14 +
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h       |   1 +
>  drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 486 ++++++++++++++++
>  .../amd/amdgpu/amdgpu_userqueue_secure_sem.c  | 245 ++++++++
>  .../drm/amd/include/amdgpu_usermode_queue.h   |  68 +++
>  .../amd/include/amdgpu_usermode_queue_mqd.h   | 544 ++++++++++++++++++
>  include/uapi/drm/amdgpu_drm.h                 |  52 ++
>  8 files changed, 1413 insertions(+)
>  create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c
>  create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue_secure_sem.c
>  create mode 100644 drivers/gpu/drm/amd/include/amdgpu_usermode_queue.h
>  create mode 100644 drivers/gpu/drm/amd/include/amdgpu_usermode_queue_mqd.h
>
> --
> 2.34.1
>


More information about the amd-gfx mailing list