Commit 26bba754 authored by Nirmoy Das's avatar Nirmoy Das
Browse files

drm/xe/tests: Wait for clear fence operation to complete



Ensure the clear operation completes before proceeding, as the clear
fence is not attached to the BO's dma-resv object.

Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241205114702.1963303-1-nirmoy.das@intel.com


Signed-off-by: default avatarNirmoy Das <nirmoy.das@intel.com>
parent 774b5fa5
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -49,6 +49,13 @@ static int ccs_test_migrate(struct xe_tile *tile, struct xe_bo *bo,
			KUNIT_FAIL(test, "Failed to submit bo clear.\n");
			return PTR_ERR(fence);
		}

		if (dma_fence_wait_timeout(fence, false, 5 * HZ) <= 0) {
			dma_fence_put(fence);
			KUNIT_FAIL(test, "Timeout while clearing bo.\n");
			return  -ETIME;
		}

		dma_fence_put(fence);
	}