diff options
-rw-r--r-- | drivers/gpu/drm/nova/Makefile | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nova/bios.rs | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nova/driver.rs (renamed from drivers/gpu/drm/nova/nova_drv.rs) | 21 | ||||
-rw-r--r-- | drivers/gpu/drm/nova/gpu.rs | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nova/nova.rs | 20 |
5 files changed, 27 insertions, 20 deletions
diff --git a/drivers/gpu/drm/nova/Makefile b/drivers/gpu/drm/nova/Makefile index 6fbb32893ecc..42019bff3173 100644 --- a/drivers/gpu/drm/nova/Makefile +++ b/drivers/gpu/drm/nova/Makefile @@ -1,3 +1,3 @@ -nova-y += nova_drv.o +# SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_DRM_NOVA) += nova.o diff --git a/drivers/gpu/drm/nova/bios.rs b/drivers/gpu/drm/nova/bios.rs index f5b9db2bc9fc..5a6f5df08c4d 100644 --- a/drivers/gpu/drm/nova/bios.rs +++ b/drivers/gpu/drm/nova/bios.rs @@ -3,7 +3,7 @@ use kernel::io_mem::IoMem; use kernel::prelude::*; use alloc::vec::Vec; -use crate::BAR_SIZE; +use crate::driver::BAR_SIZE; use crate::fwsec::FalconUCodeDescV3; diff --git a/drivers/gpu/drm/nova/nova_drv.rs b/drivers/gpu/drm/nova/driver.rs index c2bf7be4dd0b..33abf2545994 100644 --- a/drivers/gpu/drm/nova/nova_drv.rs +++ b/drivers/gpu/drm/nova/driver.rs @@ -1,10 +1,4 @@ -//! Nova GPU Driver -mod gpu; -mod bios; -mod fwsec; - -use crate::gpu::CardType; use alloc::boxed::Box; use core::{ format_args, @@ -20,7 +14,9 @@ use kernel::{ prelude::*, }; -use gpu::Gpu; +use crate::gpu::Gpu; +use crate::gpu::CardType; + struct NovaDevice; /// BAR Size @@ -71,7 +67,7 @@ impl pci::Driver for NovaDevice { } } -struct NovaModule { +pub(crate) struct NovaModule { _registration: Pin<Box<driver::Registration<pci::Adapter<NovaDevice>>>>, } @@ -88,12 +84,3 @@ impl kernel::Module for NovaModule { } } -module! { - type: NovaModule, - name: "Nova", - author: "Danilo Krummrich", - description: "Nova GPU driver", - license: "GPL v2", - params: { - }, -} diff --git a/drivers/gpu/drm/nova/gpu.rs b/drivers/gpu/drm/nova/gpu.rs index 382303866cd3..d3f1890953b1 100644 --- a/drivers/gpu/drm/nova/gpu.rs +++ b/drivers/gpu/drm/nova/gpu.rs @@ -9,7 +9,7 @@ use kernel::{ use crate::bios::*; -use crate::BAR_SIZE; +use crate::driver::BAR_SIZE; pub(crate) enum CardType { TU100 = 0x160, diff --git a/drivers/gpu/drm/nova/nova.rs b/drivers/gpu/drm/nova/nova.rs new file mode 100644 index 000000000000..0289fce7d2d5 --- /dev/null +++ b/drivers/gpu/drm/nova/nova.rs @@ -0,0 +1,20 @@ +//! Nova GPU Driver + +mod driver; +mod bios; +mod fwsec; +mod gpu; + +use kernel::prelude::module; + +use driver::NovaModule; + +module! { + type: NovaModule, + name: "Nova", + author: "Danilo Krummrich", + description: "Nova GPU driver", + license: "GPL v2", + params: { + }, +} |