[PATCH 10/11] gpu: nova-core: update to use the new bar and io api
Andrew Ballance
andrewjballance at gmail.com
Fri May 9 03:15:23 UTC 2025
updates nova-core to use the new Io and Bar api.
Signed-off-by: Andrew Ballance <andrewjballance at gmail.com>
---
drivers/gpu/nova-core/driver.rs | 4 ++--
drivers/gpu/nova-core/regs.rs | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs
index a08fb6599267..42596ee2e07f 100644
--- a/drivers/gpu/nova-core/driver.rs
+++ b/drivers/gpu/nova-core/driver.rs
@@ -11,7 +11,7 @@ pub(crate) struct NovaCore {
}
const BAR0_SIZE: usize = 8;
-pub(crate) type Bar0 = pci::Bar<BAR0_SIZE>;
+pub(crate) type Bar0 = pci::MMIoBar<BAR0_SIZE>;
kernel::pci_device_table!(
PCI_TABLE,
@@ -33,7 +33,7 @@ fn probe(pdev: &pci::Device<Core>, _info: &Self::IdInfo) -> Result<Pin<KBox<Self
pdev.enable_device_mem()?;
pdev.set_master();
- let bar = pdev.iomap_region_sized::<BAR0_SIZE>(0, c_str!("nova-core/bar0"))?;
+ let bar = pdev.iomap_region_sized_hint::<BAR0_SIZE, _>(0, c_str!("nova-core/bar0"))?;
let this = KBox::pin_init(
try_pin_init!(Self {
diff --git a/drivers/gpu/nova-core/regs.rs b/drivers/gpu/nova-core/regs.rs
index b1a25b86ef17..079c3d275a47 100644
--- a/drivers/gpu/nova-core/regs.rs
+++ b/drivers/gpu/nova-core/regs.rs
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
use crate::driver::Bar0;
+use kernel::io::IoAccess;
// TODO
//
--
2.49.0
More information about the dri-devel
mailing list