c/multi: Handle fence timeouts

This commit is contained in:
Jakob Bornecrantz 2022-03-02 10:55:40 +00:00
parent 7e8f4f46c6
commit 772b6256d6

View file

@ -445,8 +445,25 @@ static void
wait_fence(struct xrt_compositor_fence **xcf_ptr)
{
COMP_TRACE_MARKER();
xrt_compositor_fence_wait(*xcf_ptr, UINT64_MAX);
xrt_result_t ret = XRT_SUCCESS;
// 100ms
uint64_t timeout_ns = 100 * U_TIME_1MS_IN_NS;
do {
ret = xrt_compositor_fence_wait(*xcf_ptr, timeout_ns);
if (ret != XRT_TIMEOUT) {
break;
}
U_LOG_W("Waiting on client fence timed out > 100ms!");
} while (true);
xrt_compositor_fence_destroy(xcf_ptr);
if (ret != XRT_SUCCESS) {
U_LOG_E("Fence waiting failed!");
}
}
static void