gpu: nova-core: process and prepare more firmwares to boot GSP
Subsystems (8)
Alexandre Courbot
maintainerv6 cover gpu: nova-core: process and prepare more firmwares to boot GSP
Sending a final revision to have the Link: tags that dim requires, and for the record.
This series makes more progress on the GSP boot process for Ampere GPUs.
At the end of the previous series [1], we were left with a WPR memory region created by the FRTS firmware, but still far from the GSP running. This series brings us closer to that goal by preparing 2 new firmware packages:
* The Booter firmware, which the driver loads and runs on the SEC2 falcon;
* The GSP bootloader and firmware, with the bootloader loaded by Booter onto the GSP RISC-V core to verify and load the actual GSP firmware.
There firmwares are involved in a rather complex dance that is made necessary by limitations related to the level of privilege required to load code onto the GSP (doing so requires a Heavy Secured signed firmware, which is the role fulfilled by Booter).
The first 5 patches perform some cleanup and preparatory work for the remainder of the series. Notably, the GSP boot is moved to a new method of Gpu to get ready for the additional steps that will be added to it, and the Gpu object is now fully built in-place. We also simplify chipset name generation a bit and move the code requesting a firmware file into a dedicated function in prevision of the removal of the Firmware structure.
Patch 6 parses the Booter firmware file, queries the hardware for the right signature to use, and patch it into the firmware blob. This makes Booter ready to load and run.
Patches 7 and 8 prepare the GSP firmware and its bootloader, and keep them into a single structure as they are closely related.
Patches 9 and 10 switch to the 570.144 firmware and introduce the layout for its bindings. The raw bindings are stored in a private module, and abstracted by the parent module as needed. This allows consumer modules to access a safer/nicer form of the bindings than the raw one, and also makes it easier to switch to a different (and potentially incompatible) firmware version in the future.
570.144 has been picked because it is the latest firmware currently in linux-firmware, but as development progresses the plan is to switch to a newer one that is designed with the constraint of upstream in mind. So support for 570.144 will be dropped in the future. Support for multiple firmware versions is not considered at the moment: there is no immediate need for it as the driver is still unstable, and we can think about this point once we approach stability (and have better visibility about the shape of the firmware at that point).
The last patch introduces the first bindings and uses them to compute more framebuffer layout information needed for booting the GSP. A separate patch series will pick up from there to use this information and finally run these firmware blobs.
The base of this series is today's drm-rust-next, with the Alignment [2] series required for the last patch.
A tree with all these dependencies and the patches of this series is available at [3].
[1] https://lore.kernel.org/rust-for-linux/[email protected]/
[2] https://lore.kernel.org/rust-for-linux/[email protected]/
[3] https://github.com/Gnurou/linux/tree/b4/nova_firmware
---
Changes in v6:
- Rename request_nv_firmware to nv_firmware.
- Move GSP boot code to the gsp/boot module.
- Declare and use an empty Gsp type and proactively pin it into the
Gpu object, in prevision of the future addition of mutexes.
- Link to v5: https://lore.kernel.org/r/[email protected]
Changes in v5:
- Perform construction of Gpu object in-place.
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- Rebase on top of latest Alignment series.
- Make use of pin-init references to initialized fields.
- Remove all uses of unsafe except for FromBytes and AsBytes implementations.
- Keep the GSP placeholder inside the Gpu struct.
- Move GSP firmware bindings under the gsp module.
- Get the firmware-specific information from the bindings instead of a
HAL.
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Move the GSP boot process out of the Gpu constructor.
- Get rid of the Firmware struct and discard loaded firmware blobs
after the GSP is booted.
- Consolidate the GSP firmware, bootloader and signatures into a single type.
- Make firmware bindings completely opaque to the driver.
- Improve firmware abstractions related to framebuffer carveout.
- Improve comments and naming throughout the series. (thanks John!)
- Use alias for bindings module in nvfw to avoid repeated version
numbers everywhere. (thanks John!)
- Fix inconsistency in naming of members of Booter header. (thanks
Timur!)
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Add some GSP bindings and use them to compute more FB layout info
needed to boot GSP,
- Use PinInit in GspFirmware to avoid several heap allocations,
- Rename bootloader to gsp_bootloader in Firmware to avoid
confusion with the future Turing falcon bootloader,
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Alexandre Courbot (10):
gpu: nova-core: require Send on FalconEngine and FalconHal
gpu: nova-core: move GSP boot code to its own module
gpu: nova-core: add Chipset::name() method
gpu: nova-core: firmware: move firmware request code into a function
gpu: nova-core: firmware: add support for common firmware header
gpu: nova-core: firmware: process Booter and patch its signature
gpu: nova-core: firmware: process and prepare the GSP firmware
gpu: nova-core: firmware: process the GSP bootloader
gpu: nova-core: firmware: use 570.144 firmware
gpu: nova-core: compute layout of more framebuffer regions required for GSP
Alistair Popple (1):
gpu: nova-core: Add base files for r570.144 firmware bindings
Documentation/gpu/nova/core/todo.rst | 17 - drivers/gpu/nova-core/driver.rs | 9 +- drivers/gpu/nova-core/falcon.rs | 6 +- drivers/gpu/nova-core/falcon/hal.rs | 2 +- drivers/gpu/nova-core/fb.rs | 65 +++- drivers/gpu/nova-core/firmware.rs | 107 ++++-- drivers/gpu/nova-core/firmware/booter.rs | 375 ++++++++++++++++++++++ drivers/gpu/nova-core/firmware/gsp.rs | 243 ++++++++++++++ drivers/gpu/nova-core/firmware/riscv.rs | 91 ++++++ drivers/gpu/nova-core/gpu.rs | 186 ++++------- drivers/gpu/nova-core/gsp.rs | 27 ++ drivers/gpu/nova-core/gsp/boot.rs | 137 ++++++++ drivers/gpu/nova-core/gsp/fw.rs | 101 ++++++ drivers/gpu/nova-core/gsp/fw/r570_144.rs | 28 ++ drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs | 126 ++++++++ drivers/gpu/nova-core/nova_core.rs | 1 + drivers/gpu/nova-core/util.rs | 20 -- 17 files changed, 1337 insertions(+), 204 deletions(-)
---
base-commit: e2580413a83680f679904ad2f2c1aa6969876469
change-id: 20250822-nova_firmware-e0ffb492ba35
Best regards,
Signature · 1 line
Alexandre Courbot <[email protected]>
Alexandre Courbot
maintainerPATCH v6 1/11 gpu: nova-core: require `Send` on `FalconEngine` and `FalconHal`
We want to store the GSP and SEC2 falcon instances inside the Gpu structure, but doing so require these types to implement Send for pci::Driver to remain implementable on NovaCore, which embeds Gpu.
All implementors of FalconEngine and FalconHal satisfy the requirements of Send, and these traits also already required Sync, so this a minor tweak.
--- drivers/gpu/nova-core/falcon.rs | 2 +- drivers/gpu/nova-core/falcon/hal.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/nova-core/falcon.rs +1 -1
@@ -286,7 +286,7 @@ fn from(value: bool) -> Self {/// Each engine provides one base for `PFALCON` and `PFALCON2` registers. The `ID` constant is used /// to identify a given Falcon instance with register I/O methods. pub (crate )trait FalconEngine : -Sync +RegisterBase <PFalconBase > +RegisterBase <PFalcon2Base > +Sized +Send +Sync +RegisterBase <PFalconBase > +RegisterBase <PFalcon2Base > +Sized {/// Singleton of the engine, used to identify it with register I/O methods. const ID :Self ;
drivers/gpu/nova-core/falcon/hal.rs +1 -1
@@ -13,7 +13,7 @@/// Implements chipset-specific low-level operations. The trait is generic against [`FalconEngine`] /// so its `BASE` parameter can be used in order to avoid runtime bound checks when accessing /// registers. -pub (crate )trait FalconHal <E :FalconEngine >:Sync { +pub (crate )trait FalconHal <E :FalconEngine >:Send +Sync {/// Activates the Falcon core if the engine is a risvc/falcon dual engine. fn select_core (&self, _falcon: &Falcon <E >, _bar: &Bar0 ) ->Result {Ok (())
Signature · 1 line
2.51.0
Alexandre Courbot
maintainerPATCH v6 2/11 gpu: nova-core: move GSP boot code to its own module
In reply to Alexandre CourbotRight now the GSP boot code is very incomplete and limited to running FRTS, so having it in Gpu::new is not a big constraint.
However, this will change as we add more steps of the GSP boot process, and not all GPU families follow the same procedure, so having these steps in a dedicated method is the logical construct.
There is also the fact the GSP will require its own runtime data, and while it won't immediately need to be pinned, we want to be ready for the time where it will - most likely when it starts using mutexes.
Thus, add an empty Gsp type that is pinned inside Gpu and initialized using a pin initializer. This sets the constraint we need to observe from the start, and could spare us some costly refactoring down the road.
Then, move the code related to GSP boot to the gsp::boot module, as part of the Gsp implementation.
Doing so allows us to make Gpu::new return a fallible impl PinInit instead of a Result. This is more idiomatic when working with pinned objects, and sets up the pinned initialization pattern we want to preserve as the code grows more complex.
--- drivers/gpu/nova-core/driver.rs | 9 ++- drivers/gpu/nova-core/gpu.rs | 159 ++++++++++--------------------------- drivers/gpu/nova-core/gsp.rs | 17 ++++ drivers/gpu/nova-core/gsp/boot.rs | 118 +++++++++++++++++++++++++++ drivers/gpu/nova-core/nova_core.rs | 1 + 5 files changed, 184 insertions(+), 120 deletions(-)
drivers/gpu/nova-core/driver.rs +7 -2
@@ -34,14 +34,19 @@ fn probe(pdev: &pci::Device<Core>, _info: &Self::IdInfo) -> Result<Pin<KBox<Self pdev.enable_device_mem ()?; pdev.set_master (); -let bar =Arc ::pin_init ( +let devres_bar =Arc ::pin_init ( pdev.iomap_region_sized ::<BAR0_SIZE >(0 ,c_str! ("nova-core/bar0" )),GFP_KERNEL , )?; +// Used to provided a `&Bar0` to `Gpu::new` without tying it to the lifetime of +// `devres_bar`. +let bar_clone =Arc ::clone (&devres_bar); +let bar = bar_clone.access (pdev.as_ref ())?; + let this = KBox::pin_init( try_pin_init!(Self { - gpu <- Gpu::new(pdev, bar)?, + gpu <- Gpu::new(pdev, devres_bar, bar), _reg: auxiliary::Registration::new( pdev.as_ref(), c_str!("nova-drm"),
drivers/gpu/nova-core/gpu.rs +41 -118
189 lines not on this page · raw message
drivers/gpu/nova-core/gsp.rs new file +17 -0
@@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0 + +mod boot; + +use kernel::prelude::*; + +/// GSP runtime data. +/// +/// This is an empty pinned placeholder for now. +#[pin_data] +pub (crate )struct Gsp {} + +impl Gsp { +pub (crate )fn new () ->impl PinInit <Self > { +pin_init! (Self {}) + } +}
drivers/gpu/nova-core/gsp/boot.rs new file +118 -0
118 lines not on this page · raw message
drivers/gpu/nova-core/nova_core.rs +1 -0
@@ -9,6 +9,7 @@mod firmware;mod gfw;mod gpu; +mod gsp;mod regs;mod util;mod vbios;
Signature · 1 line
2.51.0
Alexandre Courbot
maintainerPATCH v6 3/11 gpu: nova-core: add Chipset::name() method
In reply to Alexandre CourbotThere are a few cases where we need the lowercase name of a given chipset, notably to resolve firmware files paths for dynamic loading or to build the module information.
So far, we relied on a static NAMES array for the latter, and some CString hackery for the former.
Replace both with a new name const method that returns the lowercase name of a chipset instance. We can generate it using the paste! macro.
Using this method removes the need to create a CString when loading firmware, and lets us remove a couple of utility functions that now have no user.
--- drivers/gpu/nova-core/firmware.rs | 8 +++----- drivers/gpu/nova-core/gpu.rs | 25 +++++++++++++++++-------- drivers/gpu/nova-core/util.rs | 20 -------------------- 3 files changed, 20 insertions(+), 33 deletions(-)
drivers/gpu/nova-core/firmware.rs +3 -5
@@ -30,9 +30,7 @@ pub(crate) struct Firmware {impl Firmware {pub (crate )fn new (dev: &device::Device , chipset:Chipset , ver: &str ) ->Result <Firmware > { -let mut chip_name =CString ::try_from_fmt (fmt! ("{chipset}" ))?; - chip_name.make_ascii_lowercase (); -let chip_name = &*chip_name; +let chip_name = chipset.name ();let request = |name_| {CString ::try_from_fmt (fmt! ("nvidia/{chip_name}/gsp/{name_}-{ver}.bin" ))
@@ -180,8 +178,8 @@ pub(crate) const fn create(let mut this =Self (firmware::ModInfoBuilder ::new (module_name));let mut i =0 ; -while i < gpu::Chipset ::NAMES .len () { - this = this.make_entry_chipset (gpu::Chipset ::NAMES [i]); +while i < gpu::Chipset ::ALL .len () { + this = this.make_entry_chipset (gpu::Chipset ::ALL [i].name ()); i +=1 ; }
drivers/gpu/nova-core/gpu.rs +17 -8
@@ -9,7 +9,6 @@use crate ::gfw;use crate ::gsp::Gsp ;use crate ::regs; -use crate ::util;use core::fmt;macro_rules! define_chipset {
@@ -26,13 +25,23 @@ impl Chipset { $( Chipset::$variant, )* ]; -pub (crate )const NAMES : [&'staticstr ;Self ::ALL .len ()] = [ - $( util::const_bytes_to_str( - util::to_lowercase_bytes::<{ stringify!($variant).len() }>( - stringify!($variant) - ).as_slice() - ), )* - ]; + ::kernel::macros::paste!( +/// Returns the name of this chipset, in lowercase. +/// +/// # Examples +/// +/// ``` +/// let chipset = Chipset::GA102; +/// assert_eq!(chipset.name(), "ga102"); +/// ``` + pub(crate) const fn name(&self) -> &'static str { +match *self { + $( +Chipset ::$variant => stringify!([<$variant:lower>]), + )* + } + } + ); }// TODO[FPRI]: replace with something like derive(FromPrimitive)
drivers/gpu/nova-core/util.rs +0 -20
@@ -3,26 +3,6 @@use kernel::prelude::*;use kernel::time::{Delta ,Instant ,Monotonic }; -pub (crate )const fn to_lowercase_bytes <const N :usize >(s: &str ) -> [u8 ;N ] { -let src = s.as_bytes (); -let mut dst = [0 ;N ]; -let mut i =0 ; - -while i < src.len () && i <N { - dst[i] = (src[i]as char ).to_ascii_lowercase ()as u8 ; - i +=1 ; - } - - dst -} - -pub (crate )const fn const_bytes_to_str (bytes: &[u8 ]) -> &str { -match core::str::from_utf8 (bytes) { -Ok (string) => string, -Err (_) => kernel::build_error!("Bytes are not valid UTF-8." ), - } -} -/// Wait until `cond` is true or `timeout` elapsed. /// /// When `cond` evaluates to `Some`, its return value is returned.
Signature · 1 line
2.51.0
Alexandre Courbot
maintainerPATCH v6 4/11 gpu: nova-core: firmware: move firmware request code into a function
In reply to Alexandre CourbotWhen all the firmware files are loaded from Firmware::new, it makes sense to have the firmware request code as a closure. However, since we eventually want each individual firmware constructor to request its own file (and get rid of Firmware altogether), move this code into a dedicated function that can be called by individual firmware types.
--- drivers/gpu/nova-core/firmware.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-)
drivers/gpu/nova-core/firmware.rs +14 -6
@@ -19,6 +19,19 @@pub (crate )const FIRMWARE_VERSION : &str ="535.113.01" ; +/// Requests the GPU firmware `name` suitable for `chipset`, with version `ver`. +fn request_firmware ( + dev: &device::Device , + chipset: gpu::Chipset , + name: &str , + ver: &str , +) ->Result <firmware::Firmware > { +let chip_name = chipset.name (); + +CString ::try_from_fmt (fmt! ("nvidia/{chip_name}/gsp/{name}-{ver}.bin" )) + .and_then (|path| firmware::Firmware ::request (&path, dev)) +} +/// Structure encapsulating the firmware blobs required for the GPU to operate. #[expect(dead_code)] pub (crate )struct Firmware {
@@ -30,12 +43,7 @@ pub(crate) struct Firmware {impl Firmware {pub (crate )fn new (dev: &device::Device , chipset:Chipset , ver: &str ) ->Result <Firmware > { -let chip_name = chipset.name (); - -let request = |name_| { -CString ::try_from_fmt (fmt! ("nvidia/{chip_name}/gsp/{name_}-{ver}.bin" )) - .and_then (|path| firmware::Firmware ::request (&path, dev)) - }; +let request = |name|request_firmware (dev, chipset, name, ver);Ok (Firmware { booter_load:request ("booter_load" )?,
Signature · 1 line
2.51.0
Alexandre Courbot
maintainerPATCH v6 5/11 gpu: nova-core: firmware: add support for common firmware header
In reply to Alexandre CourbotSeveral firmware files loaded from userspace feature a common header that describes their payload. Add basic support for it so subsequent patches can leverage it.
--- drivers/gpu/nova-core/firmware.rs | 62 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+)
drivers/gpu/nova-core/firmware.rs +62 -0
@@ -4,11 +4,13 @@//! to be loaded into a given execution unit. use core::marker::PhantomData ; +use core::mem::size_of;use kernel::device;use kernel::firmware;use kernel::prelude::*;use kernel::str::CString ; +use kernel::transmute::FromBytes ;use crate ::dma::DmaObject ;use crate ::falcon::FalconFirmware ;
@@ -156,6 +158,66 @@ fn no_patch_signature(self) -> FirmwareDmaObject<F, Signed> { } } +/// Header common to most firmware files. +#[repr( C )] +#[derive( Debug , Clone )] +struct BinHdr { +/// Magic number, must be `0x10de`. + bin_magic:u32 , +/// Version of the header. + bin_ver:u32 , +/// Size in bytes of the binary (to be ignored). + bin_size:u32 , +/// Offset of the start of the application-specific header. + header_offset:u32 , +/// Offset of the start of the data payload. + data_offset:u32 , +/// Size in bytes of the data payload. + data_size:u32 , +} + +// SAFETY: all bit patterns are valid for this type, and it doesn't use interior mutability. +unsafe impl FromBytes for BinHdr {} + +// A firmware blob starting with a `BinHdr`. +struct BinFirmware <'a> { + hdr:BinHdr , + fw: &'a [u8 ], +} + +#[expect(dead_code)] +impl <'a>BinFirmware <'a> { +/// Interpret `fw` as a firmware image starting with a [`BinHdr`], and returns the +/// corresponding [`BinFirmware`] that can be used to extract its payload. +fn new (fw: &'a firmware::Firmware ) ->Result <Self > { +const BIN_MAGIC :u32 =0x10de ; +let fw = fw.data (); + + fw.get (0 ..size_of ::<BinHdr >()) +// Extract header. + .and_then (BinHdr ::from_bytes_copy) +// Validate header. + .and_then (|hdr| { +if hdr.bin_magic ==BIN_MAGIC { +Some (hdr) + }else { +None + } + }) + .map (|hdr|Self { hdr, fw }) + .ok_or (EINVAL ) + } + +/// Returns the data payload of the firmware, or `None` if the data range is out of bounds of +/// the firmware image. +fn data (&self) ->Option <&[u8 ]> { +let fw_start = self.hdr.data_offsetas usize ; +let fw_size = self.hdr.data_sizeas usize ; + + self.fw.get (fw_start..fw_start + fw_size) + } +} +pub (crate )struct ModInfoBuilder <const N :usize >(firmware::ModInfoBuilder <N >);impl <const N :usize >ModInfoBuilder <N > {
Signature · 1 line
2.51.0
Alexandre Courbot
maintainerPATCH v6 6/11 gpu: nova-core: firmware: process Booter and patch its signature
In reply to Alexandre CourbotThe Booter signed firmware is an essential part of bringing up the GSP on Turing and Ampere. It is loaded on the sec2 falcon core and is responsible for loading and running the RISC-V GSP bootloader into the GSP core.
Add support for parsing the Booter firmware loaded from userspace, patch its signatures, and store it into a form that is ready to be loaded and executed on the sec2 falcon.
Then, move the Booter instance from the Firmware struct to the start_gsp method since it doesn't need to be kept after the GSP is booted.
We do not run Booter yet, as its own payload (the GSP bootloader and firmware image) still need to be prepared.
--- drivers/gpu/nova-core/falcon.rs | 4 +- drivers/gpu/nova-core/firmware.rs | 6 +- drivers/gpu/nova-core/firmware/booter.rs | 375 +++++++++++++++++++++++++++++++ drivers/gpu/nova-core/gsp/boot.rs | 17 +- 4 files changed, 393 insertions(+), 9 deletions(-)
drivers/gpu/nova-core/falcon.rs +2 -2
@@ -293,7 +293,7 @@ pub(crate) trait FalconEngine: }/// Represents a portion of the firmware to be loaded into a particular memory (e.g. IMEM or DMEM). -#[derive( Debug )] +#[derive( Debug , Clone )] pub (crate )struct FalconLoadTarget {/// Offset from the start of the source object to copy from. pub (crate ) src_start:u32 ,
@@ -304,7 +304,7 @@ pub(crate) struct FalconLoadTarget { }/// Parameters for the falcon boot ROM. -#[derive( Debug )] +#[derive( Debug , Clone )] pub (crate )struct FalconBromParams {/// Offset in `DMEM`` of the firmware's signature. pub (crate ) pkc_data_offset:u32 ,
drivers/gpu/nova-core/firmware.rs +1 -5
@@ -17,6 +17,7 @@use crate ::gpu;use crate ::gpu::Chipset ; +pub (crate )mod booter;pub (crate )mod fwsec;pub (crate )const FIRMWARE_VERSION : &str ="535.113.01" ;
@@ -37,8 +38,6 @@ fn request_firmware(/// Structure encapsulating the firmware blobs required for the GPU to operate. #[expect(dead_code)] pub (crate )struct Firmware { - booter_load: firmware::Firmware , - booter_unload: firmware::Firmware , bootloader: firmware::Firmware , gsp: firmware::Firmware , }
@@ -48,8 +47,6 @@ pub(crate) fn new(dev: &device::Device, chipset: Chipset, ver: &str) -> Result<Flet request = |name|request_firmware (dev, chipset, name, ver);Ok (Firmware { - booter_load:request ("booter_load" )?, - booter_unload:request ("booter_unload" )?, bootloader:request ("bootloader" )?, gsp:request ("gsp" )?, })
@@ -185,7 +182,6 @@ struct BinFirmware<'a> { fw: &'a [u8], } -#[expect(dead_code)] impl <'a>BinFirmware <'a> {/// Interpret `fw` as a firmware image starting with a [`BinHdr`], and returns the /// corresponding [`BinFirmware`] that can be used to extract its payload.
drivers/gpu/nova-core/firmware/booter.rs new file +375 -0
375 lines not on this page · raw message
drivers/gpu/nova-core/gsp/boot.rs +15 -2
@@ -7,7 +7,11 @@use crate ::driver::Bar0 ;use crate ::falcon::{gsp::Gsp , sec2::Sec2 ,Falcon };use crate ::fb::FbLayout ; -use crate ::firmware::fwsec::{FwsecCommand ,FwsecFirmware }; +use crate ::firmware::{ + booter::{BooterFirmware ,BooterKind }, + fwsec::{FwsecCommand ,FwsecFirmware }, +FIRMWARE_VERSION , +};use crate ::gpu::Chipset ;use crate ::regs;use crate ::vbios::Vbios ;
@@ -102,7 +106,7 @@ pub(crate) fn boot( bar: &Bar0, chipset: Chipset, gsp_falcon: &Falcon<Gsp>, - _sec2_falcon: &Falcon<Sec2>, + sec2_falcon: &Falcon<Sec2>, ) -> Result { let dev = pdev.as_ref();
@@ -113,6 +117,15 @@ pub(crate) fn boot(Self ::run_fwsec_frts (dev, gsp_falcon, bar, &bios, &fb_layout)?; +let _booter_loader =BooterFirmware ::new ( + dev, +BooterKind ::Loader , + chipset, +FIRMWARE_VERSION , + sec2_falcon, + bar, + )?; +Ok (()) } }
Signature · 1 line
2.51.0
Alexandre Courbot
maintainerPATCH v6 7/11 gpu: nova-core: firmware: process and prepare the GSP firmware
In reply to Alexandre CourbotThe GSP firmware is a binary blob that is verified, loaded, and run by the GSP bootloader. Its presentation is a bit peculiar as the GSP bootloader expects to be given a DMA address to a 3-levels page table mapping the GSP firmware at address 0 of its own address space.
Prepare such a structure containing the DMA-mapped firmware as well as the DMA-mapped page tables, and a way to obtain the DMA handle of the level 0 page table.
Then, move the GSP firmware instance from the Firmware struct to the start_gsp method since it doesn't need to be kept after the GSP is booted.
As we are performing the required ELF section parsing and radix3 page table building, remove these items from the TODO file.
--- Documentation/gpu/nova/core/todo.rst | 17 --- drivers/gpu/nova-core/firmware.rs | 3 +- drivers/gpu/nova-core/firmware/gsp.rs | 236 ++++++++++++++++++++++++++++++++++ drivers/gpu/nova-core/gsp.rs | 3 + drivers/gpu/nova-core/gsp/boot.rs | 6 + 5 files changed, 246 insertions(+), 19 deletions(-)
Documentation/gpu/nova/core/todo.rst +0 -17
@@ -229,23 +229,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 -----------------------
drivers/gpu/nova-core/firmware.rs +1 -2
@@ -19,6 +19,7 @@pub (crate )mod booter;pub (crate )mod fwsec; +pub (crate )mod gsp;pub (crate )const FIRMWARE_VERSION : &str ="535.113.01" ;
@@ -39,7 +40,6 @@ fn request_firmware(#[expect(dead_code)] pub (crate )struct Firmware { bootloader: firmware::Firmware , - gsp: firmware::Firmware , }impl Firmware {
@@ -48,7 +48,6 @@ pub(crate) fn new(dev: &device::Device, chipset: Chipset, ver: &str) -> Result<FOk (Firmware { bootloader:request ("bootloader" )?, - gsp:request ("gsp" )?, }) } }
drivers/gpu/nova-core/firmware/gsp.rs new file +236 -0
236 lines not on this page · raw message
drivers/gpu/nova-core/gsp.rs +3 -0
@@ -4,6 +4,9 @@use kernel::prelude::*; +pub (crate )const GSP_PAGE_SHIFT :usize =12 ; +pub (crate )const GSP_PAGE_SIZE :usize =1 <<GSP_PAGE_SHIFT ; +/// GSP runtime data. /// /// This is an empty pinned placeholder for now.
drivers/gpu/nova-core/gsp/boot.rs +6 -0
@@ -10,6 +10,7 @@use crate ::firmware::{ booter::{BooterFirmware ,BooterKind }, fwsec::{FwsecCommand ,FwsecFirmware }, + gsp::GspFirmware ,FIRMWARE_VERSION , };use crate ::gpu::Chipset ;
@@ -112,6 +113,11 @@ pub(crate) fn boot(let bios =Vbios ::new (dev, bar)?; +let _gsp_fw =KBox ::pin_init ( +GspFirmware ::new (dev, chipset,FIRMWARE_VERSION )?, +GFP_KERNEL , + )?; +let fb_layout =FbLayout ::new (chipset, bar)?;dev_dbg! (dev,"{:#x?}\n" , fb_layout);
Signature · 1 line
2.51.0
Alexandre Courbot
maintainerPATCH v6 8/11 gpu: nova-core: firmware: process the GSP bootloader
In reply to Alexandre CourbotThe GSP bootloader is a small RISC-V firmware that is loaded by Booter onto the GSP core and is in charge of loading, validating, and starting the actual GSP firmware.
It is a regular binary firmware file containing a specific header. Create a type holding the DMA-mapped firmware as well as useful information extracted from the header, and hook it into our firmware structure for later use.
The GSP bootloader is stored into the GspFirmware structure, since it is part of the GSP firmware package. This makes the Firmware structure empty, so remove it.
--- drivers/gpu/nova-core/firmware.rs | 18 +------ drivers/gpu/nova-core/firmware/gsp.rs | 7 +++ drivers/gpu/nova-core/firmware/riscv.rs | 91 +++++++++++++++++++++++++++++++++ drivers/gpu/nova-core/gpu.rs | 4 -- 4 files changed, 99 insertions(+), 21 deletions(-)
drivers/gpu/nova-core/firmware.rs +1 -17
@@ -15,11 +15,11 @@use crate ::dma::DmaObject ;use crate ::falcon::FalconFirmware ;use crate ::gpu; -use crate ::gpu::Chipset ;pub (crate )mod booter;pub (crate )mod fwsec;pub (crate )mod gsp; +pub (crate )mod riscv;pub (crate )const FIRMWARE_VERSION : &str ="535.113.01" ;
@@ -36,22 +36,6 @@ fn request_firmware( .and_then(|path| firmware::Firmware::request(&path, dev)) } -/// Structure encapsulating the firmware blobs required for the GPU to operate. -#[expect(dead_code)] -pub (crate )struct Firmware { - bootloader: firmware::Firmware , -} - -impl Firmware { -pub (crate )fn new (dev: &device::Device , chipset:Chipset , ver: &str ) ->Result <Firmware > { -let request = |name|request_firmware (dev, chipset, name, ver); - -Ok (Firmware { - bootloader:request ("bootloader" )?, - }) - } -} -/// Structure used to describe some firmwares, notably FWSEC-FRTS. #[repr( C )] #[derive( Debug , Clone )]
drivers/gpu/nova-core/firmware/gsp.rs +7 -0
@@ -9,6 +9,7 @@use kernel::scatterlist::{Owned ,SGTable };use crate ::dma::DmaObject ; +use crate ::firmware::riscv::RiscvFirmware ;use crate ::gpu::{Architecture ,Chipset };use crate ::gsp::GSP_PAGE_SIZE ;
@@ -131,6 +132,8 @@ pub(crate) struct GspFirmware { size: usize,/// Device-mapped GSP signatures matching the GPU's [`Chipset`]. signatures: DmaObject, +/// GSP bootloader, verifies the GSP firmware before loading and running it. + bootloader: RiscvFirmware, }impl GspFirmware {
@@ -164,6 +167,9 @@ pub(crate) fn new<'a, 'b>( }) .map_err (|_|ENOMEM )?; +let bl =super ::request_firmware (dev, chipset,"bootloader" , ver)?; +let bootloader =RiscvFirmware ::new (dev, &bl)?; + Ok(try_pin_init!(Self { fw <- SGTable::new(dev, fw_vvec, DataDirection::ToDevice, GFP_KERNEL), level2 <- {
@@ -206,6 +212,7 @@ pub(crate) fn new<'a, 'b>( }, size, signatures, + bootloader, })) }
drivers/gpu/nova-core/firmware/riscv.rs new file +91 -0
91 lines not on this page · raw message
drivers/gpu/nova-core/gpu.rs +0 -4
@@ -5,7 +5,6 @@use crate ::driver::Bar0 ;use crate ::falcon::{gsp::Gsp as GspFalcon , sec2::Sec2 as Sec2Falcon ,Falcon };use crate ::fb::SysmemFlush ; -use crate ::firmware::{Firmware ,FIRMWARE_VERSION };use crate ::gfw;use crate ::gsp::Gsp ;use crate ::regs;
@@ -175,7 +174,6 @@ pub(crate) struct Gpu { spec: Spec,/// MMIO mapping of PCI BAR 0 bar: Arc<Devres<Bar0>>, - fw: Firmware,/// System memory page required for flushing all pending GPU-side memory writes done through /// PCIE into system memory, via sysmembar (A GPU-initiated HW memory-barrier operation). sysmem_flush: SysmemFlush,
@@ -211,8 +209,6 @@ pub(crate) fn new<'a>( .inspect_err(|_| dev_err!(pdev.as_ref(), "GFW boot did not complete"))?; }, - fw <- Firmware::new(pdev.as_ref(), spec.chipset, FIRMWARE_VERSION)?, - sysmem_flush: SysmemFlush::register(pdev.as_ref(), bar, spec.chipset)?, gsp_falcon: Falcon::new(
Signature · 1 line
2.51.0
Alexandre Courbot
maintainerPATCH v6 9/11 gpu: nova-core: firmware: use 570.144 firmware
In reply to Alexandre Courbot570.144 is the latest available into linux-firmware as of this commit, and the one we will use to start development of nova-core. It should eventually be dropped for a newer version before the driver becomes able to do anything useful. The newer firmware is expected to iron out some of the inelegances of 570.144, notably related to packaging.
--- drivers/gpu/nova-core/firmware.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/nova-core/firmware.rs +1 -1
@@ -21,7 +21,7 @@pub (crate )mod gsp;pub (crate )mod riscv; -pub (crate )const FIRMWARE_VERSION : &str ="535.113.01" ; +pub (crate )const FIRMWARE_VERSION : &str ="570.144" ;/// Requests the GPU firmware `name` suitable for `chipset`, with version `ver`. fn request_firmware(
Signature · 1 line
2.51.0
Alexandre Courbot
maintainerPATCH v6 10/11 gpu: nova-core: Add base files for r570.144 firmware bindings
In reply to Alexandre CourbotFrom: Alistair Popple <[email protected]>
Interacting with the GSP currently requires using definitions from C header files. Rust definitions for the types needed for Nova core will be generated using the Rust bindgen tool. This patch adds the base module to allow inclusion of the generated bindings. The generated bindings themselves are added by subsequent patches when they are first used.
Currently we only intend to support a single firmware version, 570.144, with these bindings. Longer term we intend to move to a more stable GSP interface that isn't tied to specific firmware versions.
--- drivers/gpu/nova-core/gsp.rs | 2 ++ drivers/gpu/nova-core/gsp/fw.rs | 7 ++++++ drivers/gpu/nova-core/gsp/fw/r570_144.rs | 29 +++++++++++++++++++++++ drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs | 1 + 4 files changed, 39 insertions(+)
drivers/gpu/nova-core/gsp.rs +2 -0
@@ -4,6 +4,8 @@use kernel::prelude::*; +mod fw; +pub (crate )const GSP_PAGE_SHIFT :usize =12 ;pub (crate )const GSP_PAGE_SIZE :usize =1 <<GSP_PAGE_SHIFT ;
drivers/gpu/nova-core/gsp/fw.rs new file +7 -0
@@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 + +mod r570_144; + +// Alias to avoid repeating the version number with every use. +#[expect(unused)] +use r570_144as bindings;
drivers/gpu/nova-core/gsp/fw/r570_144.rs new file +29 -0
@@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0 + +//! Firmware bindings. +//! +//! Imports the generated bindings by `bindgen`. +//! +//! This module may not be directly used. Please abstract or re-export the needed symbols in the +//! parent module instead. + +#![cfg_attr(test, allow(deref_nullptr))] +#![cfg_attr(test, allow(unaligned_references))] +#![cfg_attr(test, allow(unsafe_op_in_unsafe_fn))] +#![allow( +dead_code, +unused_imports, +clippy::all, +clippy::undocumented_unsafe_blocks, +clippy::ptr_as_ptr, +clippy::ref_as_ptr, +missing_docs, +non_camel_case_types, +non_upper_case_globals, +non_snake_case, +improper_ctypes, +unreachable_pub, +unsafe_op_in_unsafe_fn +)] +use kernel::ffi; +include! ("r570_144/bindings.rs" );
drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs new file +1 -0
@@ -0,0 +1 @@ +// SPDX-License-Identifier: GPL-2.0
Signature · 1 line
2.51.0
Danilo Krummrich
maintainerRe: [PATCH v6 10/11] gpu: nova-core: Add base files for r570.144 firmware bindings
Two comments on this, just for the record.
Quoted 8 lines · Alexandre Courbot
From: Alistair Popple <[email protected]>
Interacting with the GSP currently requires using definitions from C header files. Rust definitions for the types needed for Nova core will be generated using the Rust bindgen tool. This patch adds the base module to allow inclusion of the generated bindings. The generated bindings themselves are added by subsequent patches when they are first used.
For now this is perfectly fine, but in the long term we should avoid creating bindings from C headers. Instead, I'd like to see the tooling that generates the C headers to generate the Rust data structures (in a more Rust idiomatic way) right away.
Quoted 3 lines
Currently we only intend to support a single firmware version, 570.144, with these bindings. Longer term we intend to move to a more stable GSP interface that isn't tied to specific firmware versions.
Yet, we have to prepare for proper abstraction of the firmware API:
(1) This is a community project. And as a community project it has to be written in a way that is guaranteed to remain maintainable for the community in any case.
This means that the project can not rely on the hardware vendor to provide a stable firmware API; rather it has to written in a way that can deal with changing conditions.
In fact, this is one of the issues why we don't see a way forward with nouveau, so we can't lock ourselves in here. :)
(2) While I think attempting to be as stable as possible with the firmware API is the correct approach, I also think it is better to reserve yourself some flexibility on changing it.
I much rather prefer a firmware API that is evolving when really necessary, than squeezing new features into an existing API (e.g. by adding confusing extentions) that just isn't a good fit anymore at some point.
Quoted 5 lines
Signed-off-by Alistair Popple <[email protected]>Reviewed-by John Hubbard <[email protected]>[[email protected]: adapt the bindings module comment a bit]Acked-by Danilo Krummrich <[email protected]>Signed-off-by Alexandre Courbot <[email protected]>
Alexandre Courbot
maintainerPATCH v6 11/11 gpu: nova-core: compute layout of more framebuffer regions required for GSP
In reply to Alexandre CourbotCompute more of the required FB layout information to boot the GSP firmware.
This information is dependent on the firmware itself, so first we need to import and abstract the required firmware bindings in the nvfw module.
Then, a new FB HAL method is introduced in fb::hal that uses these bindings and hardware information to compute the correct layout information.
This information is then used in fb and the result made visible in FbLayout.
These 3 things are grouped into the same patch to avoid lots of unused warnings that would be tedious to work around. As they happen in different files, they should not be too difficult to track separately.
--- drivers/gpu/nova-core/fb.rs | 65 ++++++++++- drivers/gpu/nova-core/firmware/gsp.rs | 4 +- drivers/gpu/nova-core/firmware/riscv.rs | 2 +- drivers/gpu/nova-core/gsp.rs | 5 + drivers/gpu/nova-core/gsp/boot.rs | 4 +- drivers/gpu/nova-core/gsp/fw.rs | 96 ++++++++++++++++- drivers/gpu/nova-core/gsp/fw/r570_144.rs | 1 - drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs | 125 ++++++++++++++++++++++ 8 files changed, 293 insertions(+), 9 deletions(-)
drivers/gpu/nova-core/fb.rs +63 -2
@@ -10,7 +10,9 @@use crate ::dma::DmaObject ;use crate ::driver::Bar0 ; +use crate ::firmware::gsp::GspFirmware ;use crate ::gpu::Chipset ; +use crate ::gsp;use crate ::regs;mod hal;
@@ -87,14 +89,28 @@ pub(crate) fn unregister(&self, bar: &Bar0) {#[derive( Debug )] #[expect(dead_code)] pub (crate )struct FbLayout { +/// Range of the framebuffer. Starts at `0`. pub (crate ) fb:Range <u64 >, +/// VGA workspace, small area of reserved memory at the end of the framebuffer. pub (crate ) vga_workspace:Range <u64 >, +/// FRTS range. pub (crate ) frts:Range <u64 >, +/// Memory area containing the GSP bootloader image. +pub (crate ) boot:Range <u64 >, +/// Memory area containing the GSP firmware image. +pub (crate ) elf:Range <u64 >, +/// WPR2 heap. +pub (crate ) wpr2_heap:Range <u64 >, +// WPR2 region range, starting with an instance of `GspFwWprMeta`. +pub (crate ) wpr2:Range <u64 >, +pub (crate ) heap:Range <u64 >, +pub (crate ) vf_partition_count:u8 , }impl FbLayout { -/// Computes the FB layout. -pub (crate )fn new (chipset:Chipset , bar: &Bar0 ) ->Result <Self > { +/// Computes the FB layout for `chipset`, for running the `bl` GSP bootloader and `gsp` GSP +/// firmware. +pub (crate )fn new (chipset:Chipset , bar: &Bar0 , gsp_fw: &GspFirmware ) ->Result <Self > {let hal = hal::fb_hal (chipset);let fb = {
@@ -138,10 +154,55 @@ pub(crate) fn new(chipset: Chipset, bar: &Bar0) -> Result<Self> { frts_base..frts_base +FRTS_SIZE }; +let boot = { +const BOOTLOADER_DOWN_ALIGN :Alignment =Alignment ::new ::<SZ_4K >(); +let bootloader_size = gsp_fw.bootloader.ucode.size ()as u64 ; +let bootloader_base = (frts.start - bootloader_size).align_down (BOOTLOADER_DOWN_ALIGN ); + + bootloader_base..bootloader_base + bootloader_size + }; + +let elf = { +const ELF_DOWN_ALIGN :Alignment =Alignment ::new ::<SZ_64K >(); +let elf_size = gsp_fw.sizeas u64 ; +let elf_addr = (boot.start - elf_size).align_down (ELF_DOWN_ALIGN ); + + elf_addr..elf_addr + elf_size + }; + +let wpr2_heap = { +const WPR2_HEAP_DOWN_ALIGN :Alignment =Alignment ::new ::<SZ_1M >(); +let wpr2_heap_size = +crate ::gsp::LibosParams ::from_chipset (chipset).wpr_heap_size (chipset, fb.end); +let wpr2_heap_addr = (elf.start - wpr2_heap_size).align_down (WPR2_HEAP_DOWN_ALIGN ); + + wpr2_heap_addr..(elf.start).align_down (WPR2_HEAP_DOWN_ALIGN ) + }; + +let wpr2 = { +const WPR2_DOWN_ALIGN :Alignment =Alignment ::new ::<SZ_1M >(); +let wpr2_addr = (wpr2_heap.start -size_of ::<gsp::GspFwWprMeta >()as u64 ) + .align_down (WPR2_DOWN_ALIGN ); + + wpr2_addr..frts.end + }; + +let heap = { +const HEAP_SIZE :u64 =SZ_1M as u64 ; + + wpr2.start -HEAP_SIZE ..wpr2.start + }; +Ok (Self { fb, vga_workspace, frts, + boot, + elf, + wpr2_heap, + wpr2, + heap, + vf_partition_count:0 , }) } }
drivers/gpu/nova-core/firmware/gsp.rs +2 -2
@@ -129,11 +129,11 @@ pub(crate) struct GspFirmware {/// Level 0 page table (single 4KB page) with one entry: DMA address of first level 1 page. level0: DmaObject,/// Size in bytes of the firmware contained in [`Self::fw`]. - size: usize, + pub size: usize,/// Device-mapped GSP signatures matching the GPU's [`Chipset`]. signatures: DmaObject,/// GSP bootloader, verifies the GSP firmware before loading and running it. - bootloader: RiscvFirmware, + pub bootloader: RiscvFirmware, }impl GspFirmware {
drivers/gpu/nova-core/firmware/riscv.rs +1 -1
@@ -63,7 +63,7 @@ pub(crate) struct RiscvFirmware {/// Application version. app_version: u32,/// Device-mapped firmware image. - ucode: DmaObject, + pub ucode: DmaObject, }impl RiscvFirmware {
drivers/gpu/nova-core/gsp.rs +5 -0
@@ -6,8 +6,13 @@mod fw; +pub (crate )use fw::{GspFwWprMeta ,LibosParams }; + +use kernel::ptr::Alignment ; +pub (crate )const GSP_PAGE_SHIFT :usize =12 ;pub (crate )const GSP_PAGE_SIZE :usize =1 <<GSP_PAGE_SHIFT ; +pub (crate )const GSP_HEAP_ALIGNMENT :Alignment =Alignment ::new ::<{1 <<20 }>();/// GSP runtime data. ///
drivers/gpu/nova-core/gsp/boot.rs +2 -2
@@ -113,12 +113,12 @@ pub(crate) fn boot(let bios =Vbios ::new (dev, bar)?; -let _gsp_fw =KBox ::pin_init ( +let gsp_fw =KBox ::pin_init (GspFirmware ::new (dev, chipset,FIRMWARE_VERSION )?,GFP_KERNEL , )?; -let fb_layout =FbLayout ::new (chipset, bar)?; +let fb_layout =FbLayout ::new (chipset, bar, &gsp_fw)?;dev_dbg! (dev,"{:#x?}\n" , fb_layout);Self ::run_fwsec_frts (dev, gsp_falcon, bar, &bios, &fb_layout)?;
drivers/gpu/nova-core/gsp/fw.rs +95 -1
100 lines not on this page · raw message
drivers/gpu/nova-core/gsp/fw/r570_144.rs +0 -1
@@ -12,7 +12,6 @@#![cfg_attr(test, allow(unsafe_op_in_unsafe_fn))] #![allow( dead_code, - unused_imports, clippy::all, clippy::undocumented_unsafe_blocks, clippy::ptr_as_ptr,
drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs +125 -0
126 lines not on this page · raw message
Signature · 1 line
2.51.0
Alexandre Courbot
maintainerQuoted 59 lines · Alexandre Courbot
Sending a final revision to have the
Link:tags that dim requires, and for the record.This series makes more progress on the GSP boot process for Ampere GPUs.
At the end of the previous series [1], we were left with a WPR memory region created by the FRTS firmware, but still far from the GSP running. This series brings us closer to that goal by preparing 2 new firmware packages:
* The Booter firmware, which the driver loads and runs on the SEC2 falcon;
* The GSP bootloader and firmware, with the bootloader loaded by Booter onto the GSP RISC-V core to verify and load the actual GSP firmware.There firmwares are involved in a rather complex dance that is made necessary by limitations related to the level of privilege required to load code onto the GSP (doing so requires a Heavy Secured signed firmware, which is the role fulfilled by Booter).
The first 5 patches perform some cleanup and preparatory work for the remainder of the series. Notably, the GSP boot is moved to a new method of
Gputo get ready for the additional steps that will be added to it, and theGpuobject is now fully built in-place. We also simplify chipset name generation a bit and move the code requesting a firmware file into a dedicated function in prevision of the removal of theFirmwarestructure.Patch 6 parses the Booter firmware file, queries the hardware for the right signature to use, and patch it into the firmware blob. This makes Booter ready to load and run.
Patches 7 and 8 prepare the GSP firmware and its bootloader, and keep them into a single structure as they are closely related.
Patches 9 and 10 switch to the 570.144 firmware and introduce the layout for its bindings. The raw bindings are stored in a private module, and abstracted by the parent module as needed. This allows consumer modules to access a safer/nicer form of the bindings than the raw one, and also makes it easier to switch to a different (and potentially incompatible) firmware version in the future.
570.144 has been picked because it is the latest firmware currently in linux-firmware, but as development progresses the plan is to switch to a newer one that is designed with the constraint of upstream in mind. So support for 570.144 will be dropped in the future. Support for multiple firmware versions is not considered at the moment: there is no immediate need for it as the driver is still unstable, and we can think about this point once we approach stability (and have better visibility about the shape of the firmware at that point).
The last patch introduces the first bindings and uses them to compute more framebuffer layout information needed for booting the GSP. A separate patch series will pick up from there to use this information and finally run these firmware blobs.
The base of this series is today's drm-rust-next, with the Alignment [2] series required for the last patch.
Quoted 8 lines
A tree with all these dependencies and the patches of this series is available at [3].
[1] https://lore.kernel.org/rust-for-linux/[email protected]/
[2] https://lore.kernel.org/rust-for-linux/[email protected]/
[3] https://github.com/Gnurou/linux/tree/b4/nova_firmwareSigned-off-by Alexandre Courbot <[email protected]>
Patches 1 to 10 merged to drm-rust-next, as agreed with Danilo.