[PATCH] drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag

Christian König christian.koenig at amd.com
Tue Mar 12 06:34:44 UTC 2024


Am 11.03.24 um 23:21 schrieb Philip Yang:
> Otherwise amdgpu_ttm_backend_unbind will not clear the gart page table
> and leave valid mapping entry to the stale system page.
>
> Signed-off-by: Philip Yang <Philip.Yang at amd.com>

Good catch, that bug is probably in there for quite a while.

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

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 75c9fd2c6c2a..b0ed10f4de60 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -869,6 +869,7 @@ static void amdgpu_ttm_gart_bind(struct amdgpu_device *adev,
>   		amdgpu_gart_bind(adev, gtt->offset, ttm->num_pages,
>   				 gtt->ttm.dma_address, flags);
>   	}
> +	gtt->bound = true;
>   }
>   
>   /*



More information about the amd-gfx mailing list