Skip to content

Commit 78ceecd

Browse files
Nirmoy Dasgregkh
authored andcommitted
drm/amdgpu: fix offset calculation in amdgpu_vm_bo_clear_mappings()
commit 5e61b84 upstream. Offset calculation wasn't correct as start addresses are in pfn not in bytes. CC: stable@vger.kernel.org Signed-off-by: Nirmoy Das <nirmoy.das@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 28f901f commit 78ceecd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2435,7 +2435,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
24352435
after->start = eaddr + 1;
24362436
after->last = tmp->last;
24372437
after->offset = tmp->offset;
2438-
after->offset += after->start - tmp->start;
2438+
after->offset += (after->start - tmp->start) << PAGE_SHIFT;
24392439
after->flags = tmp->flags;
24402440
after->bo_va = tmp->bo_va;
24412441
list_add(&after->list, &tmp->bo_va->invalids);

0 commit comments

Comments
 (0)