From ea35e79ec7f8bd8861403a56c1af69474e3f90fc Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 17 May 2022 13:18:06 -0500 Subject: [PATCH] ipc: Clarify that wait_image timeout is nanoseconds --- src/xrt/ipc/client/ipc_client_compositor.c | 4 ++-- src/xrt/ipc/server/ipc_server_handler.c | 4 ++-- src/xrt/ipc/shared/proto.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xrt/ipc/client/ipc_client_compositor.c b/src/xrt/ipc/client/ipc_client_compositor.c index 766bc7f8b..194f72153 100644 --- a/src/xrt/ipc/client/ipc_client_compositor.c +++ b/src/xrt/ipc/client/ipc_client_compositor.c @@ -183,12 +183,12 @@ ipc_compositor_swapchain_destroy(struct xrt_swapchain *xsc) } static xrt_result_t -ipc_compositor_swapchain_wait_image(struct xrt_swapchain *xsc, uint64_t timeout, uint32_t index) +ipc_compositor_swapchain_wait_image(struct xrt_swapchain *xsc, uint64_t timeout_ns, uint32_t index) { struct ipc_client_swapchain *ics = ipc_client_swapchain(xsc); struct ipc_client_compositor *icc = ics->icc; - IPC_CALL_CHK(ipc_call_swapchain_wait_image(icc->ipc_c, ics->id, timeout, index)); + IPC_CALL_CHK(ipc_call_swapchain_wait_image(icc->ipc_c, ics->id, timeout_ns, index)); return res; } diff --git a/src/xrt/ipc/server/ipc_server_handler.c b/src/xrt/ipc/server/ipc_server_handler.c index 5fdae9d76..7573ca3d0 100644 --- a/src/xrt/ipc/server/ipc_server_handler.c +++ b/src/xrt/ipc/server/ipc_server_handler.c @@ -855,7 +855,7 @@ ipc_handle_swapchain_import(volatile struct ipc_client_state *ics, } xrt_result_t -ipc_handle_swapchain_wait_image(volatile struct ipc_client_state *ics, uint32_t id, uint64_t timeout, uint32_t index) +ipc_handle_swapchain_wait_image(volatile struct ipc_client_state *ics, uint32_t id, uint64_t timeout_ns, uint32_t index) { if (ics->xc == NULL) { return XRT_ERROR_IPC_SESSION_NOT_CREATED; @@ -865,7 +865,7 @@ ipc_handle_swapchain_wait_image(volatile struct ipc_client_state *ics, uint32_t uint32_t sc_index = id; struct xrt_swapchain *xsc = ics->xscs[sc_index]; - xrt_swapchain_wait_image(xsc, timeout, index); + xrt_swapchain_wait_image(xsc, timeout_ns, index); return XRT_SUCCESS; } diff --git a/src/xrt/ipc/shared/proto.json b/src/xrt/ipc/shared/proto.json index 4d965afc1..c5ee22ae2 100644 --- a/src/xrt/ipc/shared/proto.json +++ b/src/xrt/ipc/shared/proto.json @@ -166,7 +166,7 @@ "swapchain_wait_image": { "in": [ {"name": "id", "type": "uint32_t"}, - {"name": "timeout", "type": "uint64_t"}, + {"name": "timeout_ns", "type": "uint64_t"}, {"name": "index", "type": "uint32_t"} ] },