Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 548f9a37 authored by Felix Kuehling's avatar Felix Kuehling Committed by Greg Kroah-Hartman
Browse files

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: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 15d67457
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -218,7 +218,8 @@ int amdgpu_sync_resv(struct amdgpu_device *adev,
		 */
		fence_owner = amdgpu_sync_get_owner(f);
		if (fence_owner == AMDGPU_FENCE_OWNER_KFD &&
		    owner != AMDGPU_FENCE_OWNER_UNDEFINED)
		    owner != AMDGPU_FENCE_OWNER_UNDEFINED &&
	    owner != AMDGPU_FENCE_OWNER_KFD)
			continue;

		if (amdgpu_sync_same_dev(adev, f)) {