This patch series introduces fence drivers for usermode graphics queues synchronization. The idea here is, we insert a hardware fence signal command at the end of user process graphics rendering commands and the creates a fence using the current wptr. On the Otherhand, a process required to access these shared resources should wait on the fence address/wptr value provided by the driver through wait ioctl function. Here the hardware/firmware supposed to write the read pointer into fence address. Hence the process waiting on the fence address equating the fence address (wptr) >= rptr, before start consuming the buffers. This way we achieve the implicit synchronization among userspace process for the shared resources. The core usermode queue and doorbell design patches in review are seen below which are prerequisites for this work. Task 1: https://patchwork.freedesktop.org/series/114065/ Task 2: https://patchwork.freedesktop.org/series/113669/#rev2 Alex Deucher (1): drm/amdgpu: UAPI headers for userqueue Secure semaphore Arunpravin Paneer Selvam (5): drm/amdgpu: Implement a new 64bit sequence memory driver drm/amdgpu: Implement a new userqueue fence driver drm/amdgpu: Add mqd support for the fence address drm/amdgpu: Implement userqueue signal/wait IOCTL functions drm/amdgpu: Enable userqueue fence interrupt handling support drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 + drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c | 158 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.h | 48 ++ .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 512 ++++++++++++++++++ .../gpu/drm/amd/amdgpu/amdgpu_userq_fence.h | 68 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 21 + .../amd/amdgpu/amdgpu_userqueue_mqd_gfx_v11.c | 4 + drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 20 +- .../gpu/drm/amd/include/amdgpu_userqueue.h | 2 + drivers/gpu/drm/amd/include/v11_structs.h | 4 +- include/uapi/drm/amdgpu_drm.h | 46 ++ 15 files changed, 919 insertions(+), 4 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.h create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.h -- 2.25.1