Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions drivers/gpu/drm/asahi/g16/pools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ pub(crate) struct Pools {
pending_arenas: [Option<super::resources::PbOwnerArena>; sizes::PB_SLOTS],
pending_uma: [Option<Arc<FwLease>>; sizes::PB_SLOTS],
/// Per allocator slot, a binding count, bumped by each fresh epoch (its InitBM rebinds the
/// slot) and by a firmware recovery. It identifies a binding without holding the epoch.
/// slot) and by a firmware recovery or sleep restart. It identifies a binding without
/// holding the epoch.
binds: [u64; sizes::PB_SLOTS],
/// Per allocator slot: `owners[k]` may serve the next render of its VM without InitBM.
keep: [bool; sizes::PB_SLOTS],
Expand Down Expand Up @@ -1062,7 +1063,8 @@ impl Pools {
*binds
}
/// A render on slot `k` with `binding` retired, after its `retire_binding`. If no other
/// epoch was bound and no recovery started since, the next render of the same VM may reuse
/// epoch was bound and no recovery or sleep restart happened since, the next render of the
/// same VM may reuse
/// its epoch after a `completed` render; after a failed one it starts fresh.
pub(crate) fn retire_epoch(&mut self, k: usize, binding: u64, completed: bool) {
if self.binds.get(k) == Some(&binding) {
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/asahi/g16/sleep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ impl Firmware {

/// The run bit and the RTKit handshake, with the firmware's state as it was left.
fn sleep_restart(&mut self) -> Result {
// Start the next render on each pass slot fresh after the firmware restarts.
self.pools.invalidate();
self.session.rtkit.warm_restart()?;
let control = self.session.regs.asc_control()?;
self.session.regs.set_asc_control(control | ASC_RUN)?;
Expand Down
Loading