[PATCH] drm/amdgpu: Fix size calculation when init onchip memory

Christian König christian.koenig at amd.com
Fri Oct 23 07:12:31 UTC 2020


Am 23.10.20 um 07:41 schrieb xinhui pan:
> Size is page count here.
>
> Signed-off-by: xinhui pan <xinhui.pan at amd.com>

Ah yes that one again. At some point we really need to clean that up.

Patch is Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++--
>   1 file 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);
>   }
>   
>   /**



More information about the amd-gfx mailing list