Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpu: nova-core: convert PDISP registers to kernel register macro

Convert all PDISP registers to use the kernel's register macro and
update the code accordingly.

Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260325-b4-nova-register-v4-7-bdf172f0f6ca@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

+13 -5
+5 -1
drivers/gpu/nova-core/fb.rs
··· 8 8 use kernel::{ 9 9 device, 10 10 fmt, 11 + io::Io, 11 12 prelude::*, 12 13 ptr::{ 13 14 Alignable, ··· 190 189 let base = fb.end - NV_PRAMIN_SIZE; 191 190 192 191 if hal.supports_display(bar) { 193 - match regs::NV_PDISP_VGA_WORKSPACE_BASE::read(bar).vga_workspace_addr() { 192 + match bar 193 + .read(regs::NV_PDISP_VGA_WORKSPACE_BASE) 194 + .vga_workspace_addr() 195 + { 194 196 Some(addr) => { 195 197 if addr < base { 196 198 const VBIOS_WORKSPACE_SIZE: u64 = usize_as_u64(SZ_128K);
+8 -4
drivers/gpu/nova-core/regs.rs
··· 250 250 251 251 // PDISP 252 252 253 - register!(NV_PDISP_VGA_WORKSPACE_BASE @ 0x00625f04 { 254 - 3:3 status_valid as bool, "Set if the `addr` field is valid"; 255 - 31:8 addr as u32, "VGA workspace base address divided by 0x10000"; 256 - }); 253 + io::register! { 254 + pub(crate) NV_PDISP_VGA_WORKSPACE_BASE(u32) @ 0x00625f04 { 255 + /// VGA workspace base address divided by 0x10000. 256 + 31:8 addr; 257 + /// Set if the `addr` field is valid. 258 + 3:3 status_valid => bool; 259 + } 260 + } 257 261 258 262 impl NV_PDISP_VGA_WORKSPACE_BASE { 259 263 /// Returns the base address of the VGA workspace, or `None` if none exists.