drm/amdgpu: Implement a new 64bit sequence memory driver
authorArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Tue, 10 Oct 2023 14:35:06 +0000 (07:35 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Nov 2023 14:29:53 +0000 (09:29 -0500)
commitc8031019dc95e3ab7cc0b09f1894c5f52dc0c187
tree55eddd0b4ed3ecf7977d72bdfdec1402300ec7d1
parente8c2d3e25b844ad8f7c8b269a7cfd65285329264
drm/amdgpu: Implement a new 64bit sequence memory driver

Developed a new driver which allocates a 64bit memory on
each request in sequence order. At the moment, user queue
fence memory is the main consumer of this seq64 driver.

v2: Worked on review comments from Christian for the following
    modifications

    - Move driver name from "semaphore" to "seq64"
    - Remove unnecessary PT/PD mapping
    - Move enable_mes check into init/fini functions.

v3: Worked on review comments from Christian

    - drop enable_mes check
    - use DECLARE_BITMAP for bit array
    - added kerneldoc for seq64

v4: Worked on review comments from Christian
    - Rename amdgpu_seq64_get name with amdgpu_seq64_alloc

v5: Worked on review comments from Christian
    - Fix seq64 lockdep warning
    - move fpriv->seq64_va check into amdgpu_seq64_unmap()
    - make the function amdgpu_seq64_unmap() return as void.
    - reserve the buffers as not interruptible.

v6: port to drm_exec (Alex)
v7: disable for now (Arun)

Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/Makefile
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.c [new file with mode: 0644]
drivers/gpu/drm/amd/amdgpu/amdgpu_seq64.h [new file with mode: 0644]