Avoid overloading the GEM_CREATE ioctl with special cases. Instead,
userspace access to global objects (including the MMIO_REMAP BO) is
routed through a dedicated AMDGPU_GEM_OP_OPEN_GLOBAL path.

Overview:
drm/amdgpu: Rework MMIO_REMAP BO creation Allocate a global MMIO_REMAP
BO without relying on a GEM domain bit and pin it explicitly in the
AMDGPU_PL_MMIO_REMAP placement.

drm/amdgpu: Add AMDGPU_GEM_OP_OPEN_GLOBAL Introduce a dedicated GEM_OP
to open global BOs from userspace, avoiding special-case behavior in
GEM_CREATE and removing the need for userspace to know internal BO
parameters.

drm/amdgpu: Drop MMIO_REMAP domain bit and keep it internal Remove the
unused UAPI domain bit and adjust accounting so MMIO_REMAP remains
visible in fdinfo/mem-stats via its TTM placement.

Christian König (3):
  drm/amdgpu: Rework MMIO_REMAP BO creation
  drm/amdgpu: Add AMDGPU_GEM_OP_OPEN_GLOBAL
  drm/amdgpu: Drop MMIO_REMAP domain bit and keep it internal

 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c    | 47 ++++++++++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 21 +++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.h |  2 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c    | 77 ++++++++++++++--------
 include/uapi/drm/amdgpu_drm.h              | 17 +++--
 5 files changed, 108 insertions(+), 56 deletions(-)

-- 
2.34.1

Reply via email to