diff --git a/src/xrt/ipc/server/ipc_server.h b/src/xrt/ipc/server/ipc_server.h index 16e3f48f2..e68ad9aaf 100644 --- a/src/xrt/ipc/server/ipc_server.h +++ b/src/xrt/ipc/server/ipc_server.h @@ -194,9 +194,6 @@ struct ipc_device { //! The actual device. struct xrt_device *xdev; - - //! Is the IO suppressed for this device. - bool io_active; }; /*! diff --git a/src/xrt/ipc/server/ipc_server_handler.c b/src/xrt/ipc/server/ipc_server_handler.c index f268e5e1c..52f4eaa31 100644 --- a/src/xrt/ipc/server/ipc_server_handler.c +++ b/src/xrt/ipc/server/ipc_server_handler.c @@ -1,4 +1,5 @@ // Copyright 2020-2024, Collabora, Ltd. +// Copyright 2025, NVIDIA CORPORATION. // SPDX-License-Identifier: BSL-1.0 /*! * @file @@ -1641,20 +1642,6 @@ ipc_handle_system_toggle_io_client(volatile struct ipc_client_state *_ics, uint3 return ipc_server_toggle_io_client(s, client_id); } -xrt_result_t -ipc_handle_system_toggle_io_device(volatile struct ipc_client_state *ics, uint32_t device_id) -{ - if (device_id >= IPC_MAX_DEVICES) { - return XRT_ERROR_IPC_FAILURE; - } - - struct ipc_device *idev = &ics->server->idevs[device_id]; - - idev->io_active = !idev->io_active; - - return XRT_SUCCESS; -} - xrt_result_t ipc_handle_swapchain_get_properties(volatile struct ipc_client_state *ics, const struct xrt_swapchain_create_info *info, @@ -1950,7 +1937,7 @@ ipc_handle_device_update_input(volatile struct ipc_client_state *ics, uint32_t i struct xrt_input *dst = &ism->inputs[isdev->first_input_index]; size_t size = sizeof(struct xrt_input) * isdev->input_count; - bool io_active = ics->io_active && idev->io_active; + bool io_active = ics->io_active; if (io_active) { memcpy(dst, src, size); } else { @@ -2005,7 +1992,7 @@ ipc_handle_device_get_tracked_pose(volatile struct ipc_client_state *ics, } // Special case the headpose. - bool disabled = (!isdev->io_active || !ics->io_active) && name != XRT_INPUT_GENERIC_HEAD_POSE; + bool disabled = !ics->io_active && name != XRT_INPUT_GENERIC_HEAD_POSE; bool active_on_client = input->active; // We have been disabled but the client hasn't called update. diff --git a/src/xrt/ipc/server/ipc_server_process.c b/src/xrt/ipc/server/ipc_server_process.c index 0a7b70a94..8cf187770 100644 --- a/src/xrt/ipc/server/ipc_server_process.c +++ b/src/xrt/ipc/server/ipc_server_process.c @@ -98,18 +98,13 @@ find_xdev_index(struct ipc_server *s, struct xrt_device *xdev) static void init_idev(struct ipc_device *idev, struct xrt_device *xdev) { - if (xdev != NULL) { - idev->io_active = true; - idev->xdev = xdev; - } else { - idev->io_active = false; - } + idev->xdev = xdev; } static void teardown_idev(struct ipc_device *idev) { - idev->io_active = false; + idev->xdev = NULL; } static void diff --git a/src/xrt/ipc/shared/proto.json b/src/xrt/ipc/shared/proto.json index bd6de5fb5..b8033ec3e 100644 --- a/src/xrt/ipc/shared/proto.json +++ b/src/xrt/ipc/shared/proto.json @@ -56,12 +56,6 @@ ] }, - "system_toggle_io_device": { - "in": [ - {"name": "id", "type": "uint32_t"} - ] - }, - "system_devices_get_roles": { "out": [ {"name": "system_roles", "type": "struct xrt_system_roles"}