linux/Documentation/gpu
Dave Airlie 29daacacf4 DRM Rust changes for v7.3-rc1
- I/O (shared from driver-core tree via signed tag rust-io-7.3-rc1):
 
   - Rework of I/O types: make I/O regions typed (with a
     dynamically-sized Region type for the existing untyped case), create
     view types representing subregions of a mapped I/O region, and add
     io_project!() for safely creating subviews.
 
   - Split Io into a base trait (IoBase) and an extension trait (Io) with
     a blanket implementation, preventing implementers from overriding
     provided methods that unsafe code relies on.
 
   - Add a SysMem backend for shared system memory with volatile access,
     and make Coherent implement Io via an I/O view type.  Add copying
     methods (memcpy_{from,to}io).
 
   - Replace dma_read!/dma_write! with io_read!/io_write!; drop the old
     macros.
 
 - DRM:
 
   - RegistrationGuard and RegistrationData:
     - Rework DeviceContext typestates: rename Uninit to Normal, add an
       Ioctl context, restrict AlwaysRefCounted to Normal for both Device
       and GEM Object, and establish a Deref chain from Registered to
       Normal.
 
     - Introduce RegistrationGuard, a guard representing a
       drm_dev_enter/exit SRCU critical section that proves the DRM
       device is registered, which implies the parent bus device is still
       bound.
 
     - Add RegistrationData as a GAT on drm::Driver. The data does not
       outlive driver unbind, so it can capture lifetime-annotated device
       resources and references. Accessible through the guard via a
       closure with HRTB lifetime.
 
     - Wrap ioctl dispatch in RegistrationGuard (returning ENODEV if
       unplugged) and pass registration data to handlers.
 
     - Add Driver::ParentDevice associated type.
 
   - Fix unbounded lifetimes in ioctl handler arguments.
 
   - Fix a race in drm_dev_register() where a partial failure allowed
     in-flight ioctls to proceed while the error path tore down
     resources.
 
   - GEM shmem: add DmaResvGuard helper, vmap functions, and sg_table()
     accessor.
 
   - GPUVM: require Send + Sync for the driver's associated data,
     implement Send and Sync for GpuVaAlloc and GpuVmBo, add SmContext
     lifetime bound, update DriverGpuVm for DeviceContext.
 
 - Nova:
 
   - nova-core / nova-drm cross-crate dependency:
     - Build nova-core and nova-drm from drivers/gpu/Makefile for build
       ordering, export nova-core Rust symbols for nova-drm. Workaround
       until the build system supports Rust cross-crate dependencies
       natively.
 
   - GSP boot process consolidation:
     - Introduce GspBootContext to bundle common boot parameters,
       replacing per-argument threading. Separate context and GPU
       lifetimes to support mutable borrows of GPU subdevices.
 
     - Turn FWSEC execution into a HAL method, make FWSEC bootloader
       usage a property of the TU102 HAL (GA102+ gets its own instance
       with it disabled). Move firmware file selection to the GSP HAL.
 
     - Store the Fsp instance in Gpu (lifetime tied to the GPU, not just
       a single boot invocation). Move GSP state and unload bundle into a
       pinned subobject for reliable teardown on partial init failure.
 
   - Boot GSP with vGPU enabled:
     - Add PRC (Product Reconfiguration Control) protocol to query device
       configuration from the FSP. Read vGPU mode, detect and store vGPU
       state.
     - Set RMSetSriovMode registry entry and reserve the larger WPR2 heap
       required when vGPU is enabled.
     - Build SetRegistry entries dynamically.
 
   - TLV firmware image format:
     - Add a TLV (type-length-value) parser for the new firmware image
       format. TLV files use unversioned filenames with a .tlv suffix,
       start with "NVFW" magic, and contain tagged blocks with 4-byte
       aligned payloads.
     - Transition all firmware loading (booter, gsp, gen_bootloader, fsp)
       to TLV images.
     - Note: this requires a development firmware not in linux-firmware
       [1]; this is temporary and serves the transition to r615.
 
   - Hopper/Blackwell fixes and cleanups:
     - Correct FRTS vidmem offset calculation, split FbLayout into FSP
       and non-FSP versions, fix Blackwell flush address composition, use
       absolute FBHUB0 flush registers on Blackwell, use correct sysmem
       flush registers on Hopper.
     - Harden FSP messaging: limit receive allocation size, catch bogus
       queue pointers, ensure DMA allocation lifetimes for FMC boot and
       LibOS, wait for RISC-V HALTED on unload.
 
   - I/O projection adoption:
     - Use io_project!() for PTE array, message queues, and Falcon DMA
       transfer bounds checking.
 
   - Misc:
     - Keep unloading if FWSEC-SB fails during Turing/Ampere GSP reset.
     - Don't declare booter firmware for FSP chipsets.
     - Fix packed registry table size.
     - Extract and display usable FB regions from GSP.
     - Store bar and dev directly in Falcon, simplifying the API.
     - Parse VBIOS structs via zerocopy.
     - Convert to kernel bitfield macro, remove local one.
     - Move register definitions into sub-modules.
     - Add FSP and PRC protocol documentation.
 
 - Tyr:
 
   - Firmware loading and MCU boot:
     - Add a generic slot manager for dynamically allocating limited
       hardware slots to software seats, with lazy eviction under
       contention.
     - Add MMU support wrapping the slot manager for address-space slot
       allocation, with MAIR-to-MEMATTR translation.
     - Add GPU virtual memory (VM) support using drm_gpuvm with ARM64
       LPAE Stage 1 page tables and 4KB/2MB page sizes.
     - Add a kernel buffer object type for internal driver allocations.
     - Add a parser for the Mali CSF firmware binary format.
     - Add MCU booting: load, parse, and map firmware sections into VM,
       then boot the MCU at probe().
 
 - Cross-subsystem:
 
   - Add faux::Device type with AsBusDevice support. Allow retrieving a
     bound Device from a Registration.
 
   - Add device lifetime to IoPageTable.
 
   - Add Vec::zeroed method.
 
   - Add firmware::request_into_buf() to load firmware into a
     caller-provided buffer.
 
   - Rename dma_handle to dma_address in the DMA abstraction.
 
   - Change pci_sriov_get_totalvfs() return type to unsigned int; add
     Rust helper.
 
 [1] https://github.com/ttabi/linux-firmware-nova
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS2q/xV6QjXAdC7k+1FlHeO1qrKLgUCandOTAAKCRBFlHeO1qrK
 LgWSAP4wHxhEuOme55bgZkne0XMums8bLln69N/UR+Rim+agJQD7BmgsL0ANxGOu
 Csnsxej/tcktyraoy/QGHMjYX7pcGwM=
 =UXCM
 -----END PGP SIGNATURE-----

Merge tag 'drm-rust-next-2026-08-08' of https://gitlab.freedesktop.org/drm/rust/kernel into drm-next

DRM Rust changes for v7.3-rc1

- I/O (shared from driver-core tree via signed tag rust-io-7.3-rc1):

  - Rework of I/O types: make I/O regions typed (with a
    dynamically-sized Region type for the existing untyped case), create
    view types representing subregions of a mapped I/O region, and add
    io_project!() for safely creating subviews.

  - Split Io into a base trait (IoBase) and an extension trait (Io) with
    a blanket implementation, preventing implementers from overriding
    provided methods that unsafe code relies on.

  - Add a SysMem backend for shared system memory with volatile access,
    and make Coherent implement Io via an I/O view type.  Add copying
    methods (memcpy_{from,to}io).

  - Replace dma_read!/dma_write! with io_read!/io_write!; drop the old
    macros.

- DRM:

  - RegistrationGuard and RegistrationData:
    - Rework DeviceContext typestates: rename Uninit to Normal, add an
      Ioctl context, restrict AlwaysRefCounted to Normal for both Device
      and GEM Object, and establish a Deref chain from Registered to
      Normal.

    - Introduce RegistrationGuard, a guard representing a
      drm_dev_enter/exit SRCU critical section that proves the DRM
      device is registered, which implies the parent bus device is still
      bound.

    - Add RegistrationData as a GAT on drm::Driver. The data does not
      outlive driver unbind, so it can capture lifetime-annotated device
      resources and references. Accessible through the guard via a
      closure with HRTB lifetime.

    - Wrap ioctl dispatch in RegistrationGuard (returning ENODEV if
      unplugged) and pass registration data to handlers.

    - Add Driver::ParentDevice associated type.

  - Fix unbounded lifetimes in ioctl handler arguments.

  - Fix a race in drm_dev_register() where a partial failure allowed
    in-flight ioctls to proceed while the error path tore down
    resources.

  - GEM shmem: add DmaResvGuard helper, vmap functions, and sg_table()
    accessor.

  - GPUVM: require Send + Sync for the driver's associated data,
    implement Send and Sync for GpuVaAlloc and GpuVmBo, add SmContext
    lifetime bound, update DriverGpuVm for DeviceContext.

- Nova:

  - nova-core / nova-drm cross-crate dependency:
    - Build nova-core and nova-drm from drivers/gpu/Makefile for build
      ordering, export nova-core Rust symbols for nova-drm. Workaround
      until the build system supports Rust cross-crate dependencies
      natively.

  - GSP boot process consolidation:
    - Introduce GspBootContext to bundle common boot parameters,
      replacing per-argument threading. Separate context and GPU
      lifetimes to support mutable borrows of GPU subdevices.

    - Turn FWSEC execution into a HAL method, make FWSEC bootloader
      usage a property of the TU102 HAL (GA102+ gets its own instance
      with it disabled). Move firmware file selection to the GSP HAL.

    - Store the Fsp instance in Gpu (lifetime tied to the GPU, not just
      a single boot invocation). Move GSP state and unload bundle into a
      pinned subobject for reliable teardown on partial init failure.

  - Boot GSP with vGPU enabled:
    - Add PRC (Product Reconfiguration Control) protocol to query device
      configuration from the FSP. Read vGPU mode, detect and store vGPU
      state.
    - Set RMSetSriovMode registry entry and reserve the larger WPR2 heap
      required when vGPU is enabled.
    - Build SetRegistry entries dynamically.

  - TLV firmware image format:
    - Add a TLV (type-length-value) parser for the new firmware image
      format. TLV files use unversioned filenames with a .tlv suffix,
      start with "NVFW" magic, and contain tagged blocks with 4-byte
      aligned payloads.
    - Transition all firmware loading (booter, gsp, gen_bootloader, fsp)
      to TLV images.
    - Note: this requires a development firmware not in linux-firmware
      [1]; this is temporary and serves the transition to r615.

  - Hopper/Blackwell fixes and cleanups:
    - Correct FRTS vidmem offset calculation, split FbLayout into FSP
      and non-FSP versions, fix Blackwell flush address composition, use
      absolute FBHUB0 flush registers on Blackwell, use correct sysmem
      flush registers on Hopper.
    - Harden FSP messaging: limit receive allocation size, catch bogus
      queue pointers, ensure DMA allocation lifetimes for FMC boot and
      LibOS, wait for RISC-V HALTED on unload.

  - I/O projection adoption:
    - Use io_project!() for PTE array, message queues, and Falcon DMA
      transfer bounds checking.

  - Misc:
    - Keep unloading if FWSEC-SB fails during Turing/Ampere GSP reset.
    - Don't declare booter firmware for FSP chipsets.
    - Fix packed registry table size.
    - Extract and display usable FB regions from GSP.
    - Store bar and dev directly in Falcon, simplifying the API.
    - Parse VBIOS structs via zerocopy.
    - Convert to kernel bitfield macro, remove local one.
    - Move register definitions into sub-modules.
    - Add FSP and PRC protocol documentation.

- Tyr:

  - Firmware loading and MCU boot:
    - Add a generic slot manager for dynamically allocating limited
      hardware slots to software seats, with lazy eviction under
      contention.
    - Add MMU support wrapping the slot manager for address-space slot
      allocation, with MAIR-to-MEMATTR translation.
    - Add GPU virtual memory (VM) support using drm_gpuvm with ARM64
      LPAE Stage 1 page tables and 4KB/2MB page sizes.
    - Add a kernel buffer object type for internal driver allocations.
    - Add a parser for the Mali CSF firmware binary format.
    - Add MCU booting: load, parse, and map firmware sections into VM,
      then boot the MCU at probe().

- Cross-subsystem:

  - Add faux::Device type with AsBusDevice support. Allow retrieving a
    bound Device from a Registration.

  - Add device lifetime to IoPageTable.

  - Add Vec::zeroed method.

  - Add firmware::request_into_buf() to load firmware into a
    caller-provided buffer.

  - Rename dma_handle to dma_address in the DMA abstraction.

  - Change pci_sriov_get_totalvfs() return type to unsigned int; add
    Rust helper.

[1] https://github.com/ttabi/linux-firmware-nova

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: "Danilo Krummrich" <dakr@kernel.org>
Link: https://patch.msgid.link/DKJQQUOS0PVO.3JPR3MYK4PDVZ@kernel.org
2026-08-10 14:48:11 +10:00
..
amdgpu drm/amdgpu/display: Add amdgpu_display.c documentation 2026-07-15 09:15:41 -04:00
bridge
dp-mst
imagination drm/imagination: Numerous documentation fixes. 2023-11-28 18:56:03 +01:00
intel-display drm/i915/doc: Document DP link capabilities 2026-07-09 10:22:29 +03:00
nova gpu: nova-core: add TLV parser for firmware files 2026-08-06 01:54:12 +02:00
rfc Documentation/gpu/rfc: fix toctree 2026-05-13 11:07:12 +03:00
xe drm/xe/xe_ras: Add RAS GPU health indicator 2026-07-17 10:18:12 +05:30
afbc.rst
automated_testing.rst drm/doc: update tree setup instructions 2026-06-17 15:51:10 +05:30
backlight.rst
driver-uapi.rst Documentation/gpu: add some tables of contents to large documents 2026-05-13 11:07:12 +03:00
drivers.rst Documentation/gpu: add dedicated documentation for Intel display 2026-05-11 10:30:13 +03:00
drm-client.rst drm/client: Move client event handlers to drm_client_event.c 2024-10-18 09:23:03 +02:00
drm-compute.rst kernel/cgroup: Add "dmem" memory accounting cgroup 2025-01-06 17:24:38 +01:00
drm-internals.rst Documentation/gpu: add some tables of contents to large documents 2026-05-13 11:07:12 +03:00
drm-kms-helpers.rst drm/bridge: Document bridge chain format selection 2026-06-09 21:03:51 +01:00
drm-kms.rst drm: Add new general DRM property "color format" 2026-06-09 21:03:50 +01:00
drm-mm.rst Documentation/gpu: add some tables of contents to large documents 2026-05-13 11:07:12 +03:00
drm-ras.rst Documentation/gpu: add some tables of contents to large documents 2026-05-13 11:07:12 +03:00
drm-uapi.rst drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
drm-usage-stats.rst Documentation/gpu: add some tables of contents to large documents 2026-05-13 11:07:12 +03:00
drm-vm-bind-async.rst Documentation/gpu: Add a VM_BIND async document 2023-10-17 10:38:07 +02:00
drm-vm-bind-locking.rst Documentation/gpu: VM_BIND locking document 2023-11-29 20:54:43 +01:00
i915.rst Documentation/gpu: add dedicated documentation for Intel display 2026-05-11 10:30:13 +03:00
implementation_guidelines.rst Documentation/gpu: VM_BIND locking document 2023-11-29 20:54:43 +01:00
index.rst Documentation/gpu: limit main toctree depth to 2 2026-05-13 11:07:12 +03:00
introduction.rst Documentation/gpu: add some tables of contents to large documents 2026-05-13 11:07:12 +03:00
kms-properties.csv drm/connector: hdmi: Add Broadcast RGB property 2024-05-28 10:24:37 +02:00
komeda-kms.rst drm: Rename struct drm_atomic_state to drm_atomic_commit 2026-05-04 14:05:04 +10:00
mcde.rst
meson.rst
msm-crash-dump.rst Documentation: Fix typos 2023-08-18 11:29:03 -06:00
msm-preemption.rst Documentation: document adreno preemption 2024-10-04 08:47:29 -07:00
nouveau.rst Documentation: nouveau: Update GSP message queue kernel-doc reference 2025-06-13 16:46:35 +02:00
panfrost.rst drm/panfrost: Replace fdinfo's profiling debugfs knob with sysfs 2024-03-11 13:27:10 +01:00
panthor.rst Documentation/gpu: Add fdinfo meanings of panthor-*-memory tags 2025-02-07 15:23:39 +01:00
pl111.rst
tegra.rst
todo.rst drm/todo: clarify drm_syncobj error TODOs 2026-06-22 15:20:15 +02:00
tve200.rst
v3d.rst
vc4.rst
vga-switcheroo.rst
vgaarbiter.rst Documentation: vgaarbiter: Fix grammar 2025-03-19 15:11:49 +01:00
vkms.rst drm/vkms: Update testing with IGT IGT_DEVICE 2025-11-04 11:51:15 +01:00
xen-front.rst
zynqmp.rst drm: xlnx: zynqmp_dpsub: Fix kernel doc 2025-01-16 12:45:16 +01:00