Skip to contentSkip to conversation

drm/amdgpu: Add amdkfd softdep

PATCH Superseded Michal Marek 2 participants 6 messages Aug 25, 2016 – Aug 29, 2016

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

PATCH 1/1 drm/amdgpu: Add amdkfd softdep

amdgpu loads amdkfd via symbol_request(). Add a softdep hint so that userspace knows that amdgpu needs amdkfd in the initrd.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -0
index 9aa533cf4ad1..9c469cd311ca 100644
@@ -633,3 +633,4 @@ module_exit(amdgpu_exit);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
+MODULE_SOFTDEP("pre: amdkfd");
Signature · 6 lines
2.6.6

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 14 lines · Michal Marek

amdgpu loads amdkfd via symbol_request(). Add a softdep hint so that userspace knows that amdgpu needs amdkfd in the initrd.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -0
index 9aa533cf4ad1..9c469cd311ca 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_exit(amdgpu_exit); · line 636

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -0
@@ -633,3 +633,4 @@ module_exit(amdgpu_exit);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
+MODULE_SOFTDEP("pre: amdkfd");

Will this work if amdkfd isn't built (CONFIG_HSA_AMD=n)?

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
Quoted 10 lines · Michel Dänzer
Quoted 9 lines · Michal Marek

amdgpu loads amdkfd via symbol_request(). Add a softdep hint so that userspace knows that amdgpu needs amdkfd in the initrd.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 11 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_exit(amdgpu_exit); · line 636

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -0
index 9aa533cf4ad1..9c469cd311ca 100644
@@ -633,3 +633,4 @@ module_exit(amdgpu_exit);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
+MODULE_SOFTDEP("pre: amdkfd");

Will this work if amdkfd isn't built (CONFIG_HSA_AMD=n)?

It's a soft dependency, so it will be silently ignored. /sbin/modprobe --show-depends amdgpu will only list amdgpu.ko and its hard depedencies.

Michal

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

#3 lore raw
Quoted 23 lines · Michal Marek
Quoted 10 lines · Michel Dänzer
Quoted 9 lines · Michal Marek

amdgpu loads amdkfd via symbol_request(). Add a softdep hint so that userspace knows that amdgpu needs amdkfd in the initrd.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 11 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c module_exit(amdgpu_exit); · line 636

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -0
index 9aa533cf4ad1..9c469cd311ca 100644
@@ -633,3 +633,4 @@ module_exit(amdgpu_exit);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
+MODULE_SOFTDEP("pre: amdkfd");

Will this work if amdkfd isn't built (CONFIG_HSA_AMD=n)?

Quoted 2 lines

It's a soft dependency, so it will be silently ignored. /sbin/modprobe --show-depends amdgpu will only list amdgpu.ko and its hard depedencies.

Thanks for the clarification.

The radeon driver probably needs this as well?

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

PATCH v2 1/1 amdgpu, radeon: Add amdkfd softdep

Both amdgpu and radeon load amdkfd via symbol_request(). Add a softdep hint so that userspace knows that each of them needs amdkfd in the initrd.

---
v2: Also patch radeon

 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 drivers/gpu/drm/radeon/radeon_drv.c     | 1 +
 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +1 -0
index 9aa533cf4ad1..9c469cd311ca 100644
@@ -633,3 +633,4 @@ module_exit(amdgpu_exit);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
+MODULE_SOFTDEP("pre: amdkfd");
drivers/gpu/drm/radeon/radeon_drv.c +1 -0
index c01a7c6abb49..0a60125c0138 100644
@@ -617,3 +617,4 @@ module_exit(radeon_exit);
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL and additional rights");
+MODULE_SOFTDEP("pre: amdkfd");
Signature · 6 lines
2.6.6

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw
In reply to Michel Dänzer
Quoted 7 lines · Michel Dänzer
Quoted 2 lines · Michal Marek

It's a soft dependency, so it will be silently ignored. /sbin/modprobe --show-depends amdgpu will only list amdgpu.ko and its hard depedencies.

Thanks for the clarification.

The radeon driver probably needs this as well?

You are right. I sent a v2 covering radeon as well.

Thanks,
Michal
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel