Skip to contentSkip to conversation

drm/amdkfd: fix the build when CIK support is disabled

PATCH In review Alex Deucher 2 participants 3 messages Oct 4, 2019 – Oct 7, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd: fix the build when CIK support is disabled

Add proper ifdefs around CIK code in kfd setup.

---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +6 -0
index 0db273587af4..d898adf25fbb 100644
@@ -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,
Signature · 6 lines
2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20191004141529.5342-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Ping...

Quoted 39 lines · Alex Deucher

Add proper ifdefs around CIK code in kfd setup.

---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +6 -1
index 0db273587af4..d898adf25fbb 100644
@@ -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,
--
Quoted 2 lines

2.20.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Felix Kuehling
#3 lore raw
In reply to a message not in the archive
Quoted 3 lines · Alex Deucher

Add proper ifdefs around CIK code in kfd setup.

Thanks!

Quoted 24 lines
---
  drivers/gpu/drm/amd/amdkfd/kfd_device.c | 6 ++++++
  1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +3 -0
index 0db273587af4..d898adf25fbb 100644
@@ -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,

drivers/gpu/drm/amd/amdkfd/kfd_device.c extern const struct kfd2kgd_calls gfx_v10_kfd2kgd; · line 63

Quoted 10 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +3 -0
+#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,

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx