[PATCH] gpu: nova-core: write initial RPCs before booting GSP-RM
Timur Tabi <[email protected]>
| Newsgroups | dev.linux.lists.nova-gpu |
|---|---|
| Message-ID | <[email protected]> |
Make sure that the two setup RPCs, SetSystemInfo and SetRegistry, are in
the command queue before booting GSP-RM. These message are expected to
already be present, because GSP-RM will process the queue early in boot
but will silently ignore the error if absent. GSP-RM then continues
booting, but since the registry is not set up, it fails to initialize.
Fixes: 0e42ec83d46a ("gpu: nova-core: gsp: shuffle boot code a bit to keep chipset-specific parts close")
Signed-off-by: Timur Tabi <[email protected]>
Reviewed-by: Alexandre Courbot <[email protected]>
Reviewed-by: John Hubbard <[email protected]>
---
drivers/gpu/nova-core/gsp/boot.rs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/nova-core/gsp/boot.rs b/drivers/gpu/nova-core/gsp/boot.rs
index e03700ee7bea..874f6e9499f0 100644
--- a/drivers/gpu/nova-core/gsp/boot.rs
+++ b/drivers/gpu/nova-core/gsp/boot.rs
@@ -44,6 +44,11 @@ pub(crate) fn boot(
let gsp_fw = KBox::pin_init(GspFirmware::new(dev, chipset), GFP_KERNEL)?;
+ self.cmdq
+ .send_command_no_wait(bar, commands::SetSystemInfo::new(pdev, chipset))?;
+ self.cmdq
+ .send_command_no_wait(bar, commands::SetRegistry::new(ctx.vgpu.state())?)?;
+
// Perform the chipset-specific boot sequence, and retrieve the unload bundle.
let unload_bundle = hal.boot(&self, &mut ctx, &gsp_fw)?.or_else(|| {
dev_warn!(dev, "The GSP won't be able to unload properly on unbind.\n");
@@ -73,11 +78,6 @@ pub(crate) fn boot(
dev_dbg!(pdev, "RISC-V active? {}\n", gsp_falcon.is_riscv_active(),);
- self.cmdq
- .send_command_no_wait(bar, commands::SetSystemInfo::new(pdev, chipset))?;
- self.cmdq
- .send_command_no_wait(bar, commands::SetRegistry::new(ctx.vgpu.state())?)?;
-
hal.post_boot(&self, ctx, &gsp_fw)?;
// Wait until GSP is fully initialized.
--
2.54.0