diff mbox

drm/amdgpu: Add amdkfd softdep

Message ID 1472145033-24370-1-git-send-email-mmarek@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Marek Aug. 25, 2016, 5:10 p.m. UTC
amdgpu loads amdkfd via symbol_request(). Add a softdep hint so that
userspace knows that amdgpu needs amdkfd in the initrd.

Reported-and-tested-by: Martin Jambor <mjambor@suse.cz>
Signed-off-by: Michal Marek <mmarek@suse.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Michel Dänzer Aug. 26, 2016, 2:20 a.m. UTC | #1
On 26/08/16 02:10 AM, Michal Marek wrote:
> amdgpu loads amdkfd via symbol_request(). Add a softdep hint so that
> userspace knows that amdgpu needs amdkfd in the initrd.
> 
> Reported-and-tested-by: Martin Jambor <mjambor@suse.cz>
> Signed-off-by: Michal Marek <mmarek@suse.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 9aa533cf4ad1..9c469cd311ca 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -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)?
Michal Marek Aug. 26, 2016, 9:16 a.m. UTC | #2
On 2016-08-26 04:20, Michel Dänzer wrote:
> On 26/08/16 02:10 AM, Michal Marek wrote:
>> amdgpu loads amdkfd via symbol_request(). Add a softdep hint so that
>> userspace knows that amdgpu needs amdkfd in the initrd.
>>
>> Reported-and-tested-by: Martin Jambor <mjambor@suse.cz>
>> Signed-off-by: Michal Marek <mmarek@suse.com>
>> ---
>>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
>> index 9aa533cf4ad1..9c469cd311ca 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
>> @@ -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
Michel Dänzer Aug. 29, 2016, 1:37 a.m. UTC | #3
On 26/08/16 06:16 PM, Michal Marek wrote:
> On 2016-08-26 04:20, Michel Dänzer wrote:
>> On 26/08/16 02:10 AM, Michal Marek wrote:
>>> amdgpu loads amdkfd via symbol_request(). Add a softdep hint so that
>>> userspace knows that amdgpu needs amdkfd in the initrd.
>>>
>>> Reported-and-tested-by: Martin Jambor <mjambor@suse.cz>
>>> Signed-off-by: Michal Marek <mmarek@suse.com>
>>> ---
>>>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
>>> index 9aa533cf4ad1..9c469cd311ca 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
>>> @@ -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.

Thanks for the clarification.

The radeon driver probably needs this as well?
Michal Marek Aug. 29, 2016, 1:03 p.m. UTC | #4
On 2016-08-29 03:37, Michel Dänzer wrote:
> On 26/08/16 06:16 PM, Michal Marek wrote:
>> 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
diff mbox

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 9aa533cf4ad1..9c469cd311ca 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -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");