diff options
author | Tao Zhou <tao.zhou1@amd.com> | 2022-01-30 08:17:32 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-02-08 00:01:16 +0100 |
commit | 4e781873fa1359c9a85559b6da6548ac5b07ceb5 (patch) | |
tree | 4c6788141568938eceed1564205762426e66a1e6 /drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | |
parent | Revert "drm/amdgpu: Add judgement to avoid infinite loop" (diff) | |
download | linux-4e781873fa1359c9a85559b6da6548ac5b07ceb5.tar.xz linux-4e781873fa1359c9a85559b6da6548ac5b07ceb5.zip |
drm/amdgpu: fix list add issue in vram reserve
The parameter order in the list_add_tail is incorrect, it causes the
reuse of ras reserved page.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
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 7a2b487db57c..6c99ef700cc8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c @@ -281,7 +281,7 @@ int amdgpu_vram_mgr_reserve_range(struct amdgpu_vram_mgr *mgr, rsv->mm_node.size = size >> PAGE_SHIFT; spin_lock(&mgr->lock); - list_add_tail(&mgr->reservations_pending, &rsv->node); + list_add_tail(&rsv->node, &mgr->reservations_pending); amdgpu_vram_mgr_do_reserve(&mgr->manager); spin_unlock(&mgr->lock); |