summaryrefslogtreecommitdiff
path: root/drivers/gpu/nova-core/fb/hal
diff options
context:
space:
mode:
authorJohn Hubbard <jhubbard@nvidia.com>2026-06-10 18:18:59 -0700
committerAlexandre Courbot <acourbot@nvidia.com>2026-06-17 15:56:17 +0900
commit21baef62022fbcca539fca2171e2d3ff15fcb9d3 (patch)
tree0737c36ba54d562a05293c1767d85673df30a2c8 /drivers/gpu/nova-core/fb/hal
parent5f7410aa26524101d34b627fbe16670b1514962c (diff)
downloadlinux-21baef62022fbcca539fca2171e2d3ff15fcb9d3.tar.gz
linux-21baef62022fbcca539fca2171e2d3ff15fcb9d3.zip
gpu: nova-core: Blackwell: use absolute FBHUB0 flush registers
The GB20x sysmem flush registers were defined relative to an Fbhub0Base register window, but there is exactly one FBHUB0 base, so expressing them as base-plus-offset only adds indirection. Rename these to FBHUB0 and give them their fixed absolute addresses, dropping the base struct and its RegisterBase impl. No functional changes. Signed-off-by: John Hubbard <jhubbard@nvidia.com> Link: https://patch.msgid.link/20260611011901.84517-2-jhubbard@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Diffstat (limited to 'drivers/gpu/nova-core/fb/hal')
-rw-r--r--drivers/gpu/nova-core/fb/hal/gb202.rs26
1 files changed, 7 insertions, 19 deletions
diff --git a/drivers/gpu/nova-core/fb/hal/gb202.rs b/drivers/gpu/nova-core/fb/hal/gb202.rs
index 038d1278c634..6747ba6c9c13 100644
--- a/drivers/gpu/nova-core/fb/hal/gb202.rs
+++ b/drivers/gpu/nova-core/fb/hal/gb202.rs
@@ -4,13 +4,7 @@
//! Blackwell GB20x framebuffer HAL.
use kernel::{
- io::{
- register::{
- RegisterBase,
- WithBase, //
- },
- Io, //
- },
+ io::Io,
num::Bounded,
prelude::*,
sizes::SizeConstants, //
@@ -24,17 +18,13 @@ use crate::{
struct Gb202;
-impl RegisterBase<regs::Fbhub0Base> for Gb202 {
- const BASE: usize = 0x008a_0000;
-}
-
fn read_sysmem_flush_page_gb202(bar: Bar0<'_>) -> u64 {
let lo = u64::from(
- bar.read(regs::NV_PFB_FBHUB_PCIE_FLUSH_SYSMEM_ADDR_LO::of::<Gb202>())
+ bar.read(regs::NV_PFB_FBHUB0_PCIE_FLUSH_SYSMEM_ADDR_LO)
.adr(),
);
let hi = u64::from(
- bar.read(regs::NV_PFB_FBHUB_PCIE_FLUSH_SYSMEM_ADDR_HI::of::<Gb202>())
+ bar.read(regs::NV_PFB_FBHUB0_PCIE_FLUSH_SYSMEM_ADDR_HI)
.adr(),
);
@@ -44,15 +34,13 @@ fn read_sysmem_flush_page_gb202(bar: Bar0<'_>) -> u64 {
/// Write the sysmem flush page address through the GB20x FBHUB0 registers.
fn write_sysmem_flush_page_gb202(bar: Bar0<'_>, addr: Bounded<u64, 52>) {
// Write HI first. The hardware will trigger the flush on the LO write.
- bar.write(
- regs::NV_PFB_FBHUB_PCIE_FLUSH_SYSMEM_ADDR_HI::of::<Gb202>(),
- regs::NV_PFB_FBHUB_PCIE_FLUSH_SYSMEM_ADDR_HI::zeroed()
+ bar.write_reg(
+ regs::NV_PFB_FBHUB0_PCIE_FLUSH_SYSMEM_ADDR_HI::zeroed()
.with_adr(addr.shr::<32, 20>().cast::<u32>()),
);
- bar.write(
- regs::NV_PFB_FBHUB_PCIE_FLUSH_SYSMEM_ADDR_LO::of::<Gb202>(),
+ bar.write_reg(
// CAST: lower 32 bits. Hardware ignores bits 7:0.
- regs::NV_PFB_FBHUB_PCIE_FLUSH_SYSMEM_ADDR_LO::zeroed().with_adr(*addr as u32),
+ regs::NV_PFB_FBHUB0_PCIE_FLUSH_SYSMEM_ADDR_LO::zeroed().with_adr(*addr as u32),
);
}