summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nova/driver.rs
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nova/driver.rs')
-rw-r--r--drivers/gpu/drm/nova/driver.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nova/driver.rs b/drivers/gpu/drm/nova/driver.rs
index 69d0efeb125e..8f5753f04dba 100644
--- a/drivers/gpu/drm/nova/driver.rs
+++ b/drivers/gpu/drm/nova/driver.rs
@@ -22,7 +22,7 @@ pub(crate) struct NovaData {
pub(crate) pdev: pci::Device,
}
-const BAR0_SIZE: usize = 8;
+const BAR0_SIZE: usize = 0x1000000;
pub(crate) type Bar0 = pci::Bar<BAR0_SIZE>;
const INFO: drm::drv::DriverInfo = drm::drv::DriverInfo {
@@ -49,9 +49,13 @@ impl pci::Driver for NovaDriver {
pdev.set_master();
let bar = pdev.iomap_region_sized::<BAR0_SIZE>(0, c_str!("nova"))?;
+
+ let gpu = Gpu::new(pdev, bar)?;
+ gpu.init()?;
+
let data = Arc::new(
NovaData {
- gpu: Gpu::new(pdev, bar)?,
+ gpu,
pdev: pdev.clone(),
},
GFP_KERNEL,