* [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
@ 2021-01-15 18:24 Felix Kuehling
2021-01-18 7:53 ` Christian König
2021-01-18 15:04 ` Christian König
0 siblings, 2 replies; 8+ messages in thread
From: Felix Kuehling @ 2021-01-15 18:24 UTC (permalink / raw)
To: amd-gfx
ROCm user mode depends on userptr support. Without it, KFD is basically
useless.
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig
index e8fb10c41f16..2800b2bb2522 100644
--- a/drivers/gpu/drm/amd/amdkfd/Kconfig
+++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
@@ -8,5 +8,6 @@ config HSA_AMD
depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
imply AMD_IOMMU_V2 if X86_64
select MMU_NOTIFIER
+ select DRM_AMDGPU_USERPTR
help
Enable this if you want to use HSA features on AMD GPU devices.
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
2021-01-15 18:24 [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled Felix Kuehling
@ 2021-01-18 7:53 ` Christian König
2021-01-18 14:37 ` Felix Kuehling
2021-01-18 15:04 ` Christian König
1 sibling, 1 reply; 8+ messages in thread
From: Christian König @ 2021-01-18 7:53 UTC (permalink / raw)
To: Felix Kuehling, amd-gfx
Am 15.01.21 um 19:24 schrieb Felix Kuehling:
> ROCm user mode depends on userptr support. Without it, KFD is basically
> useless.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig
> index e8fb10c41f16..2800b2bb2522 100644
> --- a/drivers/gpu/drm/amd/amdkfd/Kconfig
> +++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
> @@ -8,5 +8,6 @@ config HSA_AMD
> depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
> imply AMD_IOMMU_V2 if X86_64
> select MMU_NOTIFIER
> + select DRM_AMDGPU_USERPTR
I think we should rather make that a depends on. Otherwise we select a
visible config option.
Christian.
> help
> Enable this if you want to use HSA features on AMD GPU devices.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
2021-01-18 7:53 ` Christian König
@ 2021-01-18 14:37 ` Felix Kuehling
2021-01-18 14:53 ` Christian König
0 siblings, 1 reply; 8+ messages in thread
From: Felix Kuehling @ 2021-01-18 14:37 UTC (permalink / raw)
To: christian.koenig, amd-gfx
Am 2021-01-18 um 2:53 a.m. schrieb Christian König:
> Am 15.01.21 um 19:24 schrieb Felix Kuehling:
>> ROCm user mode depends on userptr support. Without it, KFD is basically
>> useless.
>>
>> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig
>> b/drivers/gpu/drm/amd/amdkfd/Kconfig
>> index e8fb10c41f16..2800b2bb2522 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/Kconfig
>> +++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
>> @@ -8,5 +8,6 @@ config HSA_AMD
>> depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
>> imply AMD_IOMMU_V2 if X86_64
>> select MMU_NOTIFIER
>> + select DRM_AMDGPU_USERPTR
>
> I think we should rather make that a depends on. Otherwise we select a
> visible config option.
I was considering that. The problem with that is, that the HSA_AMD
option won't even show up in menuconfig unless DRM_AMDGPU_USERPTR is
selected. I'd rather always show the HSA_AMD option and select what it
needs.
Is there a good reason why AMDGPU_USERPTR is a "visible" config option?
What would be a reason for a user to deliberately disable this?
Regards,
Felix
>
> Christian.
>
>> help
>> Enable this if you want to use HSA features on AMD GPU devices.
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
2021-01-18 14:37 ` Felix Kuehling
@ 2021-01-18 14:53 ` Christian König
2021-01-18 14:55 ` Felix Kuehling
0 siblings, 1 reply; 8+ messages in thread
From: Christian König @ 2021-01-18 14:53 UTC (permalink / raw)
To: Felix Kuehling, amd-gfx
Am 18.01.21 um 15:37 schrieb Felix Kuehling:
> Am 2021-01-18 um 2:53 a.m. schrieb Christian König:
>> Am 15.01.21 um 19:24 schrieb Felix Kuehling:
>>> ROCm user mode depends on userptr support. Without it, KFD is basically
>>> useless.
>>>
>>> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig
>>> b/drivers/gpu/drm/amd/amdkfd/Kconfig
>>> index e8fb10c41f16..2800b2bb2522 100644
>>> --- a/drivers/gpu/drm/amd/amdkfd/Kconfig
>>> +++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
>>> @@ -8,5 +8,6 @@ config HSA_AMD
>>> depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
>>> imply AMD_IOMMU_V2 if X86_64
>>> select MMU_NOTIFIER
>>> + select DRM_AMDGPU_USERPTR
>> I think we should rather make that a depends on. Otherwise we select a
>> visible config option.
> I was considering that. The problem with that is, that the HSA_AMD
> option won't even show up in menuconfig unless DRM_AMDGPU_USERPTR is
> selected. I'd rather always show the HSA_AMD option and select what it
> needs.
>
> Is there a good reason why AMDGPU_USERPTR is a "visible" config option?
> What would be a reason for a user to deliberately disable this?
The problem is the MMU notifier dependency, not everybody wants its.
I'm just not sure if it's legal to forcefully select a visible config
option. E.g. what happens if an user unselects DRM_AMDGPU_USERPTR after
it was selected here?
Regards,
Christian.
>
> Regards,
> Felix
>
>
>> Christian.
>>
>>> help
>>> Enable this if you want to use HSA features on AMD GPU devices.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
2021-01-18 14:53 ` Christian König
@ 2021-01-18 14:55 ` Felix Kuehling
2021-01-18 14:56 ` Christian König
0 siblings, 1 reply; 8+ messages in thread
From: Felix Kuehling @ 2021-01-18 14:55 UTC (permalink / raw)
To: Christian König, amd-gfx
Am 2021-01-18 um 9:53 a.m. schrieb Christian König:
> Am 18.01.21 um 15:37 schrieb Felix Kuehling:
>> Am 2021-01-18 um 2:53 a.m. schrieb Christian König:
>>> Am 15.01.21 um 19:24 schrieb Felix Kuehling:
>>>> ROCm user mode depends on userptr support. Without it, KFD is
>>>> basically
>>>> useless.
>>>>
>>>> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
>>>> ---
>>>> drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig
>>>> b/drivers/gpu/drm/amd/amdkfd/Kconfig
>>>> index e8fb10c41f16..2800b2bb2522 100644
>>>> --- a/drivers/gpu/drm/amd/amdkfd/Kconfig
>>>> +++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
>>>> @@ -8,5 +8,6 @@ config HSA_AMD
>>>> depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
>>>> imply AMD_IOMMU_V2 if X86_64
>>>> select MMU_NOTIFIER
>>>> + select DRM_AMDGPU_USERPTR
>>> I think we should rather make that a depends on. Otherwise we select a
>>> visible config option.
>> I was considering that. The problem with that is, that the HSA_AMD
>> option won't even show up in menuconfig unless DRM_AMDGPU_USERPTR is
>> selected. I'd rather always show the HSA_AMD option and select what it
>> needs.
>>
>> Is there a good reason why AMDGPU_USERPTR is a "visible" config option?
>> What would be a reason for a user to deliberately disable this?
>
> The problem is the MMU notifier dependency, not everybody wants its.
Well, KFD already selects MMU_NOTIFIER. So selecting DRM_AMDGPU_USERPTR
won't do any more harm.
Regards,
Felix
>
> I'm just not sure if it's legal to forcefully select a visible config
> option. E.g. what happens if an user unselects DRM_AMDGPU_USERPTR
> after it was selected here?
>
> Regards,
> Christian.
>
>>
>> Regards,
>> Felix
>>
>>
>>> Christian.
>>>
>>>> help
>>>> Enable this if you want to use HSA features on AMD GPU
>>>> devices.
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
2021-01-18 14:55 ` Felix Kuehling
@ 2021-01-18 14:56 ` Christian König
0 siblings, 0 replies; 8+ messages in thread
From: Christian König @ 2021-01-18 14:56 UTC (permalink / raw)
To: Felix Kuehling, amd-gfx
Am 18.01.21 um 15:55 schrieb Felix Kuehling:
> Am 2021-01-18 um 9:53 a.m. schrieb Christian König:
>> Am 18.01.21 um 15:37 schrieb Felix Kuehling:
>>> Am 2021-01-18 um 2:53 a.m. schrieb Christian König:
>>>> Am 15.01.21 um 19:24 schrieb Felix Kuehling:
>>>>> ROCm user mode depends on userptr support. Without it, KFD is
>>>>> basically
>>>>> useless.
>>>>>
>>>>> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
>>>>> ---
>>>>> drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +
>>>>> 1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig
>>>>> b/drivers/gpu/drm/amd/amdkfd/Kconfig
>>>>> index e8fb10c41f16..2800b2bb2522 100644
>>>>> --- a/drivers/gpu/drm/amd/amdkfd/Kconfig
>>>>> +++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
>>>>> @@ -8,5 +8,6 @@ config HSA_AMD
>>>>> depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
>>>>> imply AMD_IOMMU_V2 if X86_64
>>>>> select MMU_NOTIFIER
>>>>> + select DRM_AMDGPU_USERPTR
>>>> I think we should rather make that a depends on. Otherwise we select a
>>>> visible config option.
>>> I was considering that. The problem with that is, that the HSA_AMD
>>> option won't even show up in menuconfig unless DRM_AMDGPU_USERPTR is
>>> selected. I'd rather always show the HSA_AMD option and select what it
>>> needs.
>>>
>>> Is there a good reason why AMDGPU_USERPTR is a "visible" config option?
>>> What would be a reason for a user to deliberately disable this?
>> The problem is the MMU notifier dependency, not everybody wants its.
> Well, KFD already selects MMU_NOTIFIER. So selecting DRM_AMDGPU_USERPTR
> won't do any more harm.
Yeah, correct. But can you test what happens when you deselect USERPTR
after selecting KFD?
Regards,
Christian.
>
> Regards,
> Felix
>
>
>> I'm just not sure if it's legal to forcefully select a visible config
>> option. E.g. what happens if an user unselects DRM_AMDGPU_USERPTR
>> after it was selected here?
>>
>> Regards,
>> Christian.
>>
>>> Regards,
>>> Felix
>>>
>>>
>>>> Christian.
>>>>
>>>>> help
>>>>> Enable this if you want to use HSA features on AMD GPU
>>>>> devices.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
2021-01-15 18:24 [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled Felix Kuehling
2021-01-18 7:53 ` Christian König
@ 2021-01-18 15:04 ` Christian König
2021-01-18 16:16 ` Felix Kuehling
1 sibling, 1 reply; 8+ messages in thread
From: Christian König @ 2021-01-18 15:04 UTC (permalink / raw)
To: Felix Kuehling, amd-gfx
Am 15.01.21 um 19:24 schrieb Felix Kuehling:
> ROCm user mode depends on userptr support. Without it, KFD is basically
> useless.
>
> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig
> index e8fb10c41f16..2800b2bb2522 100644
> --- a/drivers/gpu/drm/amd/amdkfd/Kconfig
> +++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
> @@ -8,5 +8,6 @@ config HSA_AMD
> depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
> imply AMD_IOMMU_V2 if X86_64
> select MMU_NOTIFIER
> + select DRM_AMDGPU_USERPTR
> help
> Enable this if you want to use HSA features on AMD GPU devices.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
2021-01-18 15:04 ` Christian König
@ 2021-01-18 16:16 ` Felix Kuehling
0 siblings, 0 replies; 8+ messages in thread
From: Felix Kuehling @ 2021-01-18 16:16 UTC (permalink / raw)
To: christian.koenig, amd-gfx
Am 2021-01-18 um 10:04 a.m. schrieb Christian König:
> Am 15.01.21 um 19:24 schrieb Felix Kuehling:
>> ROCm user mode depends on userptr support. Without it, KFD is basically
>> useless.
>>
>> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
Thank you. For the record, the documentation recommends some precautions
when using "select" to avoid invalid configurations:
> By abusing select you are able to select a symbol FOO even
> if FOO depends on BAR that is not set.
> In general use select only for non-visible symbols
> (no prompts anywhere) and for symbols with no dependencies.
> That will limit the usefulness but on the other hand avoid
> the illegal configurations all over.
In this case I think we're fine because KFD already selects
MMU_NOTIFIER. To be safe, KFD should also select HMM_MIRROR explicitly.
Regards,
Felix
>
>> ---
>> drivers/gpu/drm/amd/amdkfd/Kconfig | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig
>> b/drivers/gpu/drm/amd/amdkfd/Kconfig
>> index e8fb10c41f16..2800b2bb2522 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/Kconfig
>> +++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
>> @@ -8,5 +8,6 @@ config HSA_AMD
>> depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
>> imply AMD_IOMMU_V2 if X86_64
>> select MMU_NOTIFIER
>> + select DRM_AMDGPU_USERPTR
>> help
>> Enable this if you want to use HSA features on AMD GPU devices.
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-01-18 16:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-15 18:24 [PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled Felix Kuehling
2021-01-18 7:53 ` Christian König
2021-01-18 14:37 ` Felix Kuehling
2021-01-18 14:53 ` Christian König
2021-01-18 14:55 ` Felix Kuehling
2021-01-18 14:56 ` Christian König
2021-01-18 15:04 ` Christian König
2021-01-18 16:16 ` Felix Kuehling
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.