[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250829173254.2068763-16-joelagnelf@nvidia.com>
Date: Fri, 29 Aug 2025 13:32:52 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org,
dakr@...nel.org,
acourbot@...dia.com
Cc: Alistair Popple <apopple@...dia.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
bjorn3_gh@...tonmail.com,
Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>,
David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
John Hubbard <jhubbard@...dia.com>,
Joel Fernandes <joelagnelf@...dia.com>,
Timur Tabi <ttabi@...dia.com>,
joel@...lfernandes.org,
nouveau@...ts.freedesktop.org,
rust-for-linux@...r.kernel.org
Subject: [PATCH 15/17] nova-core: remove unnecessary need_riscv, bar parameters
From: John Hubbard <jhubbard@...dia.com>
The need_riscv parameter and its associated RISCV validation logic are
are actually unnecessary for correct operation. Remove it, along with
the now-unused bar parameter as well.
Signed-off-by: John Hubbard <jhubbard@...dia.com>
---
drivers/gpu/nova-core/falcon.rs | 21 +--------------------
drivers/gpu/nova-core/gpu.rs | 9 ++-------
2 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers/gpu/nova-core/falcon.rs
index 023f9b575a5d..938f25b556a8 100644
--- a/drivers/gpu/nova-core/falcon.rs
+++ b/drivers/gpu/nova-core/falcon.rs
@@ -346,26 +346,7 @@ pub(crate) struct Falcon<E: FalconEngine> {
impl<E: FalconEngine + 'static> Falcon<E> {
/// Create a new falcon instance.
- ///
- /// `need_riscv` is set to `true` if the caller expects the falcon to be a dual falcon/riscv
- /// controller.
- pub(crate) fn new(
- dev: &device::Device,
- chipset: Chipset,
- bar: &Bar0,
- need_riscv: bool,
- ) -> Result<Self> {
- if need_riscv {
- let hwcfg2 = regs::NV_PFALCON_FALCON_HWCFG2::read(bar, &E::ID);
- if !hwcfg2.riscv() {
- dev_err!(
- dev,
- "riscv support requested on a controller that does not support it\n"
- );
- return Err(EINVAL);
- }
- }
-
+ pub(crate) fn new(dev: &device::Device, chipset: Chipset) -> Result<Self> {
Ok(Self {
hal: hal::falcon_hal(chipset)?,
dev: dev.into(),
diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
index bf670f6b6773..c2a9cb32837f 100644
--- a/drivers/gpu/nova-core/gpu.rs
+++ b/drivers/gpu/nova-core/gpu.rs
@@ -287,15 +287,10 @@ pub(crate) fn new(
let sysmem_flush = SysmemFlush::register(pdev.as_ref(), bar, spec.chipset)?;
- let gsp_falcon = Falcon::<Gsp>::new(
- pdev.as_ref(),
- spec.chipset,
- bar,
- spec.chipset > Chipset::GA100,
- )?;
+ let gsp_falcon = Falcon::<Gsp>::new(pdev.as_ref(), spec.chipset)?;
gsp_falcon.clear_swgen0_intr(bar);
- let sec2_falcon = Falcon::<Sec2>::new(pdev.as_ref(), spec.chipset, bar, true)?;
+ let sec2_falcon = Falcon::<Sec2>::new(pdev.as_ref(), spec.chipset)?;
let fw = Firmware::new(
pdev.as_ref(),
--
2.34.1
Powered by blists - more mailing lists