* [PATCH] Nova: Move register definition into module using it
@ 2026-05-16 16:14 Antonin Malzieu Ridolfi
2026-05-20 0:59 ` Alexandre Courbot
0 siblings, 1 reply; 2+ messages in thread
From: Antonin Malzieu Ridolfi @ 2026-05-16 16:14 UTC (permalink / raw)
To: Danilo Krummrich, Alexandre Courbot, Alice Ryhl, David Airlie,
Simona Vetter
Cc: Antonin Malzieu Ridolfi, nova-gpu, dri-devel, linux-kernel,
Daniel Almeida
[-- Attachment #1.1: Type: text/plain, Size: 2323 bytes --]
First babystep to split the register definitions grouped in nova root
register file to the module which actually use them.
Suggested-by: Alexandre Courbot <acourbot@nvidia.com>
Suggested-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Antonin Malzieu Ridolfi <dev@nanonej.com>
---
drivers/gpu/nova-core/gsp.rs | 1 +
drivers/gpu/nova-core/gsp/cmdq.rs | 3 ++-
drivers/gpu/nova-core/gsp/regs.rs | 11 +++++++++++
drivers/gpu/nova-core/regs.rs | 8 --------
4 files changed, 14 insertions(+), 9 deletions(-)
create mode 100644 drivers/gpu/nova-core/gsp/regs.rs
diff --git a/drivers/gpu/nova-core/gsp.rs b/drivers/gpu/nova-core/gsp.rs
index ba5b7f990031..756b9c75dc90 100644
--- a/drivers/gpu/nova-core/gsp.rs
+++ b/drivers/gpu/nova-core/gsp.rs
@@ -21,6 +21,7 @@
pub(crate) mod cmdq;
pub(crate) mod commands;
mod fw;
+mod regs;
mod sequencer;
pub(crate) use fw::{
diff --git a/drivers/gpu/nova-core/gsp/cmdq.rs b/drivers/gpu/nova-core/gsp/cmdq.rs
i
ndex 275da9b1ee0e..4d54350e8095 100644
--- a/drivers/gpu/nova-core/gsp/cmdq.rs
+++ b/drivers/gpu/nova-core/gsp/cmdq.rs
@@ -51,10 +51,11 @@
GSP_PAGE_SIZE, //
},
num,
- regs,
sbuffer::SBufferIter, //
};
+use super::regs;
+
/// Marker type representing the absence of a reply for a command. Commands using this as their
/// reply type are sent using [`Cmdq::send_command_no_wait`].
pub(crate) struct NoReply;
diff --git a/drivers/gpu/nova-core/gsp/regs.rs b/drivers/gpu/nova-core/gsp/regs.rs
new file mode 100644
index 000000000000..a76dea3c3ab0
--- /dev/null
+++ b/drivers/gpu/nova-core/gsp/regs.rs
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+
+use kernel::io::register;
+
+// PGSP
+
+register! {
+ pub(super) NV_PGSP_QUEUE_HEAD(u32) @ 0x00110c00 {
+ 31:0 address;
+ }
+}
diff --git a/drivers/gpu/nova-core/regs.rs b/drivers/gpu/nova-core/regs.rs
index 6faeed73901d..d675afbb56b2 100644
--- a/drivers/gpu/nov
a-core/regs.rs
+++ b/drivers/gpu/nova-core/regs.rs
@@ -177,14 +177,6 @@ pub(crate) fn higher_bound(self) -> u64 {
}
}
-// PGSP
-
-register! {
- pub(crate) NV_PGSP_QUEUE_HEAD(u32) @ 0x00110c00 {
- 31:0 address;
- }
-}
-
// PGC6 register space.
//
// `GC6` is a GPU low-power state where VRAM is in self-refresh and the GPU is powered down (except
--
2.54.0
[-- Attachment #1.2: publickey - dev@nanonej.com - 0x8FBDF600.asc --]
[-- Type: application/pgp-keys, Size: 693 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 322 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Nova: Move register definition into module using it
2026-05-16 16:14 [PATCH] Nova: Move register definition into module using it Antonin Malzieu Ridolfi
@ 2026-05-20 0:59 ` Alexandre Courbot
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Courbot @ 2026-05-20 0:59 UTC (permalink / raw)
To: Antonin Malzieu Ridolfi
Cc: Danilo Krummrich, Alice Ryhl, David Airlie, Simona Vetter,
nova-gpu, dri-devel, linux-kernel, Daniel Almeida
Hi Antonin, thanks for this first patch!
Note about the subject: if you look at patches under
`drivers/gpu/nova-core`, you will notice that they all use the same
prefix (`gpu: nova-core:`). Here since you touch the `gsp` module,
you'll want to refine it further to `gpu: nova-core: gsp:`.
On Sun May 17, 2026 at 1:14 AM JST, Antonin Malzieu Ridolfi wrote:
> First babystep to split the register definitions grouped in nova root
> register file to the module which actually use them.
nit: "first babystep" is irrelevant for the git history, we prefer to
keep the log strictly factual. If you want to add side-comments, you can
do so after the `---` marker - these won't be picked up when the patch
is applied.
>
> Suggested-by: Alexandre Courbot <acourbot@nvidia.com>
> Suggested-by: Danilo Krummrich <dakr@kernel.org>
> Signed-off-by: Antonin Malzieu Ridolfi <dev@nanonej.com>
> ---
> drivers/gpu/nova-core/gsp.rs | 1 +
> drivers/gpu/nova-core/gsp/cmdq.rs | 3 ++-
> drivers/gpu/nova-core/gsp/regs.rs | 11 +++++++++++
> drivers/gpu/nova-core/regs.rs | 8 --------
> 4 files changed, 14 insertions(+), 9 deletions(-)
> create mode 100644 drivers/gpu/nova-core/gsp/regs.rs
The patch in itself looks exactly like expected. The reduced visibility
is definitely nice.
I suppose you will want to send a v2 addressing this feedback; feel free
to include one or more extra obvious modules as additional patches if
you feel like it. This is the kind of rework that can be merged quickly.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-20 0:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-16 16:14 [PATCH] Nova: Move register definition into module using it Antonin Malzieu Ridolfi
2026-05-20 0:59 ` Alexandre Courbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox