Commit 926c79ad authored by Prike Liang's avatar Prike Liang Committed by Alex Deucher
Browse files

drm/amdgpu: promote the implicit sync to the dependent read fences



The driver doesn't want to implicitly sync on the DMA_RESV_USAGE_BOOKKEEP
usage fences, and the BOOKEEP fences should be synced explicitly. So, as
the VM implicit syncing only need to return and sync the dependent read
fences.

Signed-off-by: default avatarPrike Liang <Prike.Liang@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6edc8964
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -249,9 +249,8 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,

	if (resv == NULL)
		return -EINVAL;

	/* TODO: Use DMA_RESV_USAGE_READ here */
	dma_resv_for_each_fence(&cursor, resv, DMA_RESV_USAGE_BOOKKEEP, f) {
	/* Implicitly sync only to KERNEL, WRITE and READ */
	dma_resv_for_each_fence(&cursor, resv, DMA_RESV_USAGE_READ, f) {
		dma_fence_chain_for_each(f, f) {
			struct dma_fence *tmp = dma_fence_chain_contained(f);