Commit 5e61b84f authored by Nirmoy Das's avatar Nirmoy Das Committed by Alex Deucher

drm/amdgpu: fix offset calculation in amdgpu_vm_bo_clear_mappings()

Offset calculation wasn't correct as start addresses are in pfn
not in bytes.

CC: stable@vger.kernel.org
Signed-off-by: default avatarNirmoy Das <nirmoy.das@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent acc7baaf
...@@ -2409,7 +2409,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, ...@@ -2409,7 +2409,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
after->start = eaddr + 1; after->start = eaddr + 1;
after->last = tmp->last; after->last = tmp->last;
after->offset = tmp->offset; after->offset = tmp->offset;
after->offset += after->start - tmp->start; after->offset += (after->start - tmp->start) << PAGE_SHIFT;
after->flags = tmp->flags; after->flags = tmp->flags;
after->bo_va = tmp->bo_va; after->bo_va = tmp->bo_va;
list_add(&after->list, &tmp->bo_va->invalids); list_add(&after->list, &tmp->bo_va->invalids);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment