summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2019-10-04 09:14:35 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-10-07 15:11:32 -0500
commita3e520a25ce85f84a7f589af2b6ec38af96caa12 (patch)
tree892d3cb88b0e97f5e31fd3d210859b4d52aa4733
parent23c61b4599c46cddd7c36e1e3f7a9a340cf98ce8 (diff)
drm/amdkfd: fix the build when CIK support is disabled
Add proper ifdefs around CIK code in kfd setup. Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 070c9b5593c9..8f4b24e84964 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -39,7 +39,9 @@
*/
static atomic_t kfd_locked = ATOMIC_INIT(0);
+#ifdef CONFIG_DRM_AMDGPU_CIK
extern const struct kfd2kgd_calls gfx_v7_kfd2kgd;
+#endif
extern const struct kfd2kgd_calls gfx_v8_kfd2kgd;
extern const struct kfd2kgd_calls gfx_v9_kfd2kgd;
extern const struct kfd2kgd_calls arcturus_kfd2kgd;
@@ -47,11 +49,15 @@ extern const struct kfd2kgd_calls gfx_v10_kfd2kgd;
static const struct kfd2kgd_calls *kfd2kgd_funcs[] = {
#ifdef KFD_SUPPORT_IOMMU_V2
+#ifdef CONFIG_DRM_AMDGPU_CIK
[CHIP_KAVERI] = &gfx_v7_kfd2kgd,
+#endif
[CHIP_CARRIZO] = &gfx_v8_kfd2kgd,
[CHIP_RAVEN] = &gfx_v9_kfd2kgd,
#endif
+#ifdef CONFIG_DRM_AMDGPU_CIK
[CHIP_HAWAII] = &gfx_v7_kfd2kgd,
+#endif
[CHIP_TONGA] = &gfx_v8_kfd2kgd,
[CHIP_FIJI] = &gfx_v8_kfd2kgd,
[CHIP_POLARIS10] = &gfx_v8_kfd2kgd,