Commit 6f17ab9a authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-rust-next-2025-09-16' of...

Merge tag 'drm-rust-next-2025-09-16' of https://gitlab.freedesktop.org/drm/rust/kernel

 into drm-next

DRM Rust changes for v6.18

Alloc
  - Add BorrowedPage type and AsPageIter trait
  - Implement Vmalloc::to_page() and VmallocPageIter
  - Implement AsPageIter for VBox and VVec

DMA & Scatterlist
  - Add dma::DataDirection and type alias for dma_addr_t
  - Abstraction for struct scatterlist and struct sg_table

DRM
  - In the DRM GEM module, simplify overall use of generics, add
    DriverFile type alias and drop Object::SIZE.

Nova (Core)
  - Various register!() macro improvements (paving the way for lifting
    it to common driver infrastructure)
  - Minor VBios fixes and refactoring
  - Minor firmware request refactoring
  - Advance firmware boot stages; process Booter and patch its
    signature, process GSP and GSP bootloader
  - Switch development fimrware version to r570.144
  - Add basic firmware bindings for r570.144
  - Move GSP boot code to its own module
  - Clean up and take advantage of pin-init features to store most of
    the driver's private data within a single allocation
  - Update ARef import from sync::aref
  - Add website to MAINTAINERS entry

Nova (DRM)
  - Update ARef import from sync::aref
  - Add website to MAINTAINERS entry

Pin-Init
  - Merge pin-init PR from Benno
    - `#[pin_data]` now generates a `*Projection` struct similar to the
      `pin-project` crate.

    - Add initializer code blocks to `[try_][pin_]init!` macros: make
      initializer macros accept any number of `_: {/* arbitrary code
      */},` & make them run the code at that point.

    - Make the `[try_][pin_]init!` macros expose initialized fields via
      a `let` binding as `&mut T` or `Pin<&mut T>` for later fields.

Rust
  - Various methods for AsBytes and FromBytes traits

Tyr
  - Initial Rust driver skeleton for ARM Mali GPUs.
    - It can power up the GPU, query for GPU metatdata through MMIO and
      provide the metadata to userspace via DRM device IOCTL (struct
      drm_panthor_dev_query).

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

From: "Danilo Krummrich" <dakr@kernel.org>
Link: https://lore.kernel.org/r/DCUC4SY6SRBD.1ZLHAIQZOC6KG@kernel.org
parents 57704952 299eb328
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -131,8 +131,6 @@ crate so it can be used by other components as well.

Features desired before this happens:

* Relative register with build-time base address validation,
* Arrays of registers with build-time index validation,
* Make I/O optional I/O (for field values that are not registers),
* Support other sizes than `u32`,
* Allow visibility control for registers and individual fields,
@@ -232,23 +230,6 @@ Rust abstraction for debugfs APIs.
GPU (general)
=============

Parse firmware headers
----------------------

Parse ELF headers from the firmware files loaded from the filesystem.

| Reference: ELF utils
| Complexity: Beginner
| Contact: Abdiel Janulgue

Build radix3 page table
-----------------------

Build the radix3 page table to map the firmware.

| Complexity: Intermediate
| Contact: Abdiel Janulgue

Initial Devinit support
-----------------------

+18 −1
Original line number Diff line number Diff line
@@ -2086,6 +2086,19 @@ F: Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
F:	drivers/gpu/drm/panthor/
F:	include/uapi/drm/panthor_drm.h
ARM MALI TYR DRM DRIVER
M:	Daniel Almeida <daniel.almeida@collabora.com>
M:	Alice Ryhl <aliceryhl@google.com>
L:	dri-devel@lists.freedesktop.org
S:	Supported
W:	https://rust-for-linux.com/tyr-gpu-driver
W	https://drm.pages.freedesktop.org/maintainer-tools/drm-rust.html
B:	https://gitlab.freedesktop.org/panfrost/linux/-/issues
T:	git https://gitlab.freedesktop.org/drm/rust/kernel.git
F:	Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml
F:	drivers/gpu/drm/tyr/
F:	include/uapi/drm/panthor_drm.h
ARM MALI-DP DRM DRIVER
M:	Liviu Dudau <liviu.dudau@arm.com>
S:	Supported
@@ -7237,7 +7250,7 @@ F: include/linux/dma-mapping.h
F:	include/linux/swiotlb.h
F:	kernel/dma/
DMA MAPPING HELPERS DEVICE DRIVER API [RUST]
DMA MAPPING & SCATTERLIST API [RUST]
M:	Danilo Krummrich <dakr@kernel.org>
R:	Abdiel Janulgue <abdiel.janulgue@gmail.com>
R:	Daniel Almeida <daniel.almeida@collabora.com>
@@ -7248,7 +7261,9 @@ S: Supported
W:	https://rust-for-linux.com
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
F:	rust/helpers/dma.c
F:	rust/helpers/scatterlist.c
F:	rust/kernel/dma.rs
F:	rust/kernel/scatterlist.rs
F:	samples/rust/rust_dma.rs
DMA-BUF HEAPS FRAMEWORK
@@ -7838,6 +7853,7 @@ M: Danilo Krummrich <dakr@kernel.org>
M:	Alexandre Courbot <acourbot@nvidia.com>
L:	nouveau@lists.freedesktop.org
S:	Supported
W:	https://rust-for-linux.com/nova-gpu-driver
Q:	https://patchwork.freedesktop.org/project/nouveau/
B:	https://gitlab.freedesktop.org/drm/nova/-/issues
C:	irc://irc.oftc.net/nouveau
@@ -7849,6 +7865,7 @@ DRM DRIVER FOR NVIDIA GPUS [RUST]
M:	Danilo Krummrich <dakr@kernel.org>
L:	nouveau@lists.freedesktop.org
S:	Supported
W:	https://rust-for-linux.com/nova-gpu-driver
Q:	https://patchwork.freedesktop.org/project/nouveau/
B:	https://gitlab.freedesktop.org/drm/nova/-/issues
C:	irc://irc.oftc.net/nouveau
+2 −0
Original line number Diff line number Diff line
@@ -396,6 +396,8 @@ source "drivers/gpu/drm/sprd/Kconfig"

source "drivers/gpu/drm/imagination/Kconfig"

source "drivers/gpu/drm/tyr/Kconfig"

config DRM_HYPERV
	tristate "DRM Support for Hyper-V synthetic video device"
	depends on DRM && PCI && HYPERV
+1 −0
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
obj-$(CONFIG_DRM_LIMA)  += lima/
obj-$(CONFIG_DRM_PANFROST) += panfrost/
obj-$(CONFIG_DRM_PANTHOR) += panthor/
obj-$(CONFIG_DRM_TYR) += tyr/
obj-$(CONFIG_DRM_ASPEED_GFX) += aspeed/
obj-$(CONFIG_DRM_MCDE) += mcde/
obj-$(CONFIG_DRM_TIDSS) += tidss/
+3 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0

use kernel::{auxiliary, c_str, device::Core, drm, drm::gem, drm::ioctl, prelude::*, types::ARef};
use kernel::{
    auxiliary, c_str, device::Core, drm, drm::gem, drm::ioctl, prelude::*, sync::aref::ARef,
};

use crate::file::File;
use crate::gem::NovaObject;
Loading