Skip to contentSkip to conversation

drm/amdkfd: fix kgd2kfd_device_init() definition conflict error

PATCH In review Liang, Prike 4 participants 4 messages Sep 27, 2019 2 messages not in the archive

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

PATCH 1/1 drm/amdkfd: fix kgd2kfd_device_init() definition conflict error

The patch c670707 drm/amd: Pass drm_device to kfd introduced this issue and fix the following compiler error.

CC [M] drivers/gpu/drm/amd/amdgpu//../powerplay/smumgr/fiji_smumgr.o
drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:746:6: error: conflicting types for ‘kgd2kfd_device_init’
bool kgd2kfd_device_init(struct kfd_dev *kfd,

      ^
In file included from drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:23:0:
drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.h:253:6: note: previous declaration of ‘kgd2kfd_device_init’ was here
 bool kgd2kfd_device_init(struct kfd_dev *kfd,
      ^

scripts/Makefile.build:273: recipe for target 'drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.o' failed make[1]: *** [drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.o] Error 1

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +1 -0
index 221047d..92666b1 100644
@@ -744,6 +744,7 @@ struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, struct pci_dev *pdev,
 }
 
 bool kgd2kfd_device_init(struct kfd_dev *kfd,
+			 struct drm_device *ddev,
 			 const struct kgd2kfd_shared_resources *gpu_resources)
 {
 	return false;
Signature · 6 lines
2.7.4

_______________________________________________
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): 1569558805-30951-1-git-send-email-Prike.Liang-5C7GfCeVMHo@public.gmane.org

Acked-by Evan Quan
#2 lore raw

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Liang, Prike
Sent: Friday, September 27, 2019 12:34 PM
To: [email protected]
Cc: Kuehling, Felix <[email protected]>; Huang, Ray <[email protected]>; Kasiviswanathan, Harish <[email protected]>; Liang, Prike <[email protected]>
Subject: [PATCH] drm/amdkfd: fix kgd2kfd_device_init() definition conflict error

The patch c670707 drm/amd: Pass drm_device to kfd introduced this issue and fix the following compiler error.

CC [M] drivers/gpu/drm/amd/amdgpu//../powerplay/smumgr/fiji_smumgr.o
drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:746:6: error: conflicting types for ‘kgd2kfd_device_init’
bool kgd2kfd_device_init(struct kfd_dev *kfd,

      ^
In file included from drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:23:0:
drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.h:253:6: note: previous declaration of ‘kgd2kfd_device_init’ was here  bool kgd2kfd_device_init(struct kfd_dev *kfd,
      ^

scripts/Makefile.build:273: recipe for target 'drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.o' failed make[1]: *** [drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.o] Error 1

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +1 -1
index 221047d..92666b1 100644
@@ -744,6 +744,7 @@ struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, struct pci_dev *pdev,  }
 
 bool kgd2kfd_device_init(struct kfd_dev *kfd,
+			 struct drm_device *ddev,
 			 const struct kgd2kfd_shared_resources *gpu_resources)  {
 	return false;
--

2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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 11 lines · Prike

The patch c670707 drm/amd: Pass drm_device to kfd introduced this issue and fix the following compiler error.

CC [M] drivers/gpu/drm/amd/amdgpu//../powerplay/smumgr/fiji_smumgr.o
drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:746:6: error: conflicting types for ‘kgd2kfd_device_init’
bool kgd2kfd_device_init(struct kfd_dev *kfd,

       ^
In file included from drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:23:0:
drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.h:253:6: note: previous declaration of ‘kgd2kfd_device_init’ was here
  bool kgd2kfd_device_init(struct kfd_dev *kfd,
       ^
Quoted 4 lines

scripts/Makefile.build:273: recipe for target 'drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.o' failed make[1]: *** [drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.o] Error 1

This fix is for the case that CONFIG_HSA_AMD is disabled. Sorry for missing that when reviewing Harish's code.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +0 -0
index 221047d..92666b1 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, struct pci_dev *pdev, · line 750

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +1 -0
@@ -744,6 +744,7 @@ struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, struct pci_dev *pdev,
  }
 
  bool kgd2kfd_device_init(struct kfd_dev *kfd,
+			 struct drm_device *ddev,
  			 const struct kgd2kfd_shared_resources *gpu_resources)
  {
  	return false;

_______________________________________________
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): c7587938-62b1-e050-5d0f-073f94827e51-5C7GfCeVMHo@public.gmane.org

Reviewed-by Felix Kuehling
#5 lore raw

Sorry missed it too. Thanks for fixing it.

Best Regards,
Harish

-----Original Message-----
From: Kuehling, Felix <[email protected]>
Sent: Friday, September 27, 2019 10:19 AM
To: Liang, Prike <[email protected]>; [email protected]
Cc: Kasiviswanathan, Harish <[email protected]>; Huang, Ray <[email protected]>
Subject: Re: [PATCH] drm/amdkfd: fix kgd2kfd_device_init() definition conflict error

Quoted 11 lines · Prike

The patch c670707 drm/amd: Pass drm_device to kfd introduced this issue and fix the following compiler error.

CC [M] drivers/gpu/drm/amd/amdgpu//../powerplay/smumgr/fiji_smumgr.o
drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:746:6: error: conflicting types for ‘kgd2kfd_device_init’
bool kgd2kfd_device_init(struct kfd_dev *kfd,

       ^
In file included from drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:23:0:
drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.h:253:6: note: previous declaration of ‘kgd2kfd_device_init’ was here
  bool kgd2kfd_device_init(struct kfd_dev *kfd,
       ^
Quoted 4 lines

scripts/Makefile.build:273: recipe for target 'drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.o' failed make[1]: *** [drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.o] Error 1

This fix is for the case that CONFIG_HSA_AMD is disabled. Sorry for missing that when reviewing Harish's code.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +0 -0
index 221047d..92666b1 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, struct pci_dev *pdev, · line 750

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +1 -0
@@ -744,6 +744,7 @@ struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd, struct pci_dev *pdev,
  }
 
  bool kgd2kfd_device_init(struct kfd_dev *kfd,
+			 struct drm_device *ddev,
  			 const struct kgd2kfd_shared_resources *gpu_resources)
  {
  	return false;

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