diff options
| author | Alexandre Courbot <acourbot@nvidia.com> | 2025-05-07 22:52:32 +0900 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2025-05-13 15:08:18 +0200 |
| commit | c3f22262670da259d7cf1fda199d8f06f1d6ff6d (patch) | |
| tree | e3b6aca27e2e230b24e89bd01a545988fc7fd746 /Documentation/gpu | |
| parent | gpu: nova-core: take bound device in Gpu::new (diff) | |
| download | linux-c3f22262670da259d7cf1fda199d8f06f1d6ff6d.tar.gz linux-c3f22262670da259d7cf1fda199d8f06f1d6ff6d.zip | |
gpu: nova-core: define registers layout using helper macro
Add the register!() macro, which defines a given register's layout and
provide bit-field accessors with a way to convert them to a given type.
This macro will allow us to make clear definitions of the registers and
manipulate their fields safely.
The long-term goal is to eventually move it to the kernel crate so it
can be used by other drivers as well, but it was agreed to first land it
into nova-core and make it mature there.
To illustrate its usage, use it to define the layout for the Boot0
(renamed to NV_PMC_BOOT_0 to match OpenRM's naming scheme) and take
advantage of its accessors.
Suggested-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://lore.kernel.org/r/20250507-nova-frts-v3-5-fcb02749754d@nvidia.com
[ Fix typo in commit message. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'Documentation/gpu')
| -rw-r--r-- | Documentation/gpu/nova/core/todo.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/gpu/nova/core/todo.rst b/Documentation/gpu/nova/core/todo.rst index 234d753d3eac..8a459fc08812 100644 --- a/Documentation/gpu/nova/core/todo.rst +++ b/Documentation/gpu/nova/core/todo.rst @@ -102,7 +102,13 @@ Usage: let boot0 = Boot0::read(&bar); pr_info!("Revision: {}\n", boot0.revision()); +Note: a work-in-progress implementation currently resides in +`drivers/gpu/nova-core/regs/macros.rs` and is used in nova-core. It would be +nice to improve it (possibly using proc macros) and move it to the `kernel` +crate so it can be used by other components as well. + | Complexity: Advanced +| Contact: Alexandre Courbot Delay / Sleep abstractions -------------------------- |
