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>
This commit is contained in:
xinhui pan 2020-10-23 13:41:12 +08:00 committed by Alex Deucher
parent 4d154b85f3
commit d836917da7

View File

@ -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);
}
/**