This series adds HW-assisted para-virtualization support for Mali v15
GPUs. v15 GPUs provide 16 register sets for job submission known as
access windows (AWs). The GPU hardware itself is then time-sliced across
each requesting access window.
Patches 1-6 make panthor less dependent on fixed register layouts by
caching decoded GPU_ID fields and moving register offsets into the HW
description.
Patches 7-9 update dt-bindings and add basic support for v15 GPUs.
Patches 10-11 introduce the GPU-wide configuration driver.
Patches 12-21 implement the time-slicing driver with a simple
interrupt-driven round robin scheduler.
Patches 22-27 update panthor to be time-slice aware as well as
being resilient against the GPU being yielded at any time.
v1:
- Rebased on drm-misc-next.
- Added device-tree bindings for the GPU and virtualization components.
- Improved GPU identification and register handling.
- Updated AM messaging to protocol v2.
- Improved GPU scheduling and recovery from timeouts and failed
commands.
- Added access-window assignments through device tree and earlier GPU
release when another window is waiting.
- Improved power management, driver setup and cleanup.
- Fixed races involving GPU resets, loss of access and late grants.
- Kept frequency reporting available without devfreq and documented
scheduler timeout settings.
- Link to RFC: https://lore.kernel.org/all/20260528150546.3168527-1-karunika.choo@arm.com/
Kind regards,
Karunika Choo
Karunika Choo (27):
drm/panthor: Ignore -EOPNOTSUPP for shader-present nvmem lookup
drm/panthor: Move register access helpers out of panthor_device.h
drm/panthor: Parse and store GPU_ID fields
drm/panthor: Add 64-bit GPU_ID decoding for v15 GPUs
drm/panthor: Move register base offsets to the HW description
drm/panthor: Derive MMU AS register addresses from base and stride
dt-bindings: gpu: mali-valhall-csf: Add Mali Gen5 AM compatible
drm/panthor: Add Mali v15 hardware support
drm/panthor: Skip devfreq when no OPP table is present
dt-bindings: gpu: panthor: Document panthor-system bindings
drm/panthor: Add AM_SYSTEM platform driver
dt-bindings: gpu: panthor: Document panthor-arbitration bindings
drm/panthor: Add AM_PARTITION_CONTROL support
drm/panthor: Add AM message helpers
drm/panthor: Add AM_RESOURCE_GROUP support
drm/panthor: Add arbitration scheduler
drm/panthor: Route arbitration events
dt-bindings: gpu: panthor: Document AW assignment DT property
drm/panthor: Add AW assignment tracking
drm/panthor: Handle partition control INVALID_COMMAND interrupt
drm/panthor: Request AW to yield GPU access on idle
drm/panthor: Add access-window support
drm/panthor: Synchronize HW component PM transitions
drm/panthor: Route HW component PM through access windows
drm/panthor: Tolerate access-window loss during HW waits
drm/panthor: Prevent missed post-yield cleanup due to reset
drm/panthor: Release GPU access immediately for out-of-band grants
.../testing/sysfs-driver-panthor-arbitration | 18 +
.../gpu/arm,mali-gen5-am-arbitration.yaml | 135 ++++
.../bindings/gpu/arm,mali-gen5-am-system.yaml | 76 ++
.../bindings/gpu/arm,mali-valhall-csf.yaml | 26 +-
MAINTAINERS | 2 +
drivers/gpu/drm/panthor/Kconfig | 20 +
drivers/gpu/drm/panthor/Makefile | 3 +
drivers/gpu/drm/panthor/arbitration/Makefile | 15 +
.../panthor/arbitration/panthor_arbitration.h | 81 ++
.../arbitration/panthor_arbitration_drv.c | 451 +++++++++++
.../arbitration/panthor_arbitration_sched.c | 755 ++++++++++++++++++
.../arbitration/panthor_arbitration_sched.h | 46 ++
.../arbitration/panthor_partition_control.c | 428 ++++++++++
.../arbitration/panthor_partition_control.h | 29 +
.../arbitration/panthor_resource_group.c | 323 ++++++++
.../arbitration/panthor_resource_group.h | 22 +
drivers/gpu/drm/panthor/panthor_am_msg.h | 159 ++++
drivers/gpu/drm/panthor/panthor_aw.c | 628 +++++++++++++++
drivers/gpu/drm/panthor/panthor_aw.h | 53 ++
drivers/gpu/drm/panthor/panthor_devfreq.c | 31 +-
drivers/gpu/drm/panthor/panthor_device.c | 82 +-
drivers/gpu/drm/panthor/panthor_device.h | 131 ++-
drivers/gpu/drm/panthor/panthor_device_io.h | 83 ++
drivers/gpu/drm/panthor/panthor_drv.c | 1 +
drivers/gpu/drm/panthor/panthor_fw.c | 12 +-
drivers/gpu/drm/panthor/panthor_fw_regs.h | 2 -
drivers/gpu/drm/panthor/panthor_gpu.c | 13 +-
.../drm/panthor/panthor_gpu_discover_regs.h | 44 +
drivers/gpu/drm/panthor/panthor_gpu_regs.h | 3 +-
drivers/gpu/drm/panthor/panthor_heap.c | 3 +-
drivers/gpu/drm/panthor/panthor_hw.c | 193 ++++-
drivers/gpu/drm/panthor/panthor_hw.h | 56 +-
drivers/gpu/drm/panthor/panthor_mmu.c | 45 +-
drivers/gpu/drm/panthor/panthor_mmu_regs.h | 23 +-
drivers/gpu/drm/panthor/panthor_pwr.c | 29 +-
drivers/gpu/drm/panthor/panthor_pwr_regs.h | 2 -
drivers/gpu/drm/panthor/panthor_sched.c | 5 +
drivers/gpu/drm/panthor/system/Makefile | 13 +
.../drm/panthor/system/panthor_system_drv.c | 304 +++++++
include/uapi/drm/panthor_drm.h | 23 +-
40 files changed, 4193 insertions(+), 175 deletions(-)
create mode 100644 Documentation/ABI/testing/sysfs-driver-panthor-arbitration
create mode 100644 Documentation/devicetree/bindings/gpu/arm,mali-gen5-am-arbitration.yaml
create mode 100644 Documentation/devicetree/bindings/gpu/arm,mali-gen5-am-system.yaml
create mode 100644 drivers/gpu/drm/panthor/arbitration/Makefile
create mode 100644 drivers/gpu/drm/panthor/arbitration/panthor_arbitration.h
create mode 100644 drivers/gpu/drm/panthor/arbitration/panthor_arbitration_drv.c
create mode 100644 drivers/gpu/drm/panthor/arbitration/panthor_arbitration_sched.c
create mode 100644 drivers/gpu/drm/panthor/arbitration/panthor_arbitration_sched.h
create mode 100644 drivers/gpu/drm/panthor/arbitration/panthor_partition_control.c
create mode 100644 drivers/gpu/drm/panthor/arbitration/panthor_partition_control.h
create mode 100644 drivers/gpu/drm/panthor/arbitration/panthor_resource_group.c
create mode 100644 drivers/gpu/drm/panthor/arbitration/panthor_resource_group.h
create mode 100644 drivers/gpu/drm/panthor/panthor_am_msg.h
create mode 100644 drivers/gpu/drm/panthor/panthor_aw.c
create mode 100644 drivers/gpu/drm/panthor/panthor_aw.h
create mode 100644 drivers/gpu/drm/panthor/panthor_device_io.h
create mode 100644 drivers/gpu/drm/panthor/panthor_gpu_discover_regs.h
create mode 100644 drivers/gpu/drm/panthor/system/Makefile
create mode 100644 drivers/gpu/drm/panthor/system/panthor_system_drv.c
--
2.43.0