drm/amdgpu: map usermode queue into MES
authorShashank Sharma <shashank.sharma@amd.com>
Thu, 2 May 2024 10:13:37 +0000 (12:13 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Apr 2025 20:48:15 +0000 (16:48 -0400)
commit6c42559f70c57590681563ebf325bd3cfd6cd13c
treec6fcc7f6c8018c87b1ad740886a1ebd2d30bda0d
parentdefb41e8ef3a7d0421009de58d74da54ca25da76
drm/amdgpu: map usermode queue into MES

This patch adds new functions to map/unmap a usermode queue into
the FW, using the MES ring. As soon as this mapping is done, the
queue would  be considered ready to accept the workload.

V1: Addressed review comments from Alex on the RFC patch series
    - Map/Unmap should be IP specific.
V2:
    Addressed review comments from Christian:
    - Fix the wptr_mc_addr calculation (moved into another patch)
    Addressed review comments from Alex:
    - Do not add fptrs for map/unmap

V3:  Integration with doorbell manager
V4:  Rebase
V5:  Use gfx_v11_0 for function names (Alex)
V6:  Removed queue->proc/gang/fw_ctx_address variables and doing the
     address calculations locally to keep the queue structure GEN
     independent (Alex)
V7:  Added R-B from Alex
V8:  Rebase
V9:  Rebase
V10: Rebase

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/mes_v11_0_userqueue.c