Skip to content

Commit 26bba75

Browse files
committed
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 <[email protected]> Cc: Thomas Hellström <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Nirmoy Das <[email protected]>
1 parent 774b5fa commit 26bba75

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/gpu/drm/xe/tests/xe_bo.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ static int ccs_test_migrate(struct xe_tile *tile, struct xe_bo *bo,
4949
KUNIT_FAIL(test, "Failed to submit bo clear.\n");
5050
return PTR_ERR(fence);
5151
}
52+
53+
if (dma_fence_wait_timeout(fence, false, 5 * HZ) <= 0) {
54+
dma_fence_put(fence);
55+
KUNIT_FAIL(test, "Timeout while clearing bo.\n");
56+
return -ETIME;
57+
}
58+
5259
dma_fence_put(fence);
5360
}
5461

0 commit comments

Comments
 (0)