Re: [PATCH v5 08/24] amdkfd: Add amdkfd skeleton driver

Oded Gabbay
2014-11-21T19:34:59Z

On 11/21/2014 12:24 PM, Paul Bolle wrote:
> On Sat, 2014-11-08 at 20:37 +0200, Oded Gabbay wrote:
>> This patch adds the amdkfd skeleton driver. The driver does nothing except
>> define a /dev/kfd device.
>>
>> It returns -ENODEV on all amdkfd IOCTLs.
>>
>> v3: Move bool field to the end of structure, removed the pmc ioctls and added
>> a meaningful error message for ioctl error.
>>
>> v5:
>>
>> Create a new folder drm/amd and move amdkfd from drm/radeon/ to drm/amd/
>> Remove scheduler_class from kfd_priv.h as it was never used
>> Add skeleton implementation of the Get Version IOCTL
>>
>> Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
>
> It seems v6 of this patch is included in today's linux-next (ie,
> next-20141121).
>
>> drivers/gpu/drm/Kconfig | 2 +
>> drivers/gpu/drm/Makefile | 1 +
>> drivers/gpu/drm/amd/amdkfd/Kconfig | 10 ++
>> drivers/gpu/drm/amd/amdkfd/Makefile | 9 ++
>> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 210 +++++++++++++++++++++++++++++++
>> drivers/gpu/drm/amd/amdkfd/kfd_device.c | 130 +++++++++++++++++++
>> drivers/gpu/drm/amd/amdkfd/kfd_module.c | 101 +++++++++++++++
>> drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 81 ++++++++++++
>> 8 files changed, 544 insertions(+)
>> [...]
>> diff --git a/drivers/gpu/drm/amd/amdkfd/Kconfig b/drivers/gpu/drm/amd/amdkfd/Kconfig
>> new file mode 100644
>> index 0000000..a2ae6d4
>> --- /dev/null
>> +++ b/drivers/gpu/drm/amd/amdkfd/Kconfig
>> @@ -0,0 +1,10 @@
>> +#
>> +# Heterogenous system architecture configuration
>> +#
>> +
>> +config HSA_AMD
>> + tristate "HSA kernel driver for AMD GPU devices"
>> + depends on (DRM_RADEON || DRM_AMDGPU) && AMD_IOMMU_V2 && X86_64
>
> There's currently no Kconfig symbol DRM_AMDGPU (nor anything similar).
> Will that symbol be added in a future patch?
>
The DRM_AMDGPU symbol belongs to AMD's new Linux kernel graphic driver, called
amdgpu. That driver is not yet upstreamed, so its symbol is not present in any
Kconfig file. However, internally we work with that driver so that's why it
appears in my patch.

I can remove it if it violates some rule. I have no problem adding it back once
amdgpu is upstreamed.

Oded

>> + default m
>> + help
>> + Enable this if you want to use HSA features on AMD GPU devices.
>
>
> Paul Bolle
>