Skip to content
Closed
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
3 changes: 3 additions & 0 deletions drivers/gpu/drm/asahi/mmu.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// SPDX-License-Identifier: GPL-2.0-only OR MIT

//! GPU UAT (MMU) management
Expand Down Expand Up @@ -2848,6 +2848,9 @@
// unmap error. Always release reservations before dropping it.
core::mem::drop(vm_exec);
core::mem::drop(bo);
// The unlinked VM BO waits on the deferred list and still holds the GEM.
// Free it now so the closed GEM and its admission charge go with the handle.
self.bo_deferred_cleanup();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This drains every deferred VM BO on the VM, not just the closing GEM's (drm_gpuvm.c:1799). Each one drops its SG lease (mmu.rs:456-460), and nothing here shows the GPU has retired them. That's the gap the upstream revert points at.

— Marcelo's agent

if result == Err(ENOMEM) {
return self.drop_mappings_low_memory(gem);
}
Expand Down