Danilo Krummrich
2025-Sep-02 23:12 UTC
[PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor
On 9/2/25 4:31 PM, Alexandre Courbot wrote:> pub(crate) fn new( > pdev: &pci::Device<device::Bound>, > devres_bar: Arc<Devres<Bar0>>,The diff is hiding it, but with this patch we should also make sure that this returns impl PinInit<Self, Error> rather than Result<impl PinInit<Self>. I think this should be possible now.> @@ -293,20 +317,15 @@ pub(crate) fn new( > )?; > gsp_falcon.clear_swgen0_intr(bar); > > - let _sec2_falcon = Falcon::<Sec2>::new(pdev.as_ref(), spec.chipset, bar, true)?; > - > - let fb_layout = FbLayout::new(spec.chipset, bar)?; > - dev_dbg!(pdev.as_ref(), "{:#x?}\n", fb_layout); > - > - let bios = Vbios::new(pdev.as_ref(), bar)?; > - > - Self::run_fwsec_frts(pdev.as_ref(), &gsp_falcon, bar, &bios, &fb_layout)?; > + let sec2_falcon = Falcon::<Sec2>::new(pdev.as_ref(), spec.chipset, bar, true)?; > > Ok(pin_init!(Self { > spec, > bar: devres_bar, > fw, > sysmem_flush, > + gsp_falcon, > + sec2_falcon, > })) > } > } >
Alexandre Courbot
2025-Sep-03 07:10 UTC
[PATCH v3 02/11] gpu: nova-core: move GSP boot code out of `Gpu` constructor
On Wed Sep 3, 2025 at 8:12 AM JST, Danilo Krummrich wrote:> On 9/2/25 4:31 PM, Alexandre Courbot wrote: >> pub(crate) fn new( >> pdev: &pci::Device<device::Bound>, >> devres_bar: Arc<Devres<Bar0>>, > > The diff is hiding it, but with this patch we should also make sure that this > returns impl PinInit<Self, Error> rather than Result<impl PinInit<Self>. > > I think this should be possible now.There is still code that can return errors (falcon creation, etc) - do you mean that we should move it into the pin initializer and turn it into a `try_pin_init`?