From: John Hubbard <jhubb...@nvidia.com> Otherwise, you'll never reach Riscv==true, much less GSP's INIT_DONE message.
This is how Nouveau does it. Signed-off-by: John Hubbard <jhubb...@nvidia.com> --- drivers/gpu/nova-core/falcon.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers/gpu/nova-core/falcon.rs index 7fbf909cae08..05bde1f161ea 100644 --- a/drivers/gpu/nova-core/falcon.rs +++ b/drivers/gpu/nova-core/falcon.rs @@ -385,7 +385,11 @@ pub(crate) fn dma_reset(&self, bar: &Bar0) { /// Wait for memory scrubbing to complete. fn reset_wait_mem_scrubbing(&self, bar: &Bar0) -> Result { - // TIMEOUT: memory scrubbing should complete in less than 20ms. + // Clear MAILBOX0 before waiting for memory scrubbing + regs::NV_PFALCON_FALCON_MAILBOX0::default() + .set_value(0) + .write(bar, &E::ID); + util::wait_on(Delta::from_millis(20), || { if regs::NV_PFALCON_FALCON_HWCFG2::read(bar, &E::ID).mem_scrubbing_done() { Some(()) -- 2.34.1