OSDN Git Service

drm/amdkfd: Expose HDP registers to user space
authorOak Zeng <Oak.Zeng@amd.com>
Thu, 11 Apr 2019 19:43:39 +0000 (14:43 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 May 2019 17:20:47 +0000 (12:20 -0500)
commitd8e408a82704c86ba87c3d58cfe69dcdb758aa07
tree3cb4be068142e653816c43541852b5116283a4ff
parent88807dc8d573c0f718d0d26f592f212c5a487cf0
drm/amdkfd: Expose HDP registers to user space

Introduce a new memory type (KFD_IOC_ALLOC_MEM_FLAGS_MMIO_REMAP) and
expose mmio page of HDP registers to user space through this new
memory type.

v2: moved remapped hdp regs to adev struct
v3: rename the new memory type to ALLOC_MEM_FLAGS_MMIO_REMAP
v4: use more generic function name
v5: Fail remapped mmio allocation for asics before gfx9

Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/include/kgd_kfd_interface.h
include/uapi/linux/kfd_ioctl.h