drm/amdgpu: Let KFD sync with VM fences
[ Upstream commit ec9ba4821fa52b5efdbc4cdf0a77497990655231 ] Change the rules for amdgpu_sync_resv to let KFD synchronize with VM fences on page table reservations. This fixes intermittent memory corruption after evictions when using amdgpu_vm_handle_moved to update page tables for VM mappings managed through render nodes. Signed-off-by: Felix Kuehling <Felix.Kuehling@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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
e90c8f9785
commit
48bb06f8e3
@@ -241,7 +241,8 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,
|
|||||||
|
|
||||||
/* Never sync to VM updates either. */
|
/* Never sync to VM updates either. */
|
||||||
if (fence_owner == AMDGPU_FENCE_OWNER_VM &&
|
if (fence_owner == AMDGPU_FENCE_OWNER_VM &&
|
||||||
owner != AMDGPU_FENCE_OWNER_UNDEFINED)
|
owner != AMDGPU_FENCE_OWNER_UNDEFINED &&
|
||||||
|
owner != AMDGPU_FENCE_OWNER_KFD)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Ignore fences depending on the sync mode */
|
/* Ignore fences depending on the sync mode */
|
||||||
|
Reference in New Issue
Block a user