drm/amdkfd: Enable userptr support when KFD is enabled
Subsystems (3)
Felix Kuehling
maintainerPATCH 1/1 drm/amdkfd: Enable userptr support when KFD is enabled
ROCm user mode depends on userptr support. Without it, KFD is basically useless.
--- drivers/gpu/drm/amd/amdkfd/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdkfd/Kconfig +1 -0
@@ -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.
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 15.01.21 um 19:24 schrieb Felix Kuehling:
Quoted 13 lines
ROCm user mode depends on userptr support. Without it, KFD is basically useless.
Signed-off-by Felix Kuehling <[email protected]>--- drivers/gpu/drm/amd/amdkfd/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdkfd/Kconfig +0
-0
drivers/gpu/drm/amd/amdkfd/Kconfig config HSA_AMD · line 11
Quoted 4 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +1
-0@@ -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.
drivers/gpu/drm/amd/amdkfd/Kconfig config HSA_AMD · line 13
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
Felix Kuehling
maintainerAm 2021-01-18 um 2:53 a.m. schrieb Christian König:
Quoted 9 lines
Am 15.01.21 um 19:24 schrieb Felix Kuehling:
Quoted 8 lines
ROCm user mode depends on userptr support. Without it, KFD is basically useless.
Signed-off-by Felix Kuehling <[email protected]>---
drivers/gpu/drm/amd/amdkfd/Kconfig| 1 +1 file changed, 1 insertion(+)
Quoted 13 lines
Quoted 10 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +0
-0@@ -8,5 +8,6 @@ config HSA_AMD depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)imply
AMD_IOMMU_V2ifX86_64
selectMMU_NOTIFIER
+ selectDRM_AMDGPU_USERPTRI 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
Quoted 6 lines
Christian.
Quoted 2 lines
help
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
Christian König
maintainerAm 18.01.21 um 15:37 schrieb Felix Kuehling:
Quoted 22 lines
Am 2021-01-18 um 2:53 a.m. schrieb Christian König:
Quoted 9 lines
Am 15.01.21 um 19:24 schrieb Felix Kuehling:
Quoted 8 lines
ROCm user mode depends on userptr support. Without it, KFD is basically useless.
Signed-off-by Felix Kuehling <[email protected]>--- drivers/gpu/drm/amd/amdkfd/Kconfig | 1 + 1 file changed, 1 insertion(+)Quoted 12 lines
drivers/gpu/drm/amd/amdkfd/Kconfig config HSA_AMD · line 11
Quoted 10 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +1
-0@@ -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_USERPTRI think we should rather make that a depends on. Otherwise we select a visible config option.
Quoted 7 lines
I was considering that. The problem with that is, that the
HSA_AMDoption won't even show up in menuconfig unlessDRM_AMDGPU_USERPTRis selected. I'd rather always show theHSA_AMDoption and select what it needs.Is there a good reason why
AMDGPU_USERPTRis 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.
Quoted 9 lines
Regards,
FelixQuoted 4 lines
Christian.
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
Felix Kuehling
maintainerAm 2021-01-18 um 9:53 a.m. schrieb Christian König:
Quoted 29 lines
Am 18.01.21 um 15:37 schrieb Felix Kuehling:
Quoted 28 lines
Am 2021-01-18 um 2:53 a.m. schrieb Christian König:
Quoted 10 lines
Am 15.01.21 um 19:24 schrieb Felix Kuehling:
Quoted 9 lines
ROCm user mode depends on userptr support. Without it, KFD is basically
useless.Signed-off-by Felix Kuehling <[email protected]>---
drivers/gpu/drm/amd/amdkfd/Kconfig| 1 +1 file changed, 1 insertion(+)Quoted 12 lines
Quoted 10 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +0
-0@@ -8,5 +8,6 @@ config HSA_AMD depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)imply
AMD_IOMMU_V2ifX86_64
selectMMU_NOTIFIER
+ selectDRM_AMDGPU_USERPTRI 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_AMDoption won't even show up in menuconfig unlessDRM_AMDGPU_USERPTRis selected. I'd rather always show theHSA_AMDoption and select what it needs.
Quoted 4 lines
Quoted 2 lines
Is there a good reason why
AMDGPU_USERPTRis 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
Quoted 19 lines
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_USERPTRafter it was selected here?Regards,
Christian.Quoted 10 lines
Regards,
FelixQuoted 5 lines
Christian.
Quoted 3 lines
help
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
Christian König
maintainerAm 18.01.21 um 15:55 schrieb Felix Kuehling:
Quoted 30 lines
Am 2021-01-18 um 9:53 a.m. schrieb Christian König:
Quoted 29 lines
Am 18.01.21 um 15:37 schrieb Felix Kuehling:
Quoted 28 lines
Am 2021-01-18 um 2:53 a.m. schrieb Christian König:
Quoted 10 lines
Am 15.01.21 um 19:24 schrieb Felix Kuehling:
Quoted 9 lines
ROCm user mode depends on userptr support. Without it, KFD is basically
useless.Signed-off-by Felix Kuehling <[email protected]>--- drivers/gpu/drm/amd/amdkfd/Kconfig | 1 + 1 file changed, 1 insertion(+)Quoted 12 lines
drivers/gpu/drm/amd/amdkfd/Kconfig config HSA_AMD · line 11
Quoted 10 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +1
-0@@ -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_USERPTRI 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_AMDoption won't even show up in menuconfig unlessDRM_AMDGPU_USERPTRis selected. I'd rather always show theHSA_AMDoption and select what it needs.
Quoted 5 lines
Quoted 3 lines
Quoted 2 lines
Is there a good reason why
AMDGPU_USERPTRis 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 selectingDRM_AMDGPU_USERPTRwon't do any more harm.
Yeah, correct. But can you test what happens when you deselect USERPTR after selecting KFD?
Regards,
Christian.
Quoted 21 lines
Regards,
FelixQuoted 16 lines
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_USERPTRafter it was selected here?Regards,
Christian.Quoted 9 lines
Regards,
FelixQuoted 5 lines
Christian.
Quoted 3 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +0
-0help Enable this if you want to use HSA features on AMD GPUdevices.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 15.01.21 um 19:24 schrieb Felix Kuehling:
Quoted 4 lines
ROCm user mode depends on userptr support. Without it, KFD is basically useless.
Signed-off-by Felix Kuehling <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/amd/amdkfd/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdkfd/Kconfig +0
-0
drivers/gpu/drm/amd/amdkfd/Kconfig config HSA_AMD · line 13
Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +1
-0@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Felix Kuehling
maintainerAm 2021-01-18 um 10:04 a.m. schrieb Christian König:
Quoted 7 lines
Am 15.01.21 um 19:24 schrieb Felix Kuehling:
Quoted 4 lines
ROCm user mode depends on userptr support. Without it, KFD is basically useless.
Signed-off-by Felix Kuehling <[email protected]>Reviewed-by Christian König <[email protected]>
Thank you. For the record, the documentation recommends some precautions when using "select" to avoid invalid configurations:
Quoted 6 lines
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
Quoted 5 lines
Quoted 5 lines
---
drivers/gpu/drm/amd/amdkfd/Kconfig| 1 +1 file changed, 1 insertion(+)
Quoted 13 lines
Quoted 7 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +0
-0@@ -8,5 +8,6 @@ config HSA_AMD depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64)Quoted 5 lines
imply
AMD_IOMMU_V2ifX86_64
selectMMU_NOTIFIER
+ selectDRM_AMDGPU_USERPTR
help
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