Skip to content

AMD HSA kernel driver

Oded Gabbay dri-devel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest83 patches 81 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/83mm: Add kfd_process pointer to mm_structinclude/linux/mm_types.h+14 -01 reply
2/83drm/radeon: reduce number of free VMIDs and pipes in KVdrivers/gpu/drm/radeon/cik.c+24 -2411 replies
3/83drm/radeon: Report doorbell configuration to kfddrivers/gpu/drm/radeon/radeon.h drivers/gpu/drm/radeon/radeon_device.c+35 -01 reply
4/83drm/radeon: Add radeon <--> kfd interfacedrivers/gpu/drm/radeon/Makefile drivers/gpu/drm/radeon/radeon.h drivers/gpu/drm/radeon/radeon_kfd.c +1 more+165 -03 replies
5/83drm/radeon: Add kfd-->kgd interface to get virtual ram sizedrivers/gpu/drm/radeon/radeon_kfd.c include/linux/radeon_kfd.h+13 -01 reply
6/83drm/radeon: Add kfd-->kgd interfaces of memory allocation/mappingdrivers/gpu/drm/radeon/radeon_kfd.c include/linux/radeon_kfd.h+152 -01 reply
7/83drm/radeon: Add kfd-->kgd interface of locking srbm_gfx_cntl registerdrivers/gpu/drm/radeon/radeon_kfd.c include/linux/radeon_kfd.h+24 -04 replies
8/83drm/radeon: Add calls to initialize and finalize kfd from radeondrivers/gpu/drm/radeon/radeon_drv.c drivers/gpu/drm/radeon/radeon_kms.c+15 -06 replies
9/83hsa/radeon: Add code base of hsa driver for AMD's GPUsdrivers/Kconfig drivers/gpu/Makefile drivers/gpu/hsa/Kconfig +12 more+2891 -012 replies
10/83hsa/radeon: Add initialization and unmapping of doorbell aperturedrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_device.c drivers/gpu/hsa/radeon/kfd_doorbell.c+76 -10 replies
11/83hsa/radeon: Add scheduler codedrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/cik_regs.h drivers/gpu/hsa/radeon/kfd_device.c +3 more+1127 -12 replies
12/83hsa/radeon: Add kfd mmap handlerdrivers/gpu/hsa/radeon/kfd_chardev.c drivers/gpu/hsa/radeon/kfd_doorbell.c+105 -01 reply
13/83hsa/radeon: Add 2 new IOCTL to kfd, CREATE_QUEUE and DESTROY_QUEUEdrivers/gpu/hsa/radeon/kfd_chardev.c drivers/gpu/hsa/radeon/kfd_doorbell.c include/uapi/linux/kfd_ioctl.h+235 -04 replies
14/83hsa/radeon: Update MAINTAINERS and CREDITS filesCREDITS MAINTAINERS+15 -00 replies
15/83hsa/radeon: Add interrupt handling moduledrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_device.c drivers/gpu/hsa/radeon/kfd_interrupt.c +2 more+202 -11 reply
16/83hsa/radeon: Add the isr function of the KFD scehdulerdrivers/gpu/hsa/radeon/cik_int.h drivers/gpu/hsa/radeon/cik_regs.h drivers/gpu/hsa/radeon/kfd_sched_cik_static.c+108 -00 replies
17/83hsa/radeon: Handle deactivation of queues using interruptsdrivers/gpu/hsa/radeon/cik_regs.h drivers/gpu/hsa/radeon/kfd_sched_cik_static.c+37 -90 replies
18/83hsa/radeon: Enable interrupts in KFD schedulerdrivers/gpu/hsa/radeon/kfd_sched_cik_static.c+28 -00 replies
19/83hsa/radeon: Enable/Disable KFD interrupt moduledrivers/gpu/hsa/radeon/cik_regs.h drivers/gpu/hsa/radeon/kfd_device.c+9 -20 replies
20/83hsa/radeon: Add interrupt callback function to kgd2kfd interfacedrivers/gpu/hsa/radeon/kfd_module.c include/linux/radeon_kfd.h+2 -00 replies
21/83hsa/radeon: Add kgd-->kfd interfaces for suspend and resumedrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_module.c drivers/gpu/hsa/radeon/kfd_pm.c +2 more+52 -10 replies
22/83drm/radeon: Add calls to suspend and resume of kfd driverdrivers/gpu/drm/radeon/cik.c drivers/gpu/drm/radeon/radeon_kfd.c+23 -00 replies
23/83drm/radeon/cik: Don't touch int of pipes 1-7drivers/gpu/drm/radeon/cik.c+1 -700 replies
24/83drm/radeon/cik: Call kfd isr functiondrivers/gpu/drm/radeon/cik.c drivers/gpu/drm/radeon/radeon_kfd.c+10 -00 replies
25/83hsa/radeon: fix the OEMID assignment in kfd_topologydrivers/gpu/hsa/radeon/kfd_crat.h drivers/gpu/hsa/radeon/kfd_topology.c+4 -20 replies
26/83hsa/radeon: Make binding of process to device permanentdrivers/gpu/hsa/radeon/kfd_chardev.c drivers/gpu/hsa/radeon/kfd_priv.h drivers/gpu/hsa/radeon/kfd_process.c+13 -380 replies
27/83hsa/radeon: Implement hsaKmtSetMemoryPolicydrivers/gpu/hsa/radeon/cik_regs.h drivers/gpu/hsa/radeon/kfd_chardev.c drivers/gpu/hsa/radeon/kfd_sched_cik_static.c +2 more+172 -40 replies
28/83mm: Change timing of notification to IOMMUs about a page to be invalidatedmm/rmap.c+6 -23 replies
29/83hsa/radeon: Fix memory size allocated for HPDdrivers/gpu/hsa/radeon/kfd_sched_cik_static.c+1 -10 replies
30/83hsa/radeon: Fix list of supported devicesdrivers/gpu/hsa/radeon/kfd_device.c+23 -50 replies
31/83drm/radeon: extending kfd-kgd interfacedrivers/gpu/drm/radeon/radeon_kfd.c include/linux/radeon_kfd.h+10 -00 replies
32/83hsa/radeon: implementing IOCTL for clock countersdrivers/gpu/hsa/radeon/kfd_chardev.c include/uapi/linux/kfd_ioctl.h+46 -01 reply
33/83hsa/radeon: Fix coding style in cik_int.hdrivers/gpu/hsa/radeon/cik_int.h+10 -100 replies
34/83drm/radeon: adding synchronization for GRBM GFXdrivers/gpu/drm/radeon/cik.c drivers/gpu/drm/radeon/radeon.h drivers/gpu/drm/radeon/radeon_device.c +2 more+56 -00 replies
35/83hsa/radeon: Print ioctl commnad only in debug modedrivers/gpu/hsa/radeon/kfd_chardev.c+3 -30 replies
36/83hsa/radeon: fixing clock counters bugdrivers/gpu/hsa/radeon/kfd_chardev.c+2 -20 replies
37/83hsa/radeon: Print ISR info only in debug modedrivers/gpu/hsa/radeon/kfd_sched_cik_static.c+1 -10 replies
38/83hsa/radeon: Workaround for a bug in amd_iommudrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_device.c drivers/gpu/hsa/radeon/kfd_pasid.c +2 more+37 -441 reply
39/83drm/radeon: Extending kfd interfacedrivers/gpu/drm/radeon/radeon_kfd.c include/linux/radeon_kfd.h+13 -00 replies
40/83hsa/radeon: Adding max clock speeds to topologydrivers/gpu/hsa/radeon/kfd_topology.c+4 -20 replies
41/83hsa/radeon: Alternating the source of max clockdrivers/gpu/drm/radeon/radeon_kfd.c+1 -10 replies
42/83hsa/radeon: 32-bit processes supportdrivers/gpu/hsa/radeon/kfd_chardev.c drivers/gpu/hsa/radeon/kfd_priv.h include/uapi/linux/kfd_ioctl.h+10 -30 replies
43/83hsa/radeon: NULL pointer dereference bug workarounddrivers/gpu/hsa/radeon/kfd_sched_cik_static.c+4 -20 replies
44/83hsa/radeon: HSA64/HSA32 modes supportdrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_aperture.c drivers/gpu/hsa/radeon/kfd_chardev.c +5 more+264 -31 reply
45/83hsa/radeon: debugging print statementsdrivers/gpu/hsa/radeon/kfd_device.c+15 -30 replies
46/83hsa/radeon: Add queue and hw_pointer_store modulesdrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_hw_pointer_store.c drivers/gpu/hsa/radeon/kfd_hw_pointer_store.h +2 more+382 -10 replies
47/83hsa/radeon: Add support allocating kernel doorbellsdrivers/gpu/hsa/radeon/kfd_doorbell.c drivers/gpu/hsa/radeon/kfd_priv.h+80 -10 replies
48/83hsa/radeon: Add mqd_manager moduledrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/cik_mqds.h drivers/gpu/hsa/radeon/cik_regs.h +5 more+816 -110 replies
49/83hsa/radeon: Add kernel queue support for KFDdrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_device_queue_manager.h drivers/gpu/hsa/radeon/kfd_kernel_queue.c +5 more+1295 -60 replies
50/83hsa/radeon: Add module parameter of scheduling policydrivers/gpu/hsa/radeon/kfd_module.c drivers/gpu/hsa/radeon/kfd_priv.h+70 -00 replies
51/83hsa/radeon: Add packet manager moduledrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_packet_manager.c+474 -10 replies
52/83hsa/radeon: Add process queue manager moduledrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_priv.h drivers/gpu/hsa/radeon/kfd_process_queue_manager.c+401 -10 replies
53/83hsa/radeon: Add device queue manager moduledrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_device_queue_manager.c drivers/gpu/hsa/radeon/kfd_priv.h+1009 -10 replies
54/83hsa/radeon: Switch to new queue schedulerdrivers/gpu/hsa/radeon/kfd_aperture.c drivers/gpu/hsa/radeon/kfd_chardev.c drivers/gpu/hsa/radeon/kfd_device.c +4 more+88 -1170 replies
55/83hsa/radeon: Add IOCTL for update queuedrivers/gpu/hsa/radeon/cik_mqds.h drivers/gpu/hsa/radeon/kfd_chardev.c drivers/gpu/hsa/radeon/kfd_device_queue_manager.c +11 more+58 -140 replies
56/83hsa/radeon: Queue Management integration with Memory Managementdrivers/gpu/hsa/radeon/kfd_device_queue_manager.c+39 -20 replies
57/83hsa/radeon: Eliminate warnings in compilationdrivers/gpu/hsa/radeon/kfd_chardev.c drivers/gpu/hsa/radeon/kfd_kernel_queue.c drivers/gpu/hsa/radeon/kfd_queue.c+6 -60 replies
58/83hsa/radeon: Various kernel styling fixesdrivers/gpu/hsa/radeon/kfd_device_queue_manager.h drivers/gpu/hsa/radeon/kfd_hw_pointer_store.h drivers/gpu/hsa/radeon/kfd_kernel_queue.h +4 more+25 -240 replies
59/83hsa/radeon: Exclusive access for perf. countersdrivers/gpu/hsa/radeon/kfd_chardev.c drivers/gpu/hsa/radeon/kfd_device.c drivers/gpu/hsa/radeon/kfd_priv.h +2 more+86 -20 replies
60/83hsa/radeon: Rearrange structures in kfd_ioctl.hinclude/uapi/linux/kfd_ioctl.h+27 -240 replies
61/83hsa/radeon: change another pr_info to pr_debugdrivers/gpu/hsa/radeon/kfd_topology.c+1 -10 replies
62/83hsa/radeon: Fix timeout calculation in sync_with_hwdrivers/gpu/hsa/radeon/kfd_kernel_queue.c+10 -40 replies
63/83hsa/radeon: Update module information and versiondrivers/gpu/hsa/radeon/kfd_module.c+12 -70 replies
64/83hsa/radeon: update queue fault handlingdrivers/gpu/hsa/radeon/kfd_process_queue_manager.c+12 -30 replies
65/83hsa/radeon: fixing a bug to support 32b processesdrivers/gpu/hsa/radeon/cik_regs.h drivers/gpu/hsa/radeon/kfd_device_queue_manager.c+6 -30 replies
66/83hsa/radeon: Fix number of pipes per MEdrivers/gpu/hsa/radeon/kfd_device_queue_manager.c drivers/gpu/hsa/radeon/kfd_device_queue_manager.h drivers/gpu/hsa/radeon/kfd_packet_manager.c+3 -30 replies
67/83hsa/radeon: Removing hw pointer store moduledrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_chardev.c drivers/gpu/hsa/radeon/kfd_hw_pointer_store.c +4 more+23 -2870 replies
68/83hsa/radeon: Update module version to 0.6.0drivers/gpu/hsa/radeon/kfd_module.c+1 -10 replies
69/83hsa/radeon: Fix initialization of sh_mem registersdrivers/gpu/hsa/radeon/kfd_device_queue_manager.c+26 -220 replies
70/83hsa/radeon: Fix compilation warningsdrivers/gpu/hsa/radeon/kfd_chardev.c+6 -50 replies
71/83hsa/radeon: Remove old scheduler codedrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_sched_cik_static.c+2 -9900 replies
72/83hsa/radeon: Static analysis (smatch) fixesdrivers/gpu/hsa/radeon/kfd_device.c drivers/gpu/hsa/radeon/kfd_device_queue_manager.c drivers/gpu/hsa/radeon/kfd_mqd_manager.c +2 more+13 -60 replies
73/83hsa/radeon: Adding qcm fence return statusdrivers/gpu/hsa/radeon/kfd_device_queue_manager.c drivers/gpu/hsa/radeon/kfd_priv.h+6 -20 replies
74/83hsa/radeon: Adding some error messagesdrivers/gpu/hsa/radeon/kfd_chardev.c+6 -20 replies
75/83hsa/radeon: Fixing minor issues with kernel queues (DIQ)drivers/gpu/hsa/radeon/kfd_device_queue_manager.c drivers/gpu/hsa/radeon/kfd_process_queue_manager.c+5 -10 replies
76/83hsa/radeon: Check oversubscription before destroying runlistdrivers/gpu/hsa/radeon/kfd_packet_manager.c drivers/gpu/hsa/radeon/kfd_process_queue_manager.c+9 -30 replies
77/83hsa/radeon: Add local memory to topologydrivers/gpu/hsa/radeon/kfd_topology.c+2 -00 replies
78/83hsa/radeon: Don't verify cksum when parsing CRAT tabledrivers/gpu/hsa/radeon/kfd_topology.c+2 -270 replies
79/83hsa/radeon: Update module version to 0.6.1drivers/gpu/hsa/radeon/kfd_module.c+2 -20 replies
80/83drm/radeon: Add register access functions to kfd2kgd interfacedrivers/gpu/drm/radeon/cikd.h drivers/gpu/drm/radeon/radeon_kfd.c include/linux/radeon_kfd.h+415 -10 replies
81/83hsa/radeon: Eliminating all direct register accessesdrivers/gpu/hsa/radeon/Makefile drivers/gpu/hsa/radeon/kfd_device.c drivers/gpu/hsa/radeon/kfd_device_queue_manager.c +5 more+54 -3550 replies
82/83drm/radeon: Remove lock functions from kfd2kgd interfacedrivers/gpu/drm/radeon/radeon_kfd.c include/linux/radeon_kfd.h+0 -540 replies
83/83hsa/radeon: Update module version to 0.6.2drivers/gpu/hsa/radeon/kfd_module.c+2 -20 replies

Reviews trailers per patch

3 of 83 patches have a Reviewed-by or Acked-by.

PatchBen GozJérôme Glisse
1/83
2/83R-b
3/83
4/83
5/83
6/83
7/83
8/83R-b
9/83
10/83
11/83
12/83
13/83
14/83
15/83
16/83
17/83
18/83
19/83
20/83
21/83
22/83
23/83
24/83
25/83
26/83
27/83
28/83
29/83
30/83
31/83
32/83
33/83
34/83
35/83
36/83
37/83
38/83
39/83
40/83
41/83
42/83
43/83
44/83
45/83
46/83
47/83
48/83
49/83
50/83
51/83
52/83
53/83
54/83
55/83
56/83
57/83
58/83
59/83
60/83
61/83
62/83
63/83
64/83
65/83
66/83
67/83
68/83
69/83R-b
70/83
71/83
72/83
73/83
74/83
75/83
76/83
77/83
78/83
79/83
80/83
81/83
82/83
83/83

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/83] AMD HSA kernel driver

This patch set implements a Heterogeneous System Architecture (HSA) driver for radeon-family GPUs.

HSA allows different processor types (CPUs, DSPs, GPUs, etc..) to share system resources more effectively via HW features including shared pageable memory, userspace-accessible work queues, and platform-level atomics. In addition to the memory protection mechanisms in GPUVM and IOMMUv2, the Sea Islands family of GPUs also performs HW-level validation of commands passed in through the queues (aka rings).

The code in this patch set is intended to serve both as a sample driver for other HSA-compatible hardware devices and as a production driver for radeon-family processors. The code is architected to support multiple CPUs each with connected GPUs, although the current implementation focuses on a single Kaveri/Berlin APU, and works alongside the existing radeon kernel graphics driver (kgd).

AMD GPUs designed for use with HSA (Sea Islands and up) share some hardware functionality between HSA compute and regular gfx/compute (memory, interrupts, registers), while other functionality has been added specifically for HSA compute (hw scheduler for virtualized compute rings). All shared hardware is owned by the radeon graphics driver, and an interface between kfd and kgd allows the kfd to make use of those shared resources, while HSA-specific functionality is managed directly by kfd by submitting packets into an HSA-specific command queue (the "HIQ").

During kfd module initialization a char device node (/dev/kfd) is created (surviving until module exit), with ioctls for queue creation & management, and data structures are initialized for managing HSA device topology.

The rest of the initialization is driven by calls from the radeon kgd at the following points :

- radeon_init (kfd_init)
- radeon_exit (kfd_fini)
- radeon_driver_load_kms (kfd_device_probe, kfd_device_init)
- radeon_driver_unload_kms (kfd_device_fini)

During the probe and init processing per-device data structures are established which connect to the associated graphics kernel driver. This information is exposed to userspace via sysfs, along with a version number allowing userspace to determine if a topology change has occurred while it was reading from sysfs.

The interface between kfd and kgd also allows the kfd to request buffer management services from kgd, and allows kgd to route interrupt requests to kfd code since the interrupt block is shared between regular graphics/compute and HSA compute subsystems in the GPU.

The kfd code works with an open source usermode library ("libhsakmt") which is in the final stages of IP review and should be published in a separate repo over the next few days.

The code operates in one of three modes, selectable via the sched_policy module parameter :

- sched_policy=0 uses a hardware scheduler running in the MEC block within CP, and allows oversubscription (more queues than HW slots)

- sched_policy=1 also uses HW scheduling but does not allow oversubscription, so create_queue requests fail when we run out of HW slots

- sched_policy=2 does not use HW scheduling, so the driver manually assigns queues to HW slots by programming registers

The "no HW scheduling" option is for debug & new hardware bringup only, so has less test coverage than the other options. Default in the current code is "HW scheduling without oversubscription" since that is where we have the most test coverage but we expect to change the default to "HW scheduling with oversubscription" after further testing. This effectively removes the HW limit on the number of work queues available to applications.

Programs running on the GPU are associated with an address space through the VMID field, which is translated to a unique PASID at access time via a set of 16 VMID-to-PASID mapping registers. The available VMIDs (currently 16) are partitioned (under control of the radeon kgd) between current gfx/compute and HSA compute, with each getting 8 in the current code. The VMID-to-PASID mapping registers are updated by the HW scheduler when used, and by driver code if HW scheduling is not being used.

The Sea Islands compute queues use a new "doorbell" mechanism instead of the earlier kernel-managed write pointer registers. Doorbells use a separate BAR dedicated for this purpose, and pages within the doorbell aperture are mapped to userspace (each page mapped to only one user address space). Writes to the doorbell aperture are intercepted by GPU hardware, allowing userspace code to safely manage work queues (rings) without requiring a kernel call for every ring update.

First step for an application process is to open the kfd device. Calls to open create a kfd "process" structure only for the first thread of the process. Subsequent open calls are checked to see if they are from processes using the same mm_struct and, if so, don't do anything. The kfd per-process data lives as long as the mm_struct exists. Each mm_struct is associated with a unique PASID, allowing the IOMMUv2 to make userspace process memory accessible to the GPU.

Next step is for the application to collect topology information via sysfs. This gives userspace enough information to be able to identify specific nodes (processors) in subsequent queue management calls. Application processes can create queues on multiple processors, and processors support queues from multiple processes.

At this point the application can create work queues in userspace memory and pass them through the usermode library to kfd to have them mapped onto HW queue slots so that commands written to the queues can be executed by the GPU. Queue operations specify a processor node, and so the bulk of this code is device-specific.

Written by John Bridgman <[email protected]>

Alexey Skidanov (4):
hsa/radeon: 32-bit processes support hsa/radeon: NULL pointer dereference bug workaround hsa/radeon: HSA64/HSA32 modes support hsa/radeon: Add local memory to topology

Andrew Lewycky (3):
hsa/radeon: Make binding of process to device permanent hsa/radeon: Implement hsaKmtSetMemoryPolicy
mm: Change timing of notification to IOMMUs about a page to be
invalidated

Ben Goz (20):
hsa/radeon: Add queue and hw_pointer_store modules hsa/radeon: Add support allocating kernel doorbells hsa/radeon: Add mqd_manager module
hsa/radeon: Add kernel queue support for KFD hsa/radeon: Add module parameter of scheduling policy hsa/radeon: Add packet manager module
hsa/radeon: Add process queue manager module hsa/radeon: Add device queue manager module hsa/radeon: Switch to new queue scheduler
hsa/radeon: Add IOCTL for update queue
hsa/radeon: Queue Management integration with Memory Management hsa/radeon: update queue fault handling
hsa/radeon: fixing a bug to support 32b processes hsa/radeon: Fix number of pipes per ME
hsa/radeon: Removing hw pointer store module hsa/radeon: Adding some error messages
hsa/radeon: Fixing minor issues with kernel queues (DIQ) drm/radeon: Add register access functions to kfd2kgd interface hsa/radeon: Eliminating all direct register accesses drm/radeon: Remove lock functions from kfd2kgd interface

Evgeny Pinchuk (9):
hsa/radeon: fix the OEMID assignment in kfd_topology drm/radeon: extending kfd-kgd interface hsa/radeon: implementing IOCTL for clock counters drm/radeon: adding synchronization for GRBM GFX hsa/radeon: fixing clock counters bug drm/radeon: Extending kfd interface hsa/radeon: Adding max clock speeds to topology hsa/radeon: Alternating the source of max clock hsa/radeon: Exclusive access for perf. counters

Michael Varga (1):
hsa/radeon: debugging print statements

Oded Gabbay (45):
mm: Add kfd_process pointer to mm_struct
drm/radeon: reduce number of free VMIDs and pipes in KV drm/radeon: Report doorbell configuration to kfd drm/radeon: Add radeon <--> kfd interface
drm/radeon: Add kfd-->kgd interface to get virtual ram size drm/radeon: Add kfd-->kgd interfaces of memory allocation/mapping drm/radeon: Add kfd-->kgd interface of locking srbm_gfx_cntl register drm/radeon: Add calls to initialize and finalize kfd from radeon hsa/radeon: Add code base of hsa driver for AMD's GPUs hsa/radeon: Add initialization and unmapping of doorbell aperture hsa/radeon: Add scheduler code
hsa/radeon: Add kfd mmap handler
hsa/radeon: Add 2 new IOCTL to kfd, CREATE_QUEUE and DESTROY_QUEUE hsa/radeon: Update MAINTAINERS and CREDITS files hsa/radeon: Add interrupt handling module
hsa/radeon: Add the isr function of the KFD scehduler hsa/radeon: Handle deactivation of queues using interrupts hsa/radeon: Enable interrupts in KFD scheduler
hsa/radeon: Enable/Disable KFD interrupt module hsa/radeon: Add interrupt callback function to kgd2kfd interface hsa/radeon: Add kgd-->kfd interfaces for suspend and resume drm/radeon: Add calls to suspend and resume of kfd driver drm/radeon/cik: Don't touch int of pipes 1-7 drm/radeon/cik: Call kfd isr function
hsa/radeon: Fix memory size allocated for HPD
hsa/radeon: Fix list of supported devices
hsa/radeon: Fix coding style in cik_int.h
hsa/radeon: Print ioctl commnad only in debug mode hsa/radeon: Print ISR info only in debug mode
hsa/radeon: Workaround for a bug in amd_iommu
hsa/radeon: Eliminate warnings in compilation
hsa/radeon: Various kernel styling fixes
hsa/radeon: Rearrange structures in kfd_ioctl.h hsa/radeon: change another pr_info to pr_debug
hsa/radeon: Fix timeout calculation in sync_with_hw hsa/radeon: Update module information and version hsa/radeon: Update module version to 0.6.0
hsa/radeon: Fix initialization of sh_mem registers hsa/radeon: Fix compilation warnings
hsa/radeon: Remove old scheduler code
hsa/radeon: Static analysis (smatch) fixes
hsa/radeon: Check oversubscription before destroying runlist hsa/radeon: Don't verify cksum when parsing CRAT table hsa/radeon: Update module version to 0.6.1
hsa/radeon: Update module version to 0.6.2

Yair Shachar (1):
hsa/radeon: Adding qcm fence return status

 CREDITS                                            |    7 +
 MAINTAINERS                                        |    8 +
 drivers/Kconfig                                    |    2 +
 drivers/gpu/Makefile                               |    1 +
 drivers/gpu/drm/radeon/Makefile                    |    1 +
 drivers/gpu/drm/radeon/cik.c                       |  156 +--
 drivers/gpu/drm/radeon/cikd.h                      |   51 +-
 drivers/gpu/drm/radeon/radeon.h                    |    9 +
 drivers/gpu/drm/radeon/radeon_device.c             |   32 +
 drivers/gpu/drm/radeon/radeon_drv.c                |    6 +
 drivers/gpu/drm/radeon/radeon_kfd.c                |  630 ++++++++++
 drivers/gpu/drm/radeon/radeon_kms.c                |    9 +
 drivers/gpu/hsa/Kconfig                            |   20 +
 drivers/gpu/hsa/Makefile                           |    1 +
 drivers/gpu/hsa/radeon/Makefile                    |   12 +
 drivers/gpu/hsa/radeon/cik_int.h                   |   50 +
 drivers/gpu/hsa/radeon/cik_mqds.h                  |  250 ++++
 drivers/gpu/hsa/radeon/cik_regs.h                  |  220 ++++
 drivers/gpu/hsa/radeon/kfd_aperture.c              |  123 ++
 drivers/gpu/hsa/radeon/kfd_chardev.c               |  530 +++++++++
 drivers/gpu/hsa/radeon/kfd_crat.h                  |  294 +++++
 drivers/gpu/hsa/radeon/kfd_device.c                |  244 ++++
 drivers/gpu/hsa/radeon/kfd_device_queue_manager.c  |  981 ++++++++++++++++
 drivers/gpu/hsa/radeon/kfd_device_queue_manager.h  |  101 ++
 drivers/gpu/hsa/radeon/kfd_doorbell.c              |  242 ++++
 drivers/gpu/hsa/radeon/kfd_interrupt.c             |  177 +++
 drivers/gpu/hsa/radeon/kfd_kernel_queue.c          |  305 +++++
 drivers/gpu/hsa/radeon/kfd_kernel_queue.h          |   66 ++
 drivers/gpu/hsa/radeon/kfd_module.c                |  130 +++
 drivers/gpu/hsa/radeon/kfd_mqd_manager.c           |  290 +++++
 drivers/gpu/hsa/radeon/kfd_mqd_manager.h           |   54 +
 drivers/gpu/hsa/radeon/kfd_packet_manager.c        |  488 ++++++++
 drivers/gpu/hsa/radeon/kfd_pasid.c                 |   97 ++
 drivers/gpu/hsa/radeon/kfd_pm4_headers.h           |  682 +++++++++++
 drivers/gpu/hsa/radeon/kfd_pm4_opcodes.h           |  107 ++
 drivers/gpu/hsa/radeon/kfd_priv.h                  |  475 ++++++++
 drivers/gpu/hsa/radeon/kfd_process.c               |  391 +++++++
 drivers/gpu/hsa/radeon/kfd_process_queue_manager.c |  343 ++++++
 drivers/gpu/hsa/radeon/kfd_queue.c                 |  109 ++
 drivers/gpu/hsa/radeon/kfd_scheduler.h             |   72 ++
 drivers/gpu/hsa/radeon/kfd_topology.c              | 1207 ++++++++++++++++++++
 drivers/gpu/hsa/radeon/kfd_topology.h              |  168 +++
 drivers/gpu/hsa/radeon/kfd_vidmem.c                |   97 ++
 include/linux/mm_types.h                           |   14 +
 include/linux/radeon_kfd.h                         |  106 ++
 include/uapi/linux/kfd_ioctl.h                     |  133 +++
 mm/rmap.c                                          |    8 +-
 47 files changed, 9402 insertions(+), 97 deletions(-)
 create mode 100644 drivers/gpu/drm/radeon/radeon_kfd.c
 create mode 100644 drivers/gpu/hsa/Kconfig
 create mode 100644 drivers/gpu/hsa/Makefile
 create mode 100644 drivers/gpu/hsa/radeon/Makefile
 create mode 100644 drivers/gpu/hsa/radeon/cik_int.h
 create mode 100644 drivers/gpu/hsa/radeon/cik_mqds.h
 create mode 100644 drivers/gpu/hsa/radeon/cik_regs.h
 create mode 100644 drivers/gpu/hsa/radeon/kfd_aperture.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_chardev.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_crat.h
 create mode 100644 drivers/gpu/hsa/radeon/kfd_device.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_device_queue_manager.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_device_queue_manager.h
 create mode 100644 drivers/gpu/hsa/radeon/kfd_doorbell.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_interrupt.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_kernel_queue.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_kernel_queue.h
 create mode 100644 drivers/gpu/hsa/radeon/kfd_module.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_mqd_manager.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_mqd_manager.h
 create mode 100644 drivers/gpu/hsa/radeon/kfd_packet_manager.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_pasid.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_pm4_headers.h
 create mode 100644 drivers/gpu/hsa/radeon/kfd_pm4_opcodes.h
 create mode 100644 drivers/gpu/hsa/radeon/kfd_priv.h
 create mode 100644 drivers/gpu/hsa/radeon/kfd_process.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_process_queue_manager.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_queue.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_scheduler.h
 create mode 100644 drivers/gpu/hsa/radeon/kfd_topology.c
 create mode 100644 drivers/gpu/hsa/radeon/kfd_topology.h
 create mode 100644 drivers/gpu/hsa/radeon/kfd_vidmem.c
 create mode 100644 include/linux/radeon_kfd.h
 create mode 100644 include/uapi/linux/kfd_ioctl.h
Signature · 1 line
1.9.1