drm/amdgpu: Fix size calculation when init onchip memory

Size is page count here.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1372
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>
(cherry picked from commit d836917da7)
[airlied: from drm-next]
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
xinhui pan 2020-10-23 13:41:12 +08:00 committed by Dave Airlie
parent 418baf2c28
commit 030c5b52d4

View File

@ -69,10 +69,10 @@ static int amdgpu_ttm_backend_bind(struct ttm_bo_device *bdev,
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,
false, size >> PAGE_SHIFT);
false, size_in_page);
}
/**