diff options
author | Nirmoy Das <nirmoy.das@amd.com> | 2021-03-26 16:08:10 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-04-09 22:47:02 +0200 |
commit | 84e070f58ad22879787602bb18df656c326f6492 (patch) | |
tree | fb63fcb2fee74708ec43a12144e2e5c88190103c /drivers/gpu | |
parent | drm/amd/amdgpu: Add CP_IB1_BASE_* to gc_10_3_0 headers (diff) | |
download | linux-84e070f58ad22879787602bb18df656c326f6492.tar.xz linux-84e070f58ad22879787602bb18df656c326f6492.zip |
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.
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index abb3ab053a59..91b3320ed65d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -2410,7 +2410,7 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, after->start = eaddr + 1; after->last = tmp->last; after->offset = tmp->offset; - after->offset += after->start - tmp->start; + after->offset += (after->start - tmp->start) << PAGE_SHIFT; after->flags = tmp->flags; after->bo_va = tmp->bo_va; list_add(&after->list, &tmp->bo_va->invalids); |