| 173c99b8 | 07-Nov-2025 |
John Hubbard <jhubbard@nvidia.com> |
gpu: nova-core: apply the one "use" item per line policy
As per [1], we need one "use" item per line, in order to reduce merge conflicts. Furthermore, we need a trailing ", //" in order to tell rust
gpu: nova-core: apply the one "use" item per line policy
As per [1], we need one "use" item per line, in order to reduce merge conflicts. Furthermore, we need a trailing ", //" in order to tell rustfmt(1) to leave it alone.
This does that for the entire nova-core driver.
[1] https://docs.kernel.org/rust/coding-guidelines.html#imports
Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: John Hubbard <jhubbard@nvidia.com> [acourbot@nvidia.com: remove imports already in prelude as pointed out by Danilo.] [acourbot@nvidia.com: remove a few unneeded trailing `//`.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Message-ID: <20251107021006.434109-1-jhubbard@nvidia.com>
show more ...
|
| 9a3c2f8a | 29-Oct-2025 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: replace `as` with `from` conversions where possible
The `as` operator is best avoided as it silently drops bits if the destination type is smaller that the source.
For data types wh
gpu: nova-core: replace `as` with `from` conversions where possible
The `as` operator is best avoided as it silently drops bits if the destination type is smaller that the source.
For data types where this is clearly not the case, use `from` to unambiguously signal that these conversions are lossless.
Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Message-ID: <20251029-nova-as-v3-1-6a30c7333ad9@nvidia.com>
show more ...
|
| 76544ef6 | 20-Oct-2025 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: replace wait_on with kernel equivalents
wait_on was a temporary helper function waiting for a kernel crate equivalent.
Now that read_poll_timeout and fsleep are available, use them
gpu: nova-core: replace wait_on with kernel equivalents
wait_on was a temporary helper function waiting for a kernel crate equivalent.
Now that read_poll_timeout and fsleep are available, use them and remove wait_on.
Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Message-ID: <20251020-nova_wait_on-v1-1-2eb87fb38d14@nvidia.com>
show more ...
|
| 09880996 | 18-Jul-2025 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: register: add support for relative array registers
Add support for declaring arrays of registers available from a variable base. This is effectively a combination of the relative and
gpu: nova-core: register: add support for relative array registers
Add support for declaring arrays of registers available from a variable base. This is effectively a combination of the relative and array registers features.
nova-core does not make much use of this yet, but it will become helpful to have for GSP boot.
Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://lore.kernel.org/r/20250718-nova-regs-v2-19-7b6a762aa1cd@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
show more ...
|
| e617f3a3 | 18-Jul-2025 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: falcon: add distinct base address for PFALCON2
Falcon engines have two distinct register bases: `PFALCON` and `PFALCON2`. So far we assumed that `PFALCON2` was located at `PFALCON +
gpu: nova-core: falcon: add distinct base address for PFALCON2
Falcon engines have two distinct register bases: `PFALCON` and `PFALCON2`. So far we assumed that `PFALCON2` was located at `PFALCON + 0x1000` because that is the case of most engines, but there are exceptions (NVDEC uses `0x1c00`).
Fix this shortcoming by leveraging the redesigned relative registers definitions to assign a distinct `PFalcon2Base` base address to each falcon engine.
Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://lore.kernel.org/r/20250718-nova-regs-v2-16-7b6a762aa1cd@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
show more ...
|
| 4092e1b4 | 24-Jun-2025 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: replace `Duration` with `Delta`
The kernel's `Delta` type was not available when the `wait_on` function was introduced. Now that it is, switch to it as it is more compact than `Durat
gpu: nova-core: replace `Duration` with `Delta`
The kernel's `Delta` type was not available when the `wait_on` function was introduced. Now that it is, switch to it as it is more compact than `Duration` and cannot panic.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://lore.kernel.org/r/20250624-nova-delta-v1-1-b37d75a593ac@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
show more ...
|
| 43ad65ec | 24-Jun-2025 |
Danilo Krummrich <dakr@kernel.org> |
gpu: nova-core: consider `clippy::cast_lossless`
Fix all warnings caused by `clippy::cast_lossless`, which is going to be enabled by [1].
Cc: Alexandre Courbot <acourbot@nvidia.com> Cc: Miguel Ojed
gpu: nova-core: consider `clippy::cast_lossless`
Fix all warnings caused by `clippy::cast_lossless`, which is going to be enabled by [1].
Cc: Alexandre Courbot <acourbot@nvidia.com> Cc: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20250615-ptr-as-ptr-v12-5-f43b024581e8@gmail.com [1] Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://lore.kernel.org/r/20250624132337.2242-2-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
show more ...
|
| 3606620b | 19-Jun-2025 |
Alexandre Courbot <acourbot@nvidia.com> |
gpu: nova-core: update and annotate TODO list
A few new dependencies are required to remove some of the TODO items:
- A way to safely convert from byte slices to types implementing `FromBytes`, -
gpu: nova-core: update and annotate TODO list
A few new dependencies are required to remove some of the TODO items:
- A way to safely convert from byte slices to types implementing `FromBytes`, - A way to obtain slices and write into a `CoherentAllocation`, - Several improvements to the `register!()` macro, - Alignment operations to powers of two, and an equivalent to the C `fls`, - Support for `xa_alloc` in the XAlloc bindings.
Some items have also become obsolete:
- The auxiliary bus abstractions have been implemented and are in use, - The ELF utilities are not considered for being part of the core kernel bindings anymore. - VBIOS, falcon and GPU timer have been completed.
We now have quite a few TODO entries in the code, so annotate them with a 4 letter code representing the corresponding task in `todo.rst`. This allows to easily find which part of the code corresponds to a given entry (and conversely).
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://lore.kernel.org/r/20250619-nova-frts-v6-24-ecf41ef99252@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
show more ...
|