drm/amdkfd: Centralize IOMMUv2 code and make it conditional
authorFelix Kuehling <Felix.Kuehling@amd.com>
Sat, 9 Dec 2017 00:22:12 +0000 (19:22 -0500)
committerOded Gabbay <oded.gabbay@gmail.com>
Sat, 9 Dec 2017 00:22:12 +0000 (19:22 -0500)
commit64d1c3a43a6fb5cef32a085bc17cbbe31945a651
tree82fca8695c5979227fc4392691590932456bc090
parent4c660c8fbbf7b0d65a402f51e5f30a246cf3c44c
drm/amdkfd: Centralize IOMMUv2 code and make it conditional

dGPUs work without IOMMUv2. Make IOMMUv2 initialization dependent on
ASIC information. Also allow building KFD without IOMMUv2 support.
This is still useful for dGPUs and prepares for enabling KFD on
architectures that don't support AMD IOMMUv2.

v2:
* Centralize IOMMUv2 code to avoid #ifdefs in too many places

v3:
* Imply AMD_IOMMU_V2 in Kconfig

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian Konig <christian.koenig@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/gpu/drm/amd/amdkfd/Kconfig
drivers/gpu/drm/amd/amdkfd/Makefile
drivers/gpu/drm/amd/amdkfd/kfd_crat.c
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/amdkfd/kfd_events.c
drivers/gpu/drm/amd/amdkfd/kfd_iommu.c [new file with mode: 0644]
drivers/gpu/drm/amd/amdkfd/kfd_iommu.h [new file with mode: 0644]
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.h