* [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv
@ 2025-10-25 1:40 John Hubbard
2025-10-25 1:40 ` [PATCH 1/2] nova-core: remove an unnecessary register read: HWCFG1 John Hubbard
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: John Hubbard @ 2025-10-25 1:40 UTC (permalink / raw)
To: Danilo Krummrich
Cc: Alexandre Courbot, Joel Fernandes, Timur Tabi, Alistair Popple,
Edwin Peer, Zhi Wang, David Airlie, Simona Vetter, Bjorn Helgaas,
Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, nouveau, rust-for-linux, LKML, John Hubbard
The second patch builds upon the first one. The series applies cleanly
to today's drm-rust-next.
The first patch is identical to what I sent out as a single patch just
now in [1], because I forgot at the time that they should go together as a
tiny patchset.
[1] https://lore.kernel.org/20251025012409.577596-1-jhubbard@nvidia.com
John Hubbard (2):
nova-core: remove an unnecessary register read: HWCFG1
nova-core: remove unnecessary need_riscv, bar parameters
drivers/gpu/nova-core/falcon.rs | 26 +-------------------------
drivers/gpu/nova-core/gpu.rs | 4 +---
2 files changed, 2 insertions(+), 28 deletions(-)
base-commit: d3917368ebc5cd89d7d08eab4673e5c4c73ff42f
--
2.51.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] nova-core: remove an unnecessary register read: HWCFG1
2025-10-25 1:40 [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv John Hubbard
@ 2025-10-25 1:40 ` John Hubbard
2025-10-25 1:40 ` [PATCH 2/2] nova-core: remove unnecessary need_riscv, bar parameters John Hubbard
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: John Hubbard @ 2025-10-25 1:40 UTC (permalink / raw)
To: Danilo Krummrich
Cc: Alexandre Courbot, Joel Fernandes, Timur Tabi, Alistair Popple,
Edwin Peer, Zhi Wang, David Airlie, Simona Vetter, Bjorn Helgaas,
Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, nouveau, rust-for-linux, LKML, John Hubbard
This register read is not required in order to bring up any of the GPUs,
and it is read too early on Hopper/Blackwell+ GPUs anyway. So just stop
doing this.
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
drivers/gpu/nova-core/falcon.rs | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers/gpu/nova-core/falcon.rs
index 3f505b870601..ac55cbc5ac1e 100644
--- a/drivers/gpu/nova-core/falcon.rs
+++ b/drivers/gpu/nova-core/falcon.rs
@@ -371,11 +371,6 @@ pub(crate) fn new(
bar: &Bar0,
need_riscv: bool,
) -> Result<Self> {
- let hwcfg1 = regs::NV_PFALCON_FALCON_HWCFG1::read(bar, &E::ID);
- // Check that the revision and security model contain valid values.
- let _ = hwcfg1.core_rev()?;
- let _ = hwcfg1.security_model()?;
-
if need_riscv {
let hwcfg2 = regs::NV_PFALCON_FALCON_HWCFG2::read(bar, &E::ID);
if !hwcfg2.riscv() {
--
2.51.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] nova-core: remove unnecessary need_riscv, bar parameters
2025-10-25 1:40 [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv John Hubbard
2025-10-25 1:40 ` [PATCH 1/2] nova-core: remove an unnecessary register read: HWCFG1 John Hubbard
@ 2025-10-25 1:40 ` John Hubbard
2025-10-25 4:04 ` [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv Alexandre Courbot
2025-10-30 11:10 ` Danilo Krummrich
3 siblings, 0 replies; 5+ messages in thread
From: John Hubbard @ 2025-10-25 1:40 UTC (permalink / raw)
To: Danilo Krummrich
Cc: Alexandre Courbot, Joel Fernandes, Timur Tabi, Alistair Popple,
Edwin Peer, Zhi Wang, David Airlie, Simona Vetter, Bjorn Helgaas,
Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, nouveau, rust-for-linux, LKML, John Hubbard
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@nvidia.com>
---
drivers/gpu/nova-core/falcon.rs | 21 +--------------------
drivers/gpu/nova-core/gpu.rs | 4 +---
2 files changed, 2 insertions(+), 23 deletions(-)
diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers/gpu/nova-core/falcon.rs
index ac55cbc5ac1e..d745afacfc40 100644
--- a/drivers/gpu/nova-core/falcon.rs
+++ b/drivers/gpu/nova-core/falcon.rs
@@ -362,26 +362,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 af20e2daea24..9d182bffe8b4 100644
--- a/drivers/gpu/nova-core/gpu.rs
+++ b/drivers/gpu/nova-core/gpu.rs
@@ -213,12 +213,10 @@ pub(crate) fn new<'a>(
gsp_falcon: Falcon::new(
pdev.as_ref(),
spec.chipset,
- bar,
- spec.chipset > Chipset::GA100,
)
.inspect(|falcon| falcon.clear_swgen0_intr(bar))?,
- sec2_falcon: Falcon::new(pdev.as_ref(), spec.chipset, bar, true)?,
+ sec2_falcon: Falcon::new(pdev.as_ref(), spec.chipset)?,
gsp <- Gsp::new(),
--
2.51.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv
2025-10-25 1:40 [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv John Hubbard
2025-10-25 1:40 ` [PATCH 1/2] nova-core: remove an unnecessary register read: HWCFG1 John Hubbard
2025-10-25 1:40 ` [PATCH 2/2] nova-core: remove unnecessary need_riscv, bar parameters John Hubbard
@ 2025-10-25 4:04 ` Alexandre Courbot
2025-10-30 11:10 ` Danilo Krummrich
3 siblings, 0 replies; 5+ messages in thread
From: Alexandre Courbot @ 2025-10-25 4:04 UTC (permalink / raw)
To: John Hubbard, Danilo Krummrich
Cc: Alexandre Courbot, Joel Fernandes, Timur Tabi, Alistair Popple,
Edwin Peer, Zhi Wang, David Airlie, Simona Vetter, Bjorn Helgaas,
Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, nouveau, rust-for-linux, LKML
On Sat Oct 25, 2025 at 10:40 AM JST, John Hubbard wrote:
> The second patch builds upon the first one. The series applies cleanly
> to today's drm-rust-next.
>
> The first patch is identical to what I sent out as a single patch just
> now in [1], because I forgot at the time that they should go together as a
> tiny patchset.
>
> [1] https://lore.kernel.org/20251025012409.577596-1-jhubbard@nvidia.com
Thanks! This is pretty uncontroversial, so planning to merge this
quickly.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv
2025-10-25 1:40 [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv John Hubbard
` (2 preceding siblings ...)
2025-10-25 4:04 ` [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv Alexandre Courbot
@ 2025-10-30 11:10 ` Danilo Krummrich
3 siblings, 0 replies; 5+ messages in thread
From: Danilo Krummrich @ 2025-10-30 11:10 UTC (permalink / raw)
To: John Hubbard
Cc: Alexandre Courbot, Joel Fernandes, Timur Tabi, Alistair Popple,
Edwin Peer, Zhi Wang, David Airlie, Simona Vetter, Bjorn Helgaas,
Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, nouveau, rust-for-linux, LKML
On 10/25/25 3:40 AM, John Hubbard wrote:
> John Hubbard (2):
> nova-core: remove an unnecessary register read: HWCFG1
> nova-core: remove unnecessary need_riscv, bar parameters
Acked-by: Danilo Krummrich <dakr@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-10-30 11:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-25 1:40 [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv John Hubbard
2025-10-25 1:40 ` [PATCH 1/2] nova-core: remove an unnecessary register read: HWCFG1 John Hubbard
2025-10-25 1:40 ` [PATCH 2/2] nova-core: remove unnecessary need_riscv, bar parameters John Hubbard
2025-10-25 4:04 ` [PATCH 0/2] nova-core: remove HWCFG1 and need_riscv Alexandre Courbot
2025-10-30 11:10 ` Danilo Krummrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).