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.

v2:
- Rebased on drm-misc-next and collected R-bs.
- Moved the Mali 5th-Gen AM GPU binding to a separate schema.
  Extended the AM system and arbitration bindings to describe
  resource assignments for GPUs that support partitioning.
- Corrected neural accelerator and GPU ID naming. Preserved GPU ID
  log output for older GPUs and fixed MMU interrupt initialization.
- Fixed runtime PM rollback and driver cleanup. Protected register
  access from shared IRQ handlers while the hardware is powered off.
- Strengthened AM protocol-version checks. Reworked message retries,
  arbitration command retries and timeout handling.
- Protected access-window assignments with a lock and saved requests
  received before assignment. Assigned all access windows to
  partition 0 when its mask is absent or zero.
- Reworked access-window request, grant and yield handling. Resent
  pending GPU requests after an arbiter restart.
- Stopped scheduler tick work before system suspend. Fixed resume
  retries, autosuspend after yield and cleanup during device removal.
- Improved handling of GPU access loss during firmware waits and
  reset. Cleared stale software reset state on resume.
- Added partition recovery during probe to ensure partitions reach
  RESET before arbitration starts.
- Bumped the DRM version to 1.10 for the extended gpu_info fields.
- Link to v1: 
https://lore.kernel.org/all/[email protected]/
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/[email protected]/

Karunika Choo (28):
  drm/panthor: Ignore -EOPNOTSUPP for shader-present nvmem lookup
  drm/panthor: Rename neural accelerator feature macro to NX
  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-gen5-am: Add Mali 5th-Gen AM schema
  drm/panthor: Add Mali v15 hardware support
  drm/panthor: Skip devfreq when no OPP table is present
  dt-bindings: gpu: panthor: Document AM 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
  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: Quiesce scheduler tick during system suspend
  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: Reset partitions before starting arbitration

 .../testing/sysfs-driver-panthor-arbitration  |  18 +
 .../gpu/arm,mali-gen5-am-arbitration.yaml     | 198 ++++
 .../bindings/gpu/arm,mali-gen5-am-system.yaml | 196 ++++
 .../bindings/gpu/arm,mali-gen5-am.yaml        |  90 ++
 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 |  73 ++
 .../arbitration/panthor_arbitration_drv.c     | 451 +++++++++
 .../arbitration/panthor_arbitration_sched.c   | 882 ++++++++++++++++++
 .../arbitration/panthor_arbitration_sched.h   |  45 +
 .../arbitration/panthor_partition_control.c   | 525 +++++++++++
 .../arbitration/panthor_partition_control.h   |  29 +
 .../arbitration/panthor_resource_group.c      | 373 ++++++++
 .../arbitration/panthor_resource_group.h      |  20 +
 drivers/gpu/drm/panthor/panthor_am_msg.h      | 182 ++++
 drivers/gpu/drm/panthor/panthor_aw.c          | 689 ++++++++++++++
 drivers/gpu/drm/panthor/panthor_aw.h          |  57 ++
 drivers/gpu/drm/panthor/panthor_devfreq.c     |  29 +-
 drivers/gpu/drm/panthor/panthor_device.c      | 112 ++-
 drivers/gpu/drm/panthor/panthor_device.h      | 146 ++-
 drivers/gpu/drm/panthor/panthor_device_io.h   |  84 ++
 drivers/gpu/drm/panthor/panthor_drv.c         |  13 +-
 drivers/gpu/drm/panthor/panthor_fw.c          |  27 +-
 drivers/gpu/drm/panthor/panthor_fw.h          |   2 +
 drivers/gpu/drm/panthor/panthor_fw_regs.h     |   2 -
 drivers/gpu/drm/panthor/panthor_gpu.c         |  13 +-
 .../drm/panthor/panthor_gpu_discover_regs.h   |  42 +
 drivers/gpu/drm/panthor/panthor_gpu_regs.h    |   4 +-
 drivers/gpu/drm/panthor/panthor_heap.c        |   3 +-
 drivers/gpu/drm/panthor/panthor_hw.c          | 209 ++++-
 drivers/gpu/drm/panthor/panthor_hw.h          |  59 +-
 drivers/gpu/drm/panthor/panthor_mmu.c         |  47 +-
 drivers/gpu/drm/panthor/panthor_mmu_regs.h    |  23 +-
 drivers/gpu/drm/panthor/panthor_pwr.c         |  36 +-
 drivers/gpu/drm/panthor/panthor_pwr_regs.h    |   2 -
 drivers/gpu/drm/panthor/panthor_sched.c       |  21 +
 drivers/gpu/drm/panthor/panthor_sched.h       |   2 +
 drivers/gpu/drm/panthor/system/Makefile       |  13 +
 .../drm/panthor/system/panthor_system_drv.c   | 344 +++++++
 include/uapi/drm/panthor_drm.h                |  23 +-
 42 files changed, 4939 insertions(+), 185 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 Documentation/devicetree/bindings/gpu/arm,mali-gen5-am.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

Reply via email to