drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag
Subsystems (2)
PATCH 1/1 drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag
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 <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -0
@@ -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; }/*
Signature · 1 line
2.35.1
Am 11.03.24 um 23:21 schrieb Philip Yang:
Quoted 4 lines
Otherwise
amdgpu_ttm_backend_unbindwill not clear the gart page table and leave valid mapping entry to the stale system page.Signed-off-by Philip Yang <[email protected]>
Good catch, that bug is probably in there for quite a while.
Reviewed-by Christian König <[email protected]>
Quoted 16 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1
-0@@ -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; }/*