Skip to content

Commit e0b26b9

Browse files
Ma JunChristianKoenigAMD
authored andcommitted
drm/amdgpu: Fix the lpfn checking condition in drm buddy
Because the value of man->size is changed during suspend/resume process, use mgr->mm.size instead of man->size here for lpfn checking. Signed-off-by: Ma Jun <[email protected]> Suggested-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
1 parent 653f2d9 commit e0b26b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,
435435
if (place->flags & TTM_PL_FLAG_TOPDOWN)
436436
vres->flags |= DRM_BUDDY_TOPDOWN_ALLOCATION;
437437

438-
if (fpfn || lpfn != man->size)
438+
if (fpfn || lpfn != mgr->mm.size)
439439
/* Allocate blocks in desired range */
440440
vres->flags |= DRM_BUDDY_RANGE_ALLOCATION;
441441

0 commit comments

Comments
 (0)