summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
diff options
context:
space:
mode:
authorxinhui pan <xinhui.pan@amd.com>2020-10-23 07:41:12 +0200
committerAlex Deucher <alexander.deucher@amd.com>2020-10-23 21:40:46 +0200
commitd836917da7e5ca9b33ef4d499972f1feeb519e00 (patch)
tree71ebdfaebf461583f9da2999429a355e69942b71 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
parentdrm/amdgpu_dm: fix a typo (diff)
downloadlinux-d836917da7e5ca9b33ef4d499972f1feeb519e00.tar.xz
linux-d836917da7e5ca9b33ef4d499972f1feeb519e00.zip
drm/amdgpu: Fix size calculation when init onchip memory
Size is page count here. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: xinhui pan <xinhui.pan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 4a85f8cedd77..11dd3d9eac15 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -65,11 +65,11 @@
static int amdgpu_ttm_init_on_chip(struct amdgpu_device *adev,
unsigned int type,
- uint64_t size)
+ uint64_t size_in_page)
{
return ttm_range_man_init(&adev->mman.bdev, type,
TTM_PL_FLAG_UNCACHED, TTM_PL_FLAG_UNCACHED,
- false, size >> PAGE_SHIFT);
+ false, size_in_page);
}
/**