]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag
authorPhilip Yang <Philip.Yang@amd.com>
Mon, 11 Mar 2024 22:07:34 +0000 (18:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:37 +0000 (15:28 +0200)
commit6fcd12cb90888ef2d8af8d4c04e913252eee4ef3
treef2efd752d8eb9dbe6421f225d204c2748c9fb01d
parent4992f44a3b059a6ce6b273450a66032b8c732054
drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag

[ Upstream commit 6c6064cbe58b43533e3451ad6a8ba9736c109ac3 ]

Otherwise after the GTT bo is released, the GTT and gart space is freed
but amdgpu_ttm_backend_unbind will not clear the gart page table entry
and leave valid mapping entry pointing to the stale system page. Then
if GPU access the gart address mistakely, it will read undefined value
instead page fault, harder to debug and reproduce the real issue.

Cc: stable@vger.kernel.org
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c