Re: [PATCH v3 13/16] gpu: nova-core: convert hshub0 from relative register to projection
"Alexandre Courbot" <[email protected]>
| Newsgroups | dev.linux.lists.nova-gpu,dev.linux.lists.driver-core,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <[email protected]> |
On Wed Aug 19, 2026 at 8:09 PM JST, Gary Guo wrote: > Similar to the PFALCON and PFALCON2 conversion, the hshub0 relative access > can also be achieved cleanly with projection and a new base. > > Signed-off-by: Gary Guo <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> <...> > diff --git a/drivers/gpu/nova-core/fb/regs.rs b/drivers/gpu/nova-core/fb/regs.rs > index c27582e376e2..584488a3e012 100644 > --- a/drivers/gpu/nova-core/fb/regs.rs > +++ b/drivers/gpu/nova-core/fb/regs.rs > @@ -2,7 +2,8 @@ > > use kernel::{ > io::register, > - sizes::SizeConstants, // > + prelude::*, > + sizes::{SizeConstants, SZ_4K}, // > }; > > use crate::driver::NovaRegisters; > @@ -65,31 +66,33 @@ pub(super) fn vga_workspace_addr(self) -> Option<u64> { > } > } > > -/// Base of the GB10x HSHUB0 register window (`NV_HSHUB0_PRIV_BASE` in Open RM). > +/// The GB10x HSHUB0 register window (Base defined as `NV_HSHUB0_PRIV_BASE` in Open RM). > /// > /// The base is provided by the GB10x framebuffer HAL. > -pub(super) struct Hshub0Base(()); > +#[repr(align(4))] > +#[derive(FromBytes, IntoBytes)] > +pub(super) struct Hshub0Registers([u8; SZ_4K]); A named constant for the size would be nice here as well.