From: Danilo Krummrich Date: Thu, 24 Apr 2025 16:02:49 +0000 (+0200) Subject: gpu: nova-core: register auxiliary device for nova-drm X-Git-Tag: v6.16-rc1~144^2~3^2~14 X-Git-Url: https://gentwo.org/gitweb/?a=commitdiff_plain;h=e041d81a03777702249f8de16db70fdabdd1ab5f;p=linux%2F.git gpu: nova-core: register auxiliary device for nova-drm Register an auxiliary device for nova-drm. For now always use zero for the auxiliary device's ID; we don't use it yet anyways. However, once it lands, we should switch to XArray. Acked-by: Dave Airlie Link: https://lore.kernel.org/r/20250424160452.8070-2-dakr@kernel.org Signed-off-by: Danilo Krummrich --- diff --git a/drivers/gpu/nova-core/Kconfig b/drivers/gpu/nova-core/Kconfig index ad0c06756516..67f99b6a023a 100644 --- a/drivers/gpu/nova-core/Kconfig +++ b/drivers/gpu/nova-core/Kconfig @@ -1,5 +1,6 @@ config NOVA_CORE tristate "Nova Core GPU driver" + depends on AUXILIARY_BUS depends on PCI depends on RUST depends on RUST_FW_LOADER_ABSTRACTIONS diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs index a08fb6599267..8c86101c26cb 100644 --- a/drivers/gpu/nova-core/driver.rs +++ b/drivers/gpu/nova-core/driver.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 -use kernel::{bindings, c_str, device::Core, pci, prelude::*}; +use kernel::{auxiliary, bindings, c_str, device::Core, pci, prelude::*}; use crate::gpu::Gpu; @@ -8,6 +8,7 @@ pub(crate) struct NovaCore { #[pin] pub(crate) gpu: Gpu, + _reg: auxiliary::Registration, } const BAR0_SIZE: usize = 8; @@ -38,6 +39,12 @@ fn probe(pdev: &pci::Device, _info: &Self::IdInfo) -> Result::NAME; + kernel::module_pci_driver! { type: driver::NovaCore, name: "NovaCore",