From b334f9d7fc0e09c23cdc9761cdf484e2921e329e Mon Sep 17 00:00:00 2001 From: Rafal Karp Date: Fri, 14 Feb 2025 13:15:59 -0800 Subject: [PATCH] c/multi: Add missing cases in clean up multi system state session Part-of: --- src/xrt/compositor/multi/comp_multi_system.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/xrt/compositor/multi/comp_multi_system.c b/src/xrt/compositor/multi/comp_multi_system.c index cf8e2e525..199025a13 100644 --- a/src/xrt/compositor/multi/comp_multi_system.c +++ b/src/xrt/compositor/multi/comp_multi_system.c @@ -1,4 +1,5 @@ // Copyright 2019-2024, Collabora, Ltd. +// Copyright 2025, NVIDIA CORPORATION. // SPDX-License-Identifier: BSL-1.0 /*! * @file @@ -556,8 +557,17 @@ multi_main_loop(struct multi_system_compositor *msc) U_LOG_I("Stopped native session, shutting down."); xrt_comp_end_session(xc); break; - case MULTI_SYSTEM_STATE_STOPPED: break; - default: assert(false); + case MULTI_SYSTEM_STATE_STOPPED: U_LOG_I("Already stopped, nothing to clean up."); break; + case MULTI_SYSTEM_STATE_INIT_WARM_START: + U_LOG_I("Cleaning up from warm start state."); + xrt_comp_end_session(xc); + break; + case MULTI_SYSTEM_STATE_INVALID: + U_LOG_W("Cleaning up from invalid state."); + // Best effort cleanup + xrt_comp_end_session(xc); + break; + default: U_LOG_E("Unknown session state during cleanup: %d", msc->sessions.state); assert(false); } os_thread_helper_unlock(&msc->oth); -- 2.51.2