diff options
author | Christian König <christian.koenig@amd.com> | 2018-08-27 12:22:31 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-10 23:41:24 -0400 |
commit | ad9a5b78f585e9a9bd5ad06dfaf1269659a99f43 (patch) | |
tree | 3353b464a93fb9c6a0531a77815f3f838ae4b7f5 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | bcdc9fd634d1f0949774690e9e79ffdfc5d094c8 (diff) |
drm/amdgpu: correctly sign extend 48bit addresses v3
Correct sign extend the GMC addresses to 48bit.
v2: sign extending turned out easier than thought.
v3: clean up the defines and move them into amdgpu_gmc.h as well
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index b5f20b42439e..0cbf651a88a6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |||
@@ -1368,7 +1368,7 @@ u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo) | |||
1368 | WARN_ON_ONCE(bo->tbo.mem.mem_type == TTM_PL_VRAM && | 1368 | WARN_ON_ONCE(bo->tbo.mem.mem_type == TTM_PL_VRAM && |
1369 | !(bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)); | 1369 | !(bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)); |
1370 | 1370 | ||
1371 | return bo->tbo.offset; | 1371 | return amdgpu_gmc_sign_extend(bo->tbo.offset); |
1372 | } | 1372 | } |
1373 | 1373 | ||
1374 | /** | 1374 | /** |