mirror of
https://github.com/lbgos/rift-s-linux.git
synced 2026-10-17 13:00:59 +02:00
Keep the HMD alive while waiting for camera enumeration
This commit is contained in:
1 parent
e1ee4a8c2d
commit
d68d598459
2 files changed
+4
No files matched your search
@@ -246,6 +246,7 @@ rift_s_system_create(struct xrt_prober *xp,
|
||||
RIFT_S_ERROR("Failed to enable Rift S");
|
||||
goto cleanup;
|
||||
}
|
||||
rift_s_send_keepalive(sys->handles[HMD_HID]);
|
||||
|
||||
// Bench sessions must power the panel even if no new proximity packet arrives.
|
||||
if (debug_get_bool_option_steamvr_bench()) {
|
||||
@@ -860,6 +861,7 @@ open_transport(struct rift_s_system *sys)
|
||||
rift_s_hmd_enable(handles[HMD_HID], true) < 0 ||
|
||||
rift_s_set_screen_enable(handles[HMD_HID], true) < 0)
|
||||
goto fail;
|
||||
rift_s_send_keepalive(handles[HMD_HID]);
|
||||
// Power the panel during enumeration even off-head. Proximity packets restore
|
||||
// ordinary standby after the DP link and camera input have returned.
|
||||
os_nanosleep(2ULL * U_TIME_1S_IN_NS);
|
||||
|
||||
@@ -151,6 +151,8 @@ rift_s_camera_create(struct xrt_prober *xp,
|
||||
/* Re-probe devices. The v4l2 camera device should have appeared by now */
|
||||
int retry_count = 5;
|
||||
do {
|
||||
// Display/camera enumeration can outlast the firmware's three-second lease.
|
||||
rift_s_send_keepalive(hid);
|
||||
xrt_result_t xret = xrt_prober_probe(xp);
|
||||
|
||||
if (xret != XRT_SUCCESS) {
|
||||
|
||||
Reference in new issue
Block a user