Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpu: nova-core: move brom_params and boot_addr to FalconFirmware

These methods are relevant no matter the loading method used, thus move
them to the common `FalconFirmware` trait.

Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260306-turing_prep-v11-5-8f0042c5d026@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

+14 -14
+6 -6
drivers/gpu/nova-core/falcon.rs
··· 367 367 368 368 /// Returns the load parameters for `DMEM`. 369 369 fn dmem_load_params(&self) -> FalconDmaLoadTarget; 370 - 371 - /// Returns the parameters to write into the BROM registers. 372 - fn brom_params(&self) -> FalconBromParams; 373 - 374 - /// Returns the start address of the firmware. 375 - fn boot_addr(&self) -> u32; 376 370 } 377 371 378 372 /// Trait for a falcon firmware. ··· 375 381 pub(crate) trait FalconFirmware { 376 382 /// Engine on which this firmware is to be loaded. 377 383 type Target: FalconEngine; 384 + 385 + /// Returns the parameters to write into the BROM registers. 386 + fn brom_params(&self) -> FalconBromParams; 387 + 388 + /// Returns the start address of the firmware. 389 + fn boot_addr(&self) -> u32; 378 390 } 379 391 380 392 /// Contains the base parameters common to all Falcon instances.
+4 -4
drivers/gpu/nova-core/firmware/booter.rs
··· 414 414 fn dmem_load_params(&self) -> FalconDmaLoadTarget { 415 415 self.dmem_load_target.clone() 416 416 } 417 + } 418 + 419 + impl FalconFirmware for BooterFirmware { 420 + type Target = Sec2; 417 421 418 422 fn brom_params(&self) -> FalconBromParams { 419 423 self.brom_params.clone() ··· 430 426 self.imem_sec_load_target.src_start 431 427 } 432 428 } 433 - } 434 - 435 - impl FalconFirmware for BooterFirmware { 436 - type Target = Sec2; 437 429 }
+4 -4
drivers/gpu/nova-core/firmware/fwsec.rs
··· 196 196 fn dmem_load_params(&self) -> FalconDmaLoadTarget { 197 197 self.desc.dmem_load_params() 198 198 } 199 + } 200 + 201 + impl FalconFirmware for FwsecFirmware { 202 + type Target = Gsp; 199 203 200 204 fn brom_params(&self) -> FalconBromParams { 201 205 FalconBromParams { ··· 212 208 fn boot_addr(&self) -> u32 { 213 209 0 214 210 } 215 - } 216 - 217 - impl FalconFirmware for FwsecFirmware { 218 - type Target = Gsp; 219 211 } 220 212 221 213 impl FirmwareObject<FwsecFirmware, Unsigned> {