The open source OpenXR runtime

ipc: Remove device io_active flag

Nothing used this feature, so removing it.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2636>

authored by

Jakob Bornecrantz and committed by
Marge Bot
ef3f9d68 d886e0e5

+5 -32
-3
src/xrt/ipc/server/ipc_server.h
··· 194 { 195 //! The actual device. 196 struct xrt_device *xdev; 197 - 198 - //! Is the IO suppressed for this device. 199 - bool io_active; 200 }; 201 202 /*!
··· 194 { 195 //! The actual device. 196 struct xrt_device *xdev; 197 }; 198 199 /*!
+3 -16
src/xrt/ipc/server/ipc_server_handler.c
··· 1 // Copyright 2020-2024, Collabora, Ltd. 2 // SPDX-License-Identifier: BSL-1.0 3 /*! 4 * @file ··· 1642 } 1643 1644 xrt_result_t 1645 - ipc_handle_system_toggle_io_device(volatile struct ipc_client_state *ics, uint32_t device_id) 1646 - { 1647 - if (device_id >= IPC_MAX_DEVICES) { 1648 - return XRT_ERROR_IPC_FAILURE; 1649 - } 1650 - 1651 - struct ipc_device *idev = &ics->server->idevs[device_id]; 1652 - 1653 - idev->io_active = !idev->io_active; 1654 - 1655 - return XRT_SUCCESS; 1656 - } 1657 - 1658 - xrt_result_t 1659 ipc_handle_swapchain_get_properties(volatile struct ipc_client_state *ics, 1660 const struct xrt_swapchain_create_info *info, 1661 struct xrt_swapchain_create_properties *xsccp) ··· 1950 struct xrt_input *dst = &ism->inputs[isdev->first_input_index]; 1951 size_t size = sizeof(struct xrt_input) * isdev->input_count; 1952 1953 - bool io_active = ics->io_active && idev->io_active; 1954 if (io_active) { 1955 memcpy(dst, src, size); 1956 } else { ··· 2005 } 2006 2007 // Special case the headpose. 2008 - bool disabled = (!isdev->io_active || !ics->io_active) && name != XRT_INPUT_GENERIC_HEAD_POSE; 2009 bool active_on_client = input->active; 2010 2011 // We have been disabled but the client hasn't called update.
··· 1 // Copyright 2020-2024, Collabora, Ltd. 2 + // Copyright 2025, NVIDIA CORPORATION. 3 // SPDX-License-Identifier: BSL-1.0 4 /*! 5 * @file ··· 1643 } 1644 1645 xrt_result_t 1646 ipc_handle_swapchain_get_properties(volatile struct ipc_client_state *ics, 1647 const struct xrt_swapchain_create_info *info, 1648 struct xrt_swapchain_create_properties *xsccp) ··· 1937 struct xrt_input *dst = &ism->inputs[isdev->first_input_index]; 1938 size_t size = sizeof(struct xrt_input) * isdev->input_count; 1939 1940 + bool io_active = ics->io_active; 1941 if (io_active) { 1942 memcpy(dst, src, size); 1943 } else { ··· 1992 } 1993 1994 // Special case the headpose. 1995 + bool disabled = !ics->io_active && name != XRT_INPUT_GENERIC_HEAD_POSE; 1996 bool active_on_client = input->active; 1997 1998 // We have been disabled but the client hasn't called update.
+2 -7
src/xrt/ipc/server/ipc_server_process.c
··· 98 static void 99 init_idev(struct ipc_device *idev, struct xrt_device *xdev) 100 { 101 - if (xdev != NULL) { 102 - idev->io_active = true; 103 - idev->xdev = xdev; 104 - } else { 105 - idev->io_active = false; 106 - } 107 } 108 109 static void 110 teardown_idev(struct ipc_device *idev) 111 { 112 - idev->io_active = false; 113 } 114 115 static void
··· 98 static void 99 init_idev(struct ipc_device *idev, struct xrt_device *xdev) 100 { 101 + idev->xdev = xdev; 102 } 103 104 static void 105 teardown_idev(struct ipc_device *idev) 106 { 107 + idev->xdev = NULL; 108 } 109 110 static void
-6
src/xrt/ipc/shared/proto.json
··· 56 ] 57 }, 58 59 - "system_toggle_io_device": { 60 - "in": [ 61 - {"name": "id", "type": "uint32_t"} 62 - ] 63 - }, 64 - 65 "system_devices_get_roles": { 66 "out": [ 67 {"name": "system_roles", "type": "struct xrt_system_roles"}
··· 56 ] 57 }, 58 59 "system_devices_get_roles": { 60 "out": [ 61 {"name": "system_roles", "type": "struct xrt_system_roles"}