summaryrefslogtreecommitdiff
path: root/drivers/gpu/nova-core/fb
diff options
context:
space:
mode:
authorAntonin Malzieu Ridolfi <dev@nanonej.com>2026-06-17 01:48:12 +0200
committerAlexandre Courbot <acourbot@nvidia.com>2026-06-23 15:13:19 +0900
commit9102e655ea7285c1bc329669865ba8a38cdb69e6 (patch)
treeec6b6a6700a36b841667a2f1fad7db3d6e9a0ee3 /drivers/gpu/nova-core/fb
parent917e43d72e164795af907d90a43183bdb392da56 (diff)
downloadlinux-9102e655ea7285c1bc329669865ba8a38cdb69e6.tar.gz
linux-9102e655ea7285c1bc329669865ba8a38cdb69e6.zip
gpu: nova-core: fb: Move PDISP register definition
Move PDISP register definition into fb module and update register visibility. Signed-off-by: Antonin Malzieu Ridolfi <dev@nanonej.com> Link: https://patch.msgid.link/20260617-nova-core-regs-split-v1-1-4c7dc4450ea7@nanonej.com [acourbot: fix rustfmt issue.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Diffstat (limited to 'drivers/gpu/nova-core/fb')
-rw-r--r--drivers/gpu/nova-core/fb/regs.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/nova-core/fb/regs.rs b/drivers/gpu/nova-core/fb/regs.rs
new file mode 100644
index 000000000000..b2ec02f584be
--- /dev/null
+++ b/drivers/gpu/nova-core/fb/regs.rs
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0
+
+use kernel::io::register;
+
+// PDISP
+
+register! {
+ pub(super) NV_PDISP_VGA_WORKSPACE_BASE(u32) @ 0x00625f04 {
+ /// VGA workspace base address divided by 0x10000.
+ 31:8 addr;
+ /// Set if the `addr` field is valid.
+ 3:3 status_valid => bool;
+ }
+}
+
+impl NV_PDISP_VGA_WORKSPACE_BASE {
+ /// Returns the base address of the VGA workspace, or `None` if none exists.
+ pub(super) fn vga_workspace_addr(self) -> Option<u64> {
+ if self.status_valid() {
+ Some(u64::from(self.addr()) << 16)
+ } else {
+ None
+ }
+ }
+}