Skip to content

Commit 030c5b5

Browse files
xinhui panairlied
authored andcommitted
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 d836917) [airlied: from drm-next] Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent 418baf2 commit 030c5b5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ static int amdgpu_ttm_backend_bind(struct ttm_bo_device *bdev,
6969

7070
static int amdgpu_ttm_init_on_chip(struct amdgpu_device *adev,
7171
unsigned int type,
72-
uint64_t size)
72+
uint64_t size_in_page)
7373
{
7474
return ttm_range_man_init(&adev->mman.bdev, type,
75-
false, size >> PAGE_SHIFT);
75+
false, size_in_page);
7676
}
7777

7878
/**

0 commit comments

Comments
 (0)