AMDKFD Kernel Driver
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest24 patches 13 repliesIn review
- v423 patches 5 repliesSuperseded
- v323 patches 5 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 0 of 25 patches | 56 replies | Superseded |
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/24 | drm/radeon: reduce number of free VMIDs and pipes in KVdrivers/ drivers/ | +26 | 0 replies | |
| 2/24 | drm/radeon/cik: Don't touch int of pipes 1-7drivers/ | +1 | 0 replies | |
| 3/24 | drm/radeon: Report doorbell configuration to amdkfddrivers/ drivers/ | +35 | 0 replies | |
| 4/24 | drm/radeon: adding synchronization for GRBM GFXdrivers/ drivers/ drivers/ | +29 | 0 replies | |
| 5/24 | drm/radeon: Add radeon <--> amdkfd interfacedrivers/ drivers/ drivers/ +7 more | +1008 | 0 replies | |
| 6/24 | Update MAINTAINERS and CREDITS files with amdkfd infoCREDITS MAINTAINERS | +17 | 6 replies | |
| 7/24 | amdkfd: Add IOCTL set definitions of amdkfdinclude/ | +154 | 0 replies | |
| 8/24 | amdkfd: Add amdkfd skeleton driverdrivers/ drivers/ drivers/ +5 more | +544 | 3 replies | |
| 9/24 | amdkfd: Add topology module to amdkfddrivers/ drivers/ drivers/ +4 more | +1730 | 0 replies | |
| 10/24 | amdkfd: Add basic modules to amdkfddrivers/ drivers/ drivers/ +6 more | +1349 | 0 replies | |
| 11/24 | amdkfd: Add binding/unbinding calls to amd_iommu driverdrivers/ drivers/ drivers/ | +102 | 0 replies | |
| 12/24 | amdkfd: Add queue moduledrivers/ drivers/ drivers/ | +209 | 0 replies | |
| 13/24 | amdkfd: Add mqd_manager moduledrivers/ drivers/ drivers/ +2 more | +681 | 0 replies | |
| 14/24 | amdkfd: Add kernel queue moduledrivers/ drivers/ drivers/ +4 more | +1066 | 0 replies | |
| 15/24 | amdkfd: Add module parameter of scheduling policydrivers/ drivers/ | +45 | 0 replies | |
| 16/24 | amdkfd: Add packet manager moduledrivers/ drivers/ drivers/ | +641 | 0 replies | |
| 17/24 | amdkfd: Add process queue manager moduledrivers/ drivers/ drivers/ +1 more | +390 | 0 replies | |
| 18/24 | amdkfd: Add device queue manager moduledrivers/ drivers/ drivers/ +2 more | +1156 | 0 replies | |
| 19/24 | amdkfd: Add interrupt handling moduledrivers/ drivers/ drivers/ +1 more | +218 | 0 replies | |
| 20/24 | amdkfd: Implement the create/destroy/update queue IOCTLsdrivers/ | +202 | 0 replies | |
| 21/24 | amdkfd: Implement the Set Memory Policy IOCTLdrivers/ | +51 | 0 replies | |
| 22/24 | amdkfd: Implement the Get Clock Counters IOCTLdrivers/ | +28 | 0 replies | |
| 23/24 | amdkfd: Implement the Get Process Aperture IOCTLdrivers/ drivers/ | +61 | 0 replies | |
| 24/24 | amdkfd: Implement the Get Version IOCTLdrivers/ | +10 | 0 replies |
Reviews trailers per patch
4 of 24 patches have a Reviewed-by or Acked-by.
| Patch | Alex Deucher |
|---|---|
| 1/24 | R-b |
| 2/24 | R-b |
| 3/24 | R-b |
| 4/24 | R-b |
| 5/24 | |
| 6/24 | |
| 7/24 | |
| 8/24 | |
| 9/24 | |
| 10/24 | |
| 11/24 | |
| 12/24 | |
| 13/24 | |
| 14/24 | |
| 15/24 | |
| 16/24 | |
| 17/24 | |
| 18/24 | |
| 19/24 | |
| 20/24 | |
| 21/24 | |
| 22/24 | |
| 23/24 | |
| 24/24 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 00/24] AMDKFD Kernel Driver
Hi,
Here is the v5 patch set of amdkfd.
This version is released several days ahead of the release of AMD's HSA Runtime library as Open Source. Coupled with the modification that Thomas Stellard did for the r600 LLVM back-end, AMD will be effectively releasing a _complete_ userspace Open Source stack/solution for running HSA applications using kernels written in OpenCL C99 on top of amdkfd.
Because of the above, I inserted some new code into this version, in addition to various small fixes and changes.
- The new features in this version are:
* Adding support for HSA Architected Queue Language (AQL) packets. These packets provides a standardised packet format for Heterogeneous Queuing (hQ) - meaning that application developers won't need to worry about which vendor they're dealing with when building hQ support into their software.
Adding this support was necessary because the HSA RT library works with AQL queues by default
* Create a new folder /drm/amd, and moving the amdkfd folder into it, so it is now located at /drm/amd/amdkfd.
This change was done in preparation for the upstreaming of the new amdgpu driver. Once amdgpu driver is upstreamed, amdkfd will work with both drivers (radeon and amdgpu), so we decided to put all of AMD's code into a single shared folder (/drm/amd).
* Implemented the Get Version IOCTL (new patch, 24/24), which returns the version number of the interface of amdkfd, so that the HSA RT will be able to recognize which amdkfd version it uses.
- The important fixes in this version are:
* Using delayed function call during the tear down of kfd process object. This change was made due to request of the IOMMU maintainer. He NAKed a patch where I made it possible to call amd_iommu_unbind_pasid() from an mmu_notifier_release call-back. Therefore, I was forced to find a different solution.
* Adding support for 32-bit userspace, by padding the IOCTLs' structures to be 64-bit aligned.
* Update the format of mqd structure to match the latest Kaveri firmware.
* Set default sched_policy to Hardware Scheduling as it is now supported correctly by the latest firmware
The method for building & running kernel programs involves offline compilation of a .cl source file, using clang plus a version of the r600 LLVM back end which Tom has modified so that a HW ISA binary file is generated. That binary file will then be imported into the HSAIL RT using the hsa_code_unit_load() API function in the HSA RT, and can then be used in compute operations initiated via calls to the HSAIL RT API and writes to userspace queues.
The HSA RT communicates with the amdkfd through the libhsakmt userspace library (equivalent of libdrm). That library is already open sourced.
AMD will supply a fully working application (port of the MatrixMultiplication application), both .cl file and .c file. The .cl file can be compiled with the above mentioned method and the application will load it and submit it through the HSA RT queues.
This application is already ready and I am waiting for an IP approval to release it. I expect it to be released next week. Once that happens, I will publish the link to download the application's source code and instructions on how to run it.
For people who like to review using git, the v5 patch set is located at:
http://cgit.freedesktop.org/~gabbayo/linux/?h=amdkfd-v5
The libhsakmt library is located at:
http://cgit.freedesktop.org/~gabbayo/libhsakmt
The modified r600 LLVM compiler is located at:
https://github.com/tstellarAMD/llvm/tree/hsa
The HSA RT library is located at:
https://github.com/HSAFoundation/HSA-Runtime-Reference-Source
As of this time, this link is still private as the HSA RT team is waiting for a final IP approval. I expect this approval to arrive sometime next week, which at that time, this link will be made public. I wlll send an update when that occurs.
Link to v4 cover letter:
http://lwn.net/Articles/613057/
Link to v3 cover letter:
http://lwn.net/Articles/607730/
Link to v2 cover letter:
http://lists.freedesktop.org/archives/dri-devel/2014-July/064011.html
Link to v1 cover letter (contains explanation on HSA and this driver):
http://lwn.net/Articles/605153/
Any comment / review is appreciated.
- Oded
Alexey Skidanov (1):
amdkfd: Implement the Get Process Aperture IOCTL
Andrew Lewycky (2):
amdkfd: Add interrupt handling module
amdkfd: Implement the Set Memory Policy IOCTL
Ben Goz (7):
amdkfd: Add queue module
amdkfd: Add mqd_manager module
amdkfd: Add kernel queue module
amdkfd: Add module parameter of scheduling policy
amdkfd: Add packet manager module
amdkfd: Add process queue manager module
amdkfd: Add device queue manager module
Evgeny Pinchuk (2):
amdkfd: Add topology module to amdkfd
amdkfd: Implement the Get Clock Counters IOCTL
Oded Gabbay (12):
drm/radeon: reduce number of free VMIDs and pipes in KV drm/radeon/cik: Don't touch int of pipes 1-7 drm/radeon: Report doorbell configuration to amdkfd drm/radeon: adding synchronization for GRBM GFX drm/radeon: Add radeon <--> amdkfd interface Update MAINTAINERS and CREDITS files with amdkfd info
amdkfd: Add IOCTL set definitions of amdkfd
amdkfd: Add amdkfd skeleton driver
amdkfd: Add basic modules to amdkfd
amdkfd: Add binding/unbinding calls to amd_iommu driver
amdkfd: Implement the create/destroy/update queue IOCTLs
amdkfd: Implement the Get Version IOCTL
CREDITS | 7 + MAINTAINERS | 10 + drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/amd/amdkfd/Kconfig | 10 + drivers/gpu/drm/amd/amdkfd/Makefile | 14 + drivers/gpu/drm/amd/amdkfd/cik_regs.h | 221 ++++ drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 576 +++++++++ drivers/gpu/drm/amd/amdkfd/kfd_crat.h | 294 +++++ drivers/gpu/drm/amd/amdkfd/kfd_device.c | 307 +++++ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 1059 +++++++++++++++++ .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 146 +++ drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 255 ++++ drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 355 ++++++ drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 176 +++ drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 347 ++++++ drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.h | 69 ++ drivers/gpu/drm/amd/amdkfd/kfd_module.c | 159 +++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 346 ++++++ drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h | 91 ++ drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 565 +++++++++ drivers/gpu/drm/amd/amdkfd/kfd_pasid.c | 97 ++ drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers.h | 405 +++++++ drivers/gpu/drm/amd/amdkfd/kfd_pm4_opcodes.h | 107 ++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 598 ++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 415 +++++++ .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 342 ++++++ drivers/gpu/drm/amd/amdkfd/kfd_queue.c | 85 ++ drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 1235 ++++++++++++++++++++ drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 168 +++ drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 185 +++ drivers/gpu/drm/radeon/Makefile | 1 + drivers/gpu/drm/radeon/cik.c | 155 +-- drivers/gpu/drm/radeon/cik_reg.h | 136 +++ drivers/gpu/drm/radeon/cikd.h | 53 +- drivers/gpu/drm/radeon/radeon.h | 10 + drivers/gpu/drm/radeon/radeon_device.c | 32 + drivers/gpu/drm/radeon/radeon_drv.c | 5 + drivers/gpu/drm/radeon/radeon_kfd.c | 563 +++++++++ drivers/gpu/drm/radeon/radeon_kfd.h | 47 + drivers/gpu/drm/radeon/radeon_kms.c | 7 + include/uapi/linux/kfd_ioctl.h | 154 +++ 42 files changed, 9715 insertions(+), 95 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdkfd/Kconfig create mode 100644 drivers/gpu/drm/amd/amdkfd/Makefile create mode 100644 drivers/gpu/drm/amd/amdkfd/cik_regs.h create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_crat.h create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_device.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.h create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_module.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_pasid.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_pm4_headers.h create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_pm4_opcodes.h create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_priv.h create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_process.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_queue.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_topology.c create mode 100644 drivers/gpu/drm/amd/amdkfd/kfd_topology.h create mode 100644 drivers/gpu/drm/amd/include/kgd_kfd_interface.h create mode 100644 drivers/gpu/drm/radeon/radeon_kfd.c create mode 100644 drivers/gpu/drm/radeon/radeon_kfd.h create mode 100644 include/uapi/linux/kfd_ioctl.h
Signature · 6 lines
2.1.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel