[PATCH] drm/amdgpu/ras: use GPU PAGE_SIZE/SHIFT for reserving pages
Zhou1, Tao
Tao.Zhou1 at amd.com
Tue Sep 17 02:58:53 UTC 2019
Reviewed-by: Tao Zhou <tao.zhou1 at amd.com>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex
> Deucher
> Sent: 2019年9月17日 3:51
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
> Subject: [PATCH] drm/amdgpu/ras: use GPU PAGE_SIZE/SHIFT for reserving
> pages
>
> We are reserving vram pages so they should be aligned to the GPU page size.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index ff1fc084ffe1..131c53fa8eff 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1409,7 +1409,8 @@ int amdgpu_ras_reserve_bad_pages(struct
> amdgpu_device *adev)
> for (i = data->last_reserved; i < data->count; i++) {
> bp = data->bps[i].retired_page;
>
> - if (amdgpu_bo_create_kernel_at(adev, bp << PAGE_SHIFT,
> PAGE_SIZE,
> + if (amdgpu_bo_create_kernel_at(adev, bp <<
> AMDGPU_GPU_PAGE_SHIFT,
> + AMDGPU_GPU_PAGE_SIZE,
> AMDGPU_GEM_DOMAIN_VRAM,
> &bo, NULL))
> DRM_ERROR("RAS ERROR: reserve vram %llx fail\n",
> bp);
> --
> 2.20.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list