All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
@ 2021-01-18 23:28 Felix Kuehling
  2021-01-19  1:01 ` philip yang
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Kuehling @ 2021-01-18 23:28 UTC (permalink / raw)
  To: amd-gfx

ROCm user mode depends on userptr support. Without it, KFD is basically
useless.

Make sure HSA_AMD selects the same options as DRM_AMDGPU_USERPTR to avoid
broken configurations where userptr gets enabled but its dependencies are
disabled.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig
index e8fb10c41f16..f02c938f75da 100644
--- a/drivers/gpu/drm/amd/amdkfd/Kconfig
+++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
@@ -7,6 +7,8 @@ config HSA_AMD
 	bool "HSA kernel driver for AMD GPU devices"
 	depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
 	imply AMD_IOMMU_V2 if X86_64
+	select HMM_MIRROR
 	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] 4+ messages in thread

* Re: [PATCH v2 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
  2021-01-18 23:28 [PATCH v2 1/1] drm/amdkfd: Enable userptr support when KFD is enabled Felix Kuehling
@ 2021-01-19  1:01 ` philip yang
  2021-01-19  1:20   ` Felix Kuehling
  0 siblings, 1 reply; 4+ messages in thread
From: philip yang @ 2021-01-19  1:01 UTC (permalink / raw)
  To: Felix Kuehling, amd-gfx

[-- Attachment #1: Type: text/html, Size: 1775 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
  2021-01-19  1:01 ` philip yang
@ 2021-01-19  1:20   ` Felix Kuehling
  2021-01-19  2:13     ` philip yang
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Kuehling @ 2021-01-19  1:20 UTC (permalink / raw)
  To: philip yang, amd-gfx

Am 2021-01-18 um 8:01 p.m. schrieb philip yang:
>
>
> On 2021-01-18 6:28 p.m., Felix Kuehling wrote:
>> ROCm user mode depends on userptr support. Without it, KFD is basically
>> useless.
>>
>> Make sure HSA_AMD selects the same options as DRM_AMDGPU_USERPTR to avoid
>> broken configurations where userptr gets enabled but its dependencies are
>> disabled.
>>
>> Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
>> ---
>>  drivers/gpu/drm/amd/amdkfd/Kconfig | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig
>> index e8fb10c41f16..f02c938f75da 100644
>> --- a/drivers/gpu/drm/amd/amdkfd/Kconfig
>> +++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
>> @@ -7,6 +7,8 @@ config HSA_AMD
>>  	bool "HSA kernel driver for AMD GPU devices"
>>  	depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)
>>  	imply AMD_IOMMU_V2 if X86_64
>> +	select HMM_MIRROR
>>  	select MMU_NOTIFIER
>> +	select DRM_AMDGPU_USERPTR
>
> amd/amdgpu/Kconfig select HMM_MIRROR and MMU_NOTIFIER if
> DRM_AMDGPU_USERPTR is enabled,
>
> I guess select DRM_AMDGPU_USERPTR here is enough, HMM_MIRROR and
> MMU_NOTIFIER is redundant.
>
I read this warning in Documentation/kbuild/kconfig-language.rst:

  Note:
        select should be used with care. select will force
        a symbol to a value without visiting the dependencies.
        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.

I'm not sure if "dependencies" in this context includes "depends" and
"select". But to be sure, I'd rather make sure KFD has all it needs
without relying on indirect dependencies.

Regards,
  Felix


> Philip
>
>>  	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] 4+ messages in thread

* Re: [PATCH v2 1/1] drm/amdkfd: Enable userptr support when KFD is enabled
  2021-01-19  1:20   ` Felix Kuehling
@ 2021-01-19  2:13     ` philip yang
  0 siblings, 0 replies; 4+ messages in thread
From: philip yang @ 2021-01-19  2:13 UTC (permalink / raw)
  To: Felix Kuehling, amd-gfx

[-- Attachment #1: Type: text/html, Size: 3377 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-19  2:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 23:28 [PATCH v2 1/1] drm/amdkfd: Enable userptr support when KFD is enabled Felix Kuehling
2021-01-19  1:01 ` philip yang
2021-01-19  1:20   ` Felix Kuehling
2021-01-19  2:13     ` philip yang

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.