[PATCH v4 05/11] gpu: nova-core: firmware: add support for common firmware header

2025-09-19 Thread Alexandre Courbot
Several firmware files loaded from userspace feature a common header that describes their payload. Add basic support for it so subsequent patches can leverage it. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 62 +++ 1 file changed

[PATCH v5 06/12] gpu: nova-core: firmware: add support for common firmware header

2025-09-19 Thread Alexandre Courbot
Several firmware files loaded from userspace feature a common header that describes their payload. Add basic support for it so subsequent patches can leverage it. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 62 +++ 1 file changed

[PATCH v4 08/11] gpu: nova-core: firmware: process the GSP bootloader

2025-09-18 Thread Alexandre Courbot
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. Signed-off-by: Alexandre Courbot

[PATCH v4 00/11] gpu: nova-core: process and prepare more firmwares to boot GSP

2025-09-18 Thread Alexandre Courbot
e Turing falcon bootloader, - Link to v1: https://lore.kernel.org/r/20250822-nova_firmware-v1-0-ff5633679...@nvidia.com --- Alexandre Courbot (10): gpu: nova-core: require `Send` on `FalconEngine` and `FalconHal` gpu: nova-core: move GSP boot code to a dedicated method gpu:

Re: [PATCH v5 02/12] gpu: nova-core: move GSP boot code to a dedicated method

2025-09-17 Thread Alexandre Courbot
On Thu Sep 11, 2025 at 9:46 PM JST, Danilo Krummrich wrote: > On 9/11/25 2:17 PM, Alexandre Courbot wrote: >> On Thu Sep 11, 2025 at 8:22 PM JST, Danilo Krummrich wrote: >>> On 9/11/25 1:04 PM, Alexandre Courbot wrote: >>>> +/// Attempt to start the GSP. >>

Re: Implicit panics (was: [PATCH v2 2/8] gpu: nova-core: firmware: add support for common firmware header)

2025-09-17 Thread Alexandre Courbot
On Wed Sep 10, 2025 at 7:00 PM JST, Miguel Ojeda wrote: > On Wed, Sep 10, 2025 at 7:45 AM Alexandre Courbot wrote: >> >> That would be nice, but also wouldn't cover all the cases where implicit >> panics can happen, like out-of-bounds slice accesses - we can't have

[PATCH v6 02/11] gpu: nova-core: move GSP boot code to its own module

2025-09-17 Thread Alexandre Courbot
::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. Acked-by: Danilo Krummrich Signed-off-by: Alexandre Courbot --- drivers/gpu/nova

Re: [PATCH v2 1/4] nova-core: bitstruct: Move bitfield-specific code from register! into new macro

2025-09-17 Thread Alexandre Courbot
On Wed Sep 10, 2025 at 3:55 AM JST, Joel Fernandes wrote: > On Tue, Sep 09, 2025 at 11:37:15AM +0900, Alexandre Courbot wrote: >> On Tue Sep 9, 2025 at 2:16 AM JST, Joel Fernandes wrote: >> > Hi Alex, >> > >> > On 9/7/2025 11:12 PM, Alexandre Courbot wrote: >

[PATCH v5 08/12] gpu: nova-core: firmware: process and prepare the GSP firmware

2025-09-17 Thread Alexandre Courbot
e are performing the required ELF section parsing and radix3 page table building, remove these items from the TODO file. Signed-off-by: Alexandre Courbot --- Documentation/gpu/nova/core/todo.rst | 17 --- drivers/gpu/nova-core/firmware.rs | 3 +- drivers/gpu/nova-core/firmware/gsp.rs

[PATCH v5 09/12] gpu: nova-core: firmware: process the GSP bootloader

2025-09-15 Thread Alexandre Courbot
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. Signed-off-by: Alexandre Courbot

Re: [PATCH v5 02/12] gpu: nova-core: move GSP boot code to a dedicated method

2025-09-14 Thread Alexandre Courbot
On Sun Sep 14, 2025 at 11:42 PM JST, Benno Lossin wrote: > On Sun Sep 14, 2025 at 3:49 AM CEST, Alexandre Courbot wrote: >> On Sun Sep 14, 2025 at 7:06 AM JST, Joel Fernandes wrote: >>> On Sat, Sep 13, 2025 at 02:29:54PM -0700, John Hubbard wrote: >>>> Yes. It's

Re: [PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor

2025-09-13 Thread Alexandre Courbot
On Wed Sep 10, 2025 at 5:01 PM JST, Danilo Krummrich wrote: > On Wed Sep 10, 2025 at 6:48 AM CEST, Alexandre Courbot wrote: >> On Tue Sep 9, 2025 at 11:43 PM JST, Danilo Krummrich wrote: >>> impl Gpu { >>> pub(crate) fn new<'a>( >>>

Re: [PATCH v5 02/12] gpu: nova-core: move GSP boot code to a dedicated method

2025-09-13 Thread Alexandre Courbot
On Sun Sep 14, 2025 at 7:06 AM JST, Joel Fernandes wrote: > On Sat, Sep 13, 2025 at 02:29:54PM -0700, John Hubbard wrote: > [..] > >> > >> > I would suggest taking a look at our website and the links there (like >> > issue #2) -- what we are doing upstream Rust is documented. >> >> ...and my ques

[PATCH v6 05/11] gpu: nova-core: firmware: add support for common firmware header

2025-09-13 Thread Alexandre Courbot
Several firmware files loaded from userspace feature a common header that describes their payload. Add basic support for it so subsequent patches can leverage it. Acked-by: Danilo Krummrich Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 62

Re: [PATCH v6 00/11] gpu: nova-core: process and prepare more firmwares to boot GSP

2025-09-13 Thread Alexandre Courbot
On Sat Sep 13, 2025 at 11:12 PM JST, Alexandre Courbot wrote: > 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 we

[PATCH v6 03/11] gpu: nova-core: add Chipset::name() method

2025-09-13 Thread Alexandre Courbot
Signed-off-by: Alexandre Courbot --- 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(-) diff --git a/drivers/gpu/nova

[PATCH v6 01/11] gpu: nova-core: require `Send` on `FalconEngine` and `FalconHal`

2025-09-13 Thread Alexandre Courbot
`, and these traits also already required `Sync`, so this a minor tweak. Acked-by: Danilo Krummrich Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/falcon.rs | 2 +- drivers/gpu/nova-core/falcon/hal.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH v6 11/11] gpu: nova-core: compute layout of more framebuffer regions required for GSP

2025-09-13 Thread Alexandre Courbot
different files, they should not be too difficult to track separately. Acked-by: Danilo Krummrich Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/fb.rs | 65 ++- drivers/gpu/nova-core/firmware/gsp.rs | 4 +- drivers/gpu/nova-core/firmware/riscv.rs

[PATCH v6 06/11] gpu: nova-core: firmware: process Booter and patch its signature

2025-09-13 Thread Alexandre Courbot
e GSP bootloader and firmware image) still need to be prepared. Acked-by: Danilo Krummrich Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/falcon.rs | 4 +- drivers/gpu/nova-core/firmware.rs| 6 +- drivers/gpu/nova-core/firmware/booter.rs

[PATCH v6 10/11] gpu: nova-core: Add base files for r570.144 firmware bindings

2025-09-13 Thread Alexandre Courbot
ff-by: Alistair Popple Reviewed-by: John Hubbard [acour...@nvidia.com: adapt the bindings module comment a bit] Acked-by: Danilo Krummrich Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/gsp.rs | 2 ++ drivers/gpu/nova-core/gsp/fw.rs | 7 ++ dr

[PATCH v6 09/11] gpu: nova-core: firmware: use 570.144 firmware

2025-09-13 Thread Alexandre Courbot
inelegances of 570.144, notably related to packaging. Reviewed-by: John Hubbard Acked-by: Danilo Krummrich Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova

[PATCH v6 08/11] gpu: nova-core: firmware: process the GSP bootloader

2025-09-13 Thread Alexandre Courbot
: Danilo Krummrich Signed-off-by: Alexandre Courbot --- 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

[PATCH v6 07/11] gpu: nova-core: firmware: process and prepare the GSP firmware

2025-09-13 Thread Alexandre Courbot
e are performing the required ELF section parsing and radix3 page table building, remove these items from the TODO file. Acked-by: Danilo Krummrich Signed-off-by: Alexandre Courbot --- Documentation/gpu/nova/core/todo.rst | 17 --- drivers/gpu/nova-core/firmware.rs | 3 +- drivers/gpu/nova

[PATCH v6 04/11] gpu: nova-core: firmware: move firmware request code into a function

2025-09-13 Thread Alexandre Courbot
function that can be called by individual firmware types. Acked-by: Danilo Krummrich Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova

[PATCH v6 00/11] gpu: nova-core: process and prepare more firmwares to boot GSP

2025-09-13 Thread Alexandre Courbot
https://lore.kernel.org/rust-for-linux/20250619-nova-frts-v6-0-ecf41ef99...@nvidia.com/ [2] https://lore.kernel.org/rust-for-linux/20250908-num-v5-0-c0f2f681e...@nvidia.com/ [3] https://github.com/Gnurou/linux/tree/b4/nova_firmware Signed-off-by: Alexandre Courbot --- Changes in v6: - R

[PATCH v4 07/11] gpu: nova-core: firmware: process and prepare the GSP firmware

2025-09-11 Thread Alexandre Courbot
e are performing the required ELF section parsing and radix3 page table building, remove these items from the TODO file. Signed-off-by: Alexandre Courbot --- Documentation/gpu/nova/core/todo.rst | 17 --- drivers/gpu/nova-core/firmware.rs | 3 +- drivers/gpu/nova-core/firmware/gsp.rs

[PATCH v5 07/12] gpu: nova-core: firmware: process Booter and patch its signature

2025-09-11 Thread Alexandre Courbot
e GSP bootloader and firmware image) still need to be prepared. Signed-off-by: Alexandre Courbot --- 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

[PATCH v5 04/12] gpu: nova-core: add Chipset::name() method

2025-09-11 Thread Alexandre Courbot
`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. Signed-off-by: Alexandre

[PATCH v5 00/12] gpu: nova-core: process and prepare more firmwares to boot GSP

2025-09-11 Thread Alexandre Courbot
..@nvidia.com/ [4] https://github.com/Gnurou/linux/tree/b4/nova_firmware Signed-off-by: Alexandre Courbot --- Changes in v5: - Perform construction of `Gpu` object in-place. - Link to v4: https://lore.kernel.org/r/20250909-nova_firmware-v4-0-4dcb433d5...@nvidia.com Changes in v4: - Rebase on top of l

[PATCH v4 06/11] gpu: nova-core: firmware: process Booter and patch its signature

2025-09-11 Thread Alexandre Courbot
e GSP bootloader and firmware image) still need to be prepared. Signed-off-by: Alexandre Courbot --- 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

Re: [PATCH v5 08/12] gpu: nova-core: firmware: process and prepare the GSP firmware

2025-09-11 Thread Alexandre Courbot
On Thu Sep 11, 2025 at 8:27 PM JST, Danilo Krummrich wrote: > On 9/11/25 1:04 PM, Alexandre Courbot wrote: >> diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs >> index >> 06a7ee8f4195759fb55ad483852724bb1ab46793..8505ee81c43e7628d1f099aff285244f8908c63

Re: [PATCH v5 05/12] gpu: nova-core: firmware: move firmware request code into a function

2025-09-11 Thread Alexandre Courbot
On Thu Sep 11, 2025 at 8:23 PM JST, Danilo Krummrich wrote: > On 9/11/25 1:04 PM, Alexandre Courbot wrote: >> +/// Requests the GPU firmware `name` suitable for `chipset`, with version >> `ver`. >> +fn request_nv_firmware( > > I think just request_firmware() is fine. Sounds good!

Re: [PATCH v5 02/12] gpu: nova-core: move GSP boot code to a dedicated method

2025-09-11 Thread Alexandre Courbot
On Thu Sep 11, 2025 at 8:22 PM JST, Danilo Krummrich wrote: > On 9/11/25 1:04 PM, Alexandre Courbot wrote: >> +/// Attempt to start the GSP. >> +/// >> +/// This is a GPU-dependent and complex procedure that involves loading >> firmware files from >> +

[PATCH v5 02/12] gpu: nova-core: move GSP boot code to a dedicated method

2025-09-11 Thread Alexandre Courbot
GSP and obtain its runtime data. The GSP runtime data is currently an empty placeholder, but this will change in a subsequent patch. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/gpu.rs | 43 +-- 1 file changed, 33 insertions(+), 10 deletions

[PATCH v5 10/12] gpu: nova-core: firmware: use 570.144 firmware

2025-09-11 Thread Alexandre Courbot
inelegances of 570.144, notably related to packaging. Reviewed-by: John Hubbard Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs index

[PATCH v5 11/12] gpu: nova-core: Add base files for r570.144 firmware bindings

2025-09-11 Thread Alexandre Courbot
ff-by: Alistair Popple Reviewed-by: John Hubbard [acour...@nvidia.com: adapt the bindings module comment a bit] Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/gsp.rs | 2 ++ drivers/gpu/nova-core/gsp/fw.rs | 7 ++ drivers/gpu/nova-core/g

[PATCH v5 05/12] gpu: nova-core: firmware: move firmware request code into a function

2025-09-11 Thread Alexandre Courbot
function that can be called by individual firmware types. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs index

Re: [PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor

2025-09-10 Thread Alexandre Courbot
On Wed Sep 10, 2025 at 8:18 PM JST, Alexandre Courbot wrote: >>> here is what it looks like when I got it to compile: >> >> This looks great! >> >>> pub(crate) fn new<'a>( >>> pdev: &'a pci::Device, >>> d

Re: Implicit panics (was: [PATCH v2 2/8] gpu: nova-core: firmware: add support for common firmware header)

2025-09-09 Thread Alexandre Courbot
Hi Miguel, sorry for the delay in replying! On Thu Aug 28, 2025 at 8:26 PM JST, Miguel Ojeda wrote: > On Wed, Aug 27, 2025 at 10:47 AM Alexandre Courbot > wrote: >> >> However, `fw_start + fw_size` can panic in debug configuration if it >> overflows. In a release buil

Re: [PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor

2025-09-09 Thread Alexandre Courbot
On Tue Sep 9, 2025 at 11:43 PM JST, Danilo Krummrich wrote: > On Tue Sep 9, 2025 at 4:11 PM CEST, Alexandre Courbot wrote: >> On Wed Sep 3, 2025 at 5:27 PM JST, Danilo Krummrich wrote: >>> On Wed Sep 3, 2025 at 9:10 AM CEST, Alexandre Courbot wrote: >>>> On Wed Sep

[PATCH v4 02/11] gpu: nova-core: move GSP boot code to a dedicated method

2025-09-09 Thread Alexandre Courbot
GSP and obtain its runtime data. The GSP runtime data is currently an empty placeholder, but this will change in a subsequent patch. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/gpu.rs | 47 +--- 1 file changed, 36 insertions(+), 11 deletions

[PATCH v4 10/11] gpu: nova-core: Add base files for r570.144 firmware bindings

2025-09-09 Thread Alexandre Courbot
ff-by: Alistair Popple Reviewed-by: John Hubbard [acour...@nvidia.com: adapt the bindings module comment a bit] Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/gsp.rs | 2 ++ drivers/gpu/nova-core/gsp/fw.rs | 7 ++ drivers/gpu/nova-core/g

[PATCH v4 11/11] gpu: nova-core: compute layout of more framebuffer regions required for GSP

2025-09-09 Thread Alexandre Courbot
different files, they should not be too difficult to track separately. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/fb.rs | 65 ++- drivers/gpu/nova-core/firmware/gsp.rs | 2 +- drivers/gpu/nova-core/firmware/riscv.rs | 2 +- drivers

[PATCH v4 09/11] gpu: nova-core: firmware: use 570.144 firmware

2025-09-09 Thread Alexandre Courbot
inelegances of 570.144, notably related to packaging. Reviewed-by: John Hubbard Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs index

[PATCH v4 04/11] gpu: nova-core: firmware: move firmware request code into a function

2025-09-09 Thread Alexandre Courbot
that can be called by individual firmware types. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs index

[PATCH v4 03/11] gpu: nova-core: add Chipset::name() method

2025-09-09 Thread Alexandre Courbot
`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. Signed-off-by: Alexandre

[PATCH v4 01/11] gpu: nova-core: require `Send` on `FalconEngine` and `FalconHal`

2025-09-09 Thread Alexandre Courbot
`, and this traits also already required `Sync`, so this a minor tweak. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/falcon.rs | 2 +- drivers/gpu/nova-core/falcon/hal.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers

Re: [PATCH v2 1/4] nova-core: bitstruct: Move bitfield-specific code from register! into new macro

2025-09-08 Thread Alexandre Courbot
On Tue Sep 9, 2025 at 2:16 AM JST, Joel Fernandes wrote: > Hi Alex, > > On 9/7/2025 11:12 PM, Alexandre Courbot wrote: >> On Thu Sep 4, 2025 at 6:54 AM JST, Joel Fernandes wrote: >>> The bitfield-specific into new macro. This will be used to define >>> structs with

Re: [PATCH 04/10] gpu: nova-core: Add a slice-buffer (sbuffer) datastructure

2025-09-08 Thread Alexandre Courbot
On Mon Sep 8, 2025 at 8:31 PM JST, Alistair Popple wrote: > On 2025-09-07 at 20:54 +1000, Alice Ryhl wrote... >> On Wed, Aug 27, 2025 at 06:20:01PM +1000, Alistair Popple wrote: >> > From: Joel Fernandes >> > >> > A data structure that can be used to write across multiple slices which >> > may b

Re: [PATCH 05/10] gpu: nova-core: gsp: Add GSP command queue handling

2025-09-07 Thread Alexandre Courbot
On Fri Sep 5, 2025 at 8:50 PM JST, Alexandre Courbot wrote: >> + >> +Ok(GspCmdq { >> +dev: dev.into(), >> +msg_count: MSG_COUNT, >> +seq: 0, >> +gsp_mem, >> +_nr_ptes: nr_ptes as u32

Re: [PATCH v2 4/4] rust: Move register and bitstruct macros out of Nova

2025-09-07 Thread Alexandre Courbot
On Thu Sep 4, 2025 at 6:54 AM JST, Joel Fernandes wrote: > Out of broad need for these macros in Rust, move them out. Several folks > have shown interest (Nova, Tyr GPU drivers). > > bitstruct - defines bitfields in Rust structs similar to C. > register - support for defining hardware registers and

Re: [PATCH v2 3/4] nova-core: bitstruct: Add support for custom visiblity

2025-09-07 Thread Alexandre Courbot
On Mon Sep 8, 2025 at 12:40 PM JST, Alexandre Courbot wrote: > On Thu Sep 4, 2025 at 6:54 AM JST, Joel Fernandes wrote: >> Add support for custom visiblity to allow for users to control visibility >> of the structure and helpers. >> >> Signed-off-by: Joel Fernandes

Re: [PATCH v2 3/4] nova-core: bitstruct: Add support for custom visiblity

2025-09-07 Thread Alexandre Courbot
On Thu Sep 4, 2025 at 6:54 AM JST, Joel Fernandes wrote: > Add support for custom visiblity to allow for users to control visibility > of the structure and helpers. > > Signed-off-by: Joel Fernandes > --- > drivers/gpu/nova-core/bitstruct.rs | 46 ++-- > drivers/gpu/nova

Re: [PATCH v2 1/4] nova-core: bitstruct: Move bitfield-specific code from register! into new macro

2025-09-07 Thread Alexandre Courbot
On Thu Sep 4, 2025 at 6:54 AM JST, Joel Fernandes wrote: > The bitfield-specific into new macro. This will be used to define > structs with bitfields, similar to C language. > > Signed-off-by: Joel Fernandes > --- > drivers/gpu/nova-core/bitstruct.rs | 271 +++ > drivers

Re: [PATCH v2 2/4] nova-core: bitstruct: Add support for different storage widths

2025-09-07 Thread Alexandre Courbot
On Thu Sep 4, 2025 at 6:54 AM JST, Joel Fernandes wrote: > Previously, bitstructs were hardcoded to use u32 as the underlying > storage type. Add support for different storage types (u8, u16, u32, > u64) to the bitstruct macro. > > New syntax is: struct Name: { ... } > > Signed-off-by: Joel Ferna

Re: [PATCH 1/2] nova-core: Add a library for bitfields in Rust structs

2025-09-07 Thread Alexandre Courbot
On Sat Sep 6, 2025 at 6:29 AM JST, John Hubbard wrote: > On 9/4/25 4:06 AM, Alexandre Courbot wrote: >> On Thu Sep 4, 2025 at 4:16 PM JST, Danilo Krummrich wrote: >>> On Thu Sep 4, 2025 at 5:16 AM CEST, Alexandre Courbot wrote: >>>> On Thu Sep 4, 2025 at 12:1

Re: [PATCH v2] gpu: nova-core: take advantage of pci::Device::unbind()

2025-09-06 Thread Alexandre Courbot
On Tue Sep 2, 2025 at 12:01 AM JST, Danilo Krummrich wrote: > Now that we have pci::Device::unbind() we can unregister the sysmem > flush page with a direct access the I/O resource, i.e. without RCU read > side critical section. > > Signed-off-by: Danilo Krummrich Pushed to drm-rust-next, thanks!

Re: [PATCH 05/10] gpu: nova-core: gsp: Add GSP command queue handling

2025-09-05 Thread Alexandre Courbot
Hi Alistair, Here is a second pass on things not directly related to bindings. One general comment is that we will want more documentation about how the command queue operates; without it it is a bit difficult to understand how things run and who can read or write what. I hope we can improve the

Re: [PATCH 1/2] nova-core: Add a library for bitfields in Rust structs

2025-09-04 Thread Alexandre Courbot
On Thu Sep 4, 2025 at 12:15 AM JST, Joel Fernandes wrote: >>> +use kernel::prelude::*; >>> + >>> +/// Macro for defining bitfield-packed structures in Rust. >>> +/// The size of the underlying storage type is specified with >>> #[repr(TYPE)]. >>> +/// >>> +/// # Example (just for illustration) >>

Re: [PATCH 05/10] gpu: nova-core: gsp: Add GSP command queue handling

2025-09-04 Thread Alexandre Courbot
On Thu Sep 4, 2025 at 3:57 PM JST, Alistair Popple wrote: >> > +} >> > + >> > +// This next section contains constants and structures hand-coded from >> > the GSP >> > +// headers We could replace these with bindgen versions, but that's a bit >> > of a >> > +// pain because they basically end up

Re: [PATCH 1/2] nova-core: Add a library for bitfields in Rust structs

2025-09-04 Thread Alexandre Courbot
On Thu Sep 4, 2025 at 4:16 PM JST, Danilo Krummrich wrote: > On Thu Sep 4, 2025 at 5:16 AM CEST, Alexandre Courbot wrote: >> On Thu Sep 4, 2025 at 12:15 AM JST, Joel Fernandes wrote: >> >>>>> +use kernel::prelude::*; >>>>> + >>>>>

Re: [PATCH 05/10] gpu: nova-core: gsp: Add GSP command queue handling

2025-09-03 Thread Alexandre Courbot
Hi Alistair, Making a pass about the bindings only - I will check the command-queue logic in another one. On Wed Aug 27, 2025 at 5:20 PM JST, Alistair Popple wrote: > This commit introduces core infrastructure for handling GSP command and > message queues in the nova-core driver. The command queu

Re: [PATCH 03/10] gpu: nova-core: gsp: Create wpr metadata

2025-09-03 Thread Alexandre Courbot
On Wed Sep 3, 2025 at 9:51 PM JST, Alexandre Courbot wrote: >> And it's all tightly coupled anyway - for example the Gsp boot arguments >> require some >> command queue offsets which are all pretty specific to the Gsp >> implementation. >> Ie. we can'

Re: [PATCH 03/10] gpu: nova-core: gsp: Create wpr metadata

2025-09-03 Thread Alexandre Courbot
On Wed Sep 3, 2025 at 5:57 PM JST, Alistair Popple wrote: >> I've discussed the bindings abstractions with Danilo last week. We >> agreed that no layout information should ever escape the `nvfw` module. >> I.e. the fields of `GspFwWprMeta` should not even be visible here. >> >> Instead, `GspFwWpr

Re: [PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor

2025-09-03 Thread Alexandre Courbot
On Wed Sep 3, 2025 at 8:05 PM JST, Danilo Krummrich wrote: > On Wed Sep 3, 2025 at 12:44 PM CEST, Alexandre Courbot wrote: >> On Wed Sep 3, 2025 at 5:26 PM JST, Danilo Krummrich wrote: >>> On Wed Sep 3, 2025 at 9:08 AM CEST, Alexandre Courbot wrote: >>>> On Wed Sep

Re: [PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor

2025-09-03 Thread Alexandre Courbot
On Wed Sep 3, 2025 at 5:26 PM JST, Danilo Krummrich wrote: > On Wed Sep 3, 2025 at 9:08 AM CEST, Alexandre Courbot wrote: >> On Wed Sep 3, 2025 at 4:53 AM JST, Danilo Krummrich wrote: >>> On Tue Sep 2, 2025 at 4:31 PM CEST, Alexandre Courbot wrote: >>>> diff --git a/d

[PATCH v3 03/11] gpu: nova-core: add Chipset::name() method

2025-09-03 Thread Alexandre Courbot
`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. Signed-off-by: Alexandre

[PATCH v3 05/11] gpu: nova-core: firmware: add support for common firmware header

2025-09-03 Thread Alexandre Courbot
Several firmware files loaded from userspace feature a common header that describes their payload. Add basic support for it so subsequent patches can leverage it. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 62 +++ 1 file changed

Re: [PATCH v2] gpu: nova-core: take advantage of pci::Device::unbind()

2025-09-03 Thread Alexandre Courbot
On Tue Sep 2, 2025 at 12:01 AM JST, Danilo Krummrich wrote: > Now that we have pci::Device::unbind() we can unregister the sysmem > flush page with a direct access the I/O resource, i.e. without RCU read > side critical section. > > Signed-off-by: Danilo Krummrich Reviewed-by: Alexandre Courbot

Re: [PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor

2025-09-03 Thread Alexandre Courbot
On Wed Sep 3, 2025 at 4:08 PM JST, Alexandre Courbot wrote: > On Wed Sep 3, 2025 at 4:53 AM JST, Danilo Krummrich wrote: >> On Tue Sep 2, 2025 at 4:31 PM CEST, Alexandre Courbot wrote: >>> diff --git a/drivers/gpu/nova-core/driver.rs >>> b/drivers/gpu/no

Re: [PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor

2025-09-03 Thread Alexandre Courbot
On Wed Sep 3, 2025 at 8:12 AM JST, Danilo Krummrich wrote: > On 9/2/25 4:31 PM, Alexandre Courbot wrote: >> pub(crate) fn new( >> pdev: &pci::Device, >> devres_bar: Arc>, > > The diff is hiding it, but with this patch we should also m

Re: [PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor

2025-09-03 Thread Alexandre Courbot
On Wed Sep 3, 2025 at 4:53 AM JST, Danilo Krummrich wrote: > On Tue Sep 2, 2025 at 4:31 PM CEST, Alexandre Courbot wrote: >> diff --git a/drivers/gpu/nova-core/driver.rs >> b/drivers/gpu/nova-core/driver.rs >> index >> 274989ea1fb4a

[PATCH v3 08/11] gpu: nova-core: firmware: process the GSP bootloader

2025-09-02 Thread Alexandre Courbot
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. Signed-off-by: Alexandre Courbot

[PATCH v3 00/11] gpu: nova-core: process and prepare more firmwares to boot GSP

2025-09-02 Thread Alexandre Courbot
-v4-0-1f3a425d7...@nvidia.com/ [5] https://github.com/Gnurou/linux/tree/b4/nova_firmware Signed-off-by: Alexandre Courbot --- 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. - Consolidat

[PATCH v3 09/11] gpu: nova-core: firmware: use 570.144 firmware

2025-09-02 Thread Alexandre Courbot
inelegances of 570.144, notably related to packaging. Reviewed-by: John Hubbard Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs index

[PATCH v3 01/11] gpu: nova-core: require `Send` on `FalconEngine` and `FalconHal`

2025-09-02 Thread Alexandre Courbot
`, and this traits also already required `Sync`, so this a minor tweak. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/falcon.rs | 2 +- drivers/gpu/nova-core/falcon/hal.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers

[PATCH v3 06/11] gpu: nova-core: firmware: process Booter and patch its signature

2025-09-02 Thread Alexandre Courbot
e GSP bootloader and firmware image) still need to be prepared. Signed-off-by: Alexandre Courbot --- 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

[PATCH v3 11/11] gpu: nova-core: compute layout of more framebuffer regions required for GSP

2025-09-02 Thread Alexandre Courbot
different files, they should not be too difficult to track separately. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/fb.rs | 64 +++- drivers/gpu/nova-core/fb/hal.rs | 4 + drivers/gpu/nova-core/fb/hal/ga100.rs | 5 + drivers/gpu

[PATCH v3 10/11] gpu: nova-core: Add base files for r570.144 firmware bindings

2025-09-02 Thread Alexandre Courbot
ff-by: Alistair Popple Reviewed-by: John Hubbard [acour...@nvidia.com: adapt the bindings module comment a bit] Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/nova_core.rs | 1 + drivers/gpu/nova-core/nvfw.rs | 6 + drivers/gpu/nova-core/nvfw/r570_1

[PATCH v3 04/11] gpu: nova-core: firmware: move firmware request code into a function

2025-09-02 Thread Alexandre Courbot
that can be called by individual firmware types. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/firmware.rs | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/nova-core/firmware.rs b/drivers/gpu/nova-core/firmware.rs index

[PATCH v3 07/11] gpu: nova-core: firmware: process and prepare the GSP firmware

2025-09-02 Thread Alexandre Courbot
e are performing the required ELF section parsing and radix3 page table building, remove these items from the TODO file. Signed-off-by: Alexandre Courbot --- Documentation/gpu/nova/core/todo.rst | 17 --- drivers/gpu/nova-core/firmware.rs | 3 +- drivers/gpu/nova-core/firmware/gsp.rs

[PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor

2025-09-02 Thread Alexandre Courbot
instance, once the code completing its boot is integrated. Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/driver.rs | 10 +- drivers/gpu/nova-core/gpu.rs| 41 ++--- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/drivers/gpu

Re: [PATCH] MAINTAINERS: Add drm-rust tree for Rust DRM drivers and infrastructure

2025-09-02 Thread Alexandre Courbot
; trees respectively. Until then, drm-rust provides a dedicated place to > coordinate development without disrupting existing workflows too much. > > Cc: Alice Ryhl > Cc: David Airlie > Cc: Simona Vetter > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann &

Re: [PATCH 0/2] gpu: nova-core: vbios: simplify device use

2025-09-01 Thread Alexandre Courbot
On Mon Sep 1, 2025 at 7:37 PM JST, Danilo Krummrich wrote: > On 8/8/25 4:46 AM, Alexandre Courbot wrote: >> This small cleanup series simplifies the use of `Device` in vbios >> methods. >> >> The device is used for logging purposes only; thus we don't need a >&

Re: [PATCH] gpu: nova-core: take advantage of pci::Device::unbind()

2025-09-01 Thread Alexandre Courbot
On Mon Sep 1, 2025 at 7:41 PM JST, Danilo Krummrich wrote: > On Sun Aug 31, 2025 at 3:50 PM CEST, Alexandre Courbot wrote: >>> +pub(crate) fn unbind(&self, pdev: &pci::Device) { >>> +// Unregister the sysmem flush page before we release it. >>> +

Re: [PATCH v2 5/8] gpu: nova-core: firmware: process and prepare the GSP firmware

2025-09-01 Thread Alexandre Courbot
On Sat Aug 30, 2025 at 9:56 PM JST, Danilo Krummrich wrote: > On 8/29/25 1:16 PM, Alexandre Courbot wrote: >> On Thu Aug 28, 2025 at 8:27 PM JST, Danilo Krummrich wrote: >>> On 8/26/25 6:07 AM, Alexandre Courbot wrote: >>>>/// Structure encapsulating the firmware

Re: [PATCH 03/10] gpu: nova-core: gsp: Create wpr metadata

2025-09-01 Thread Alexandre Courbot
Hi Alistair, On Wed Aug 27, 2025 at 5:20 PM JST, Alistair Popple wrote: > index 161c057350622..1f51e354b9569 100644 > --- a/drivers/gpu/nova-core/gsp.rs > +++ b/drivers/gpu/nova-core/gsp.rs > @@ -6,12 +6,17 @@ > use kernel::dma_write; > use kernel::pci; > use kernel::prelude::*; > -use kernel:

Re: [PATCH] gpu: nova-core: take advantage of pci::Device::unbind()

2025-08-31 Thread Alexandre Courbot
On Sat Aug 30, 2025 at 10:32 PM JST, Danilo Krummrich wrote: > Now that we have pci::Device::unbind() we can unregister the sysmem > flush page with a direct access the I/O resource, i.e. without RCU read > side critical section. > > Signed-off-by: Danilo Krummrich > --- > drivers/gpu/nova-core/d

Re: [PATCH v2 8/8] gpu: nova-core: compute layout of more framebuffer regions required for GSP

2025-08-29 Thread Alexandre Courbot
On Sat Aug 30, 2025 at 8:30 AM JST, John Hubbard wrote: > On 8/25/25 9:07 PM, Alexandre Courbot wrote: >> diff --git a/drivers/gpu/nova-core/fb.rs b/drivers/gpu/nova-core/fb.rs >> index >> b0e860498b883815b3861b8717f8ee1832d25440..a3eb063f86b3a06a7ad01e68491911

Re: [PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active

2025-08-29 Thread Alexandre Courbot
On Fri Aug 29, 2025 at 7:01 PM JST, Miguel Ojeda wrote: > On Fri, Aug 29, 2025 at 9:40 AM Danilo Krummrich wrote: >> >> I'm happy about every potential additional reviewer for Nova, but I'm not >> sure >> it scales very well for the rust-for-linux if we get more drivers. :) > > Yeah, it is an inf

Re: [PATCH] gpu: nova-core: depend on CONFIG_64BIT

2025-08-29 Thread Alexandre Courbot
On Fri Aug 29, 2025 at 7:39 AM JST, Danilo Krummrich wrote: > diff --git a/drivers/gpu/nova-core/Kconfig b/drivers/gpu/nova-core/Kconfig > index 8726d80d6ba4..20d3e6d0d796 100644 > --- a/drivers/gpu/nova-core/Kconfig > +++ b/drivers/gpu/nova-core/Kconfig > @@ -1,5 +1,6 @@ > config NOVA_CORE >

Re: [PATCH v2 5/8] gpu: nova-core: firmware: process and prepare the GSP firmware

2025-08-29 Thread Alexandre Courbot
On Thu Aug 28, 2025 at 8:27 PM JST, Danilo Krummrich wrote: > On 8/26/25 6:07 AM, Alexandre Courbot wrote: >> /// Structure encapsulating the firmware blobs required for the GPU to >> operate. >> #[expect(dead_code)] >> pub(crate) struct Firmware { >> @@ -

Re: [PATCH 00/10] gpu: nova-core: Boot GSP to RISC-V active

2025-08-28 Thread Alexandre Courbot
On Thu Aug 28, 2025 at 5:37 PM JST, Miguel Ojeda wrote: > On Wed, 27 Aug 2025 18:19:57 +1000 Alistair Popple wrote: >> >> This series builds on top of Alex's series[1] to continue initialising the >> GSP >> into a state where it becomes active and it starts communicating with the >> host. > > No

Re: [PATCH v2 1/8] rust: transmute: add `from_bytes_copy` method to `FromBytes` trait

2025-08-28 Thread Alexandre Courbot
On Thu Aug 28, 2025 at 8:45 PM JST, Miguel Ojeda wrote: > On Thu, Aug 28, 2025 at 1:26 PM Alexandre Courbot wrote: >> >> We got 3 Reviewed-by on this patch - Miguel, are you ok if I merge it >> together with Christian's `from_bytes` patch, since they are closely >>

Re: [PATCH] gpu: nova-core: depend on CONFIG_64BIT

2025-08-28 Thread Alexandre Courbot
Ojeda > Closes: https://lore.kernel.org/lkml/20250828160247.37492-1-oj...@kernel.org/ > Fixes: 6554ad65b589 ("gpu: nova-core: register sysmem flush page") > Fixes: 69f5cd67ce41 ("gpu: nova-core: add falcon register definitions and > base code") > Signed-off-by: Danilo Krummrich Thanks! Reviewed-by: Alexandre Courbot

Re: [PATCH v2 1/8] rust: transmute: add `from_bytes_copy` method to `FromBytes` trait

2025-08-28 Thread Alexandre Courbot
On Tue Aug 26, 2025 at 1:07 PM JST, Alexandre Courbot wrote: > `FromBytes::from_bytes` comes with a few practical limitations: > > - It requires the bytes slice to have the same alignment as the returned > type, which might not be guaranteed in the case of a byte stream, >

Re: [PATCH v2 5/8] gpu: nova-core: firmware: process and prepare the GSP firmware

2025-08-28 Thread Alexandre Courbot
On Thu Aug 28, 2025 at 1:01 PM JST, John Hubbard wrote: > On 8/25/25 9:07 PM, Alexandre Courbot wrote: >> The 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 giv

Re: [PATCH v2 2/8] gpu: nova-core: firmware: add support for common firmware header

2025-08-28 Thread Alexandre Courbot
On Thu Aug 28, 2025 at 6:50 AM JST, John Hubbard wrote: > On 8/27/25 1:47 AM, Alexandre Courbot wrote: >> On Wed Aug 27, 2025 at 10:34 AM JST, John Hubbard wrote: >> >>>> +/// Returns the data payload of the firmware, or `None` if the data >>>> rang

Re: [PATCH v2 3/8] gpu: nova-core: firmware: process Booter and patch its signature

2025-08-28 Thread Alexandre Courbot
On Wed Aug 27, 2025 at 11:29 AM JST, John Hubbard wrote: > On 8/25/25 9:07 PM, Alexandre Courbot wrote: > ... >> +/// Signature parameters, as defined in the firmware. >> +#[repr(C)] >> +struct HsSignatureParams { >> +// Fuse version to use. >> +fuse_ver

Re: [PATCH v2 1/8] rust: transmute: add `from_bytes_copy` method to `FromBytes` trait

2025-08-28 Thread Alexandre Courbot
On Wed Aug 27, 2025 at 9:51 AM JST, John Hubbard wrote: > On 8/25/25 9:07 PM, Alexandre Courbot wrote: >> `FromBytes::from_bytes` comes with a few practical limitations: >> >> - It requires the bytes slice to have the same alignment as the returned >> type, which mig

  1   2   3   4   5   6   7   8   9   >