drm/amdkfd: Enable userptr support when KFD is enabled
Subsystems (3)
Felix Kuehling
maintainerPATCH v2 1/1 drm/amdkfd: Enable userptr support when KFD is enabled
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.
--- drivers/gpu/drm/amd/amdkfd/Kconfig | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdkfd/Kconfig +2 -0
@@ -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.
Signature · 6 lines
2.17.1 _______________________________________________ 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
Felix Kuehling
maintainerAm 2021-01-18 um 8:01 p.m. schrieb philip yang:
Quoted 30 lines · Felix Kuehling
Quoted 17 lines
ROCm user mode depends on userptr support. Without it, KFD is basically useless.
Make sure
HSA_AMDselects the same options asDRM_AMDGPU_USERPTRto avoid broken configurations where userptr gets enabled but its dependencies are disabled.Signed-off-by Felix Kuehling <[email protected]>--- drivers/gpu/drm/amd/amdkfd/Kconfig | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/amd/amdkfd/Kconfig +0
-0drivers/gpu/drm/amd/amdkfd/Kconfig config HSA_AMD · line 12
Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +2
-0@@ -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_USERPTRamd/amdgpu/Kconfig select
HMM_MIRRORandMMU_NOTIFIERifDRM_AMDGPU_USERPTRis enabled,
Quoted 3 lines
I guess select
DRM_AMDGPU_USERPTRhere is enough,HMM_MIRRORandMMU_NOTIFIERis 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
Quoted 4 lines
Philip
Quoted 2 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +0
-0help Enable this if you want to use HSA features on AMD GPU devices.
_______________________________________________
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