-3
src/xrt/ipc/server/ipc_server.h
-3
src/xrt/ipc/server/ipc_server.h
+3
-16
src/xrt/ipc/server/ipc_server_handler.c
+3
-16
src/xrt/ipc/server/ipc_server_handler.c
···
1
1
// Copyright 2020-2024, Collabora, Ltd.
2
+
// Copyright 2025, NVIDIA CORPORATION.
2
3
// SPDX-License-Identifier: BSL-1.0
3
4
/*!
4
5
* @file
···
1642
1643
}
1643
1644
1644
1645
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
1646
ipc_handle_swapchain_get_properties(volatile struct ipc_client_state *ics,
1660
1647
const struct xrt_swapchain_create_info *info,
1661
1648
struct xrt_swapchain_create_properties *xsccp)
···
1950
1937
struct xrt_input *dst = &ism->inputs[isdev->first_input_index];
1951
1938
size_t size = sizeof(struct xrt_input) * isdev->input_count;
1952
1939
1953
-
bool io_active = ics->io_active && idev->io_active;
1940
+
bool io_active = ics->io_active;
1954
1941
if (io_active) {
1955
1942
memcpy(dst, src, size);
1956
1943
} else {
···
2005
1992
}
2006
1993
2007
1994
// Special case the headpose.
2008
-
bool disabled = (!isdev->io_active || !ics->io_active) && name != XRT_INPUT_GENERIC_HEAD_POSE;
1995
+
bool disabled = !ics->io_active && name != XRT_INPUT_GENERIC_HEAD_POSE;
2009
1996
bool active_on_client = input->active;
2010
1997
2011
1998
// We have been disabled but the client hasn't called update.
+2
-7
src/xrt/ipc/server/ipc_server_process.c
+2
-7
src/xrt/ipc/server/ipc_server_process.c
···
98
98
static void
99
99
init_idev(struct ipc_device *idev, struct xrt_device *xdev)
100
100
{
101
-
if (xdev != NULL) {
102
-
idev->io_active = true;
103
-
idev->xdev = xdev;
104
-
} else {
105
-
idev->io_active = false;
106
-
}
101
+
idev->xdev = xdev;
107
102
}
108
103
109
104
static void
110
105
teardown_idev(struct ipc_device *idev)
111
106
{
112
-
idev->io_active = false;
107
+
idev->xdev = NULL;
113
108
}
114
109
115
110
static void