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:
@@ -65,11 +65,11 @@
|
|||||||
|
|
||||||
static int amdgpu_ttm_init_on_chip(struct amdgpu_device *adev,
|
static int amdgpu_ttm_init_on_chip(struct amdgpu_device *adev,
|
||||||
unsigned int type,
|
unsigned int type,
|
||||||
uint64_t size)
|
uint64_t size_in_page)
|
||||||
{
|
{
|
||||||
return ttm_range_man_init(&adev->mman.bdev, type,
|
return ttm_range_man_init(&adev->mman.bdev, type,
|
||||||
TTM_PL_FLAG_UNCACHED, TTM_PL_FLAG_UNCACHED,
|
TTM_PL_FLAG_UNCACHED, TTM_PL_FLAG_UNCACHED,
|
||||||
false, size >> PAGE_SHIFT);
|
false, size_in_page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user