diff --git a/drivers/gpu/drm/asahi/g17/mod.rs b/drivers/gpu/drm/asahi/g17/mod.rs index a94dc3f87a0dc..06af00c762d86 100644 --- a/drivers/gpu/drm/asahi/g17/mod.rs +++ b/drivers/gpu/drm/asahi/g17/mod.rs @@ -900,8 +900,9 @@ impl Firmware { } /// Both outer slots and their capacity are checked before any host-port - /// write. An EAGAIN retry drops the old views and revalidates them under a - /// power hold. After a successful transaction, publication is infallible. + /// write. The host command port needs no core power, and its transaction + /// fails only once the register mapping is gone; the error propagates. + /// After a successful transaction, publication is infallible. fn submit_m5_render_pair( &mut self, priority: u8, @@ -912,26 +913,12 @@ impl Firmware { deferred: bool, cursors: Option<[u32; 3]>, ) -> Result<[u32; 2]> { - let mut commit_accounting = Some(commit_accounting); - let mut publish_inner = Some(publish_inner); - let mut cursors = cursors; - for attempt in 0..2 { - let pair = self.init.m5_work_pair(priority, &records[0], &records[1], cursors.take())?; - pair.prepare(); - if let Some(commit) = commit_accounting.take() { commit()?; } - match self.bridge.regs.submit_m5_work(submission) { - Err(error) if error == EAGAIN && attempt == 0 => { - drop(pair); - self.acquire_registration_power()?; - } - Err(error) => return Err(error), - Ok(()) => { - if let Some(publish) = publish_inner.take() { publish(); } - return Ok(if deferred { pair.next() } else { pair.publish() }); - } - } - } - Err(EAGAIN) + let pair = self.init.m5_work_pair(priority, &records[0], &records[1], cursors)?; + pair.prepare(); + commit_accounting()?; + self.bridge.regs.submit_m5_work(submission)?; + publish_inner(); + Ok(if deferred { pair.next() } else { pair.publish() }) } /// Called at actual submission publication, not while a queued job is merely being built.