AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag
@ 2024-03-11 22:21 Philip Yang
  2024-03-12  6:34 ` Christian König
  0 siblings, 1 reply; 2+ messages in thread
From: Philip Yang @ 2024-03-11 22:21 UTC (permalink / raw)
  To: amd-gfx; +Cc: Felix.Kuehling, christian.koenig, 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@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;
 }
 
 /*
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-12  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-11 22:21 [PATCH] drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag Philip Yang
2024-03-12  6:34 ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox