mirror of
https://github.com/torvalds/linux.git
synced 2026-11-09 13:44:03 +01:00
drm/amdgpu: Fix NPA BO memory accounting stats during import invalidation
Use amdgpu_vm_bo_move() for updating the NPA BO memory accounting stats when the NPA BO is moved out from NPA domain into an empty placement. Without this, when the app finishes, it spits out a warning: "VM memory stats for proc .. task .. is non-zero when fini" This was only affecting the memory accounting stats, we were not leaking any memory here. Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Acked-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c4d9c64c11
commit
222627765a
|
|
@ -3056,12 +3056,7 @@ static void amdgpu_ualink_invalidate_import_mappings(struct amdgpu_bo *bo)
|
|||
}
|
||||
}
|
||||
|
||||
/* FIXME: This should be after the "if", but needs a fix to make sure
|
||||
* DMABuf imports are initialized in the right VM list.
|
||||
*/
|
||||
amdgpu_vm_bo_invalidate(bo, false);
|
||||
if (!bo->tbo.resource || bo->tbo.resource->mem_type == TTM_PL_SYSTEM)
|
||||
goto fini;
|
||||
amdgpu_vm_bo_move(bo, NULL, false);
|
||||
|
||||
r = ttm_bo_validate(&bo->tbo, &placement, &ctx);
|
||||
if (r) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user