Skip to content

Commit 10ef476

Browse files
YiPeng Chaialexdeucher
authored andcommitted
drm/amdgpu: fix vram reservation issue
The vram block allocation flag must be cleared before making vram reservation, otherwise reserving addresses within the currently freed memory range will always fail. Fixes: c9cad93 ("drm/amdgpu: add drm buddy support to amdgpu") Signed-off-by: YiPeng Chai <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit d38eaf2)
1 parent e67b8af commit 10ef476

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,8 @@ static void amdgpu_vram_mgr_del(struct ttm_resource_manager *man,
648648
list_for_each_entry(block, &vres->blocks, link)
649649
vis_usage += amdgpu_vram_mgr_vis_size(adev, block);
650650

651-
amdgpu_vram_mgr_do_reserve(man);
652-
653651
drm_buddy_free_list(mm, &vres->blocks, vres->flags);
652+
amdgpu_vram_mgr_do_reserve(man);
654653
mutex_unlock(&mgr->lock);
655654

656655
atomic64_sub(vis_usage, &mgr->vis_usage);

0 commit comments

Comments
 (0)