diff options
| author | Ma Jun <[email protected]> | 2022-09-14 12:53:31 +0000 |
|---|---|---|
| committer | Christian König <[email protected]> | 2022-11-08 13:00:18 +0000 |
| commit | e0b26b9482461e9528552f54fa662c2269f75b3f (patch) | |
| tree | 47e28e3d5546f9f3028526fed07d24bca49ad4d5 /drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | |
| parent | drm: panel-orientation-quirks: Add quirk for Acer Switch V 10 (SW5-017) (diff) | |
| download | kernel-e0b26b9482461e9528552f54fa662c2269f75b3f.tar.gz kernel-e0b26b9482461e9528552f54fa662c2269f75b3f.zip | |
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]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c index 73a517bcf5c1..80dd1343594c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c @@ -435,7 +435,7 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man, if (place->flags & TTM_PL_FLAG_TOPDOWN) vres->flags |= DRM_BUDDY_TOPDOWN_ALLOCATION; - if (fpfn || lpfn != man->size) + if (fpfn || lpfn != mgr->mm.size) /* Allocate blocks in desired range */ vres->flags |= DRM_BUDDY_RANGE_ALLOCATION; |
