[PATCH 1/1] drm/amdkfd: Enable userptr support when KFD is enabled

Felix Kuehling felix.kuehling at amd.com
Mon Jan 18 16:16:22 UTC 2021


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 at amd.com>
>
> Reviewed-by: Christian König <christian.koenig at 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.
>


More information about the amd-gfx mailing list