drm: log why the uinput refresh worker could not start

The worker released its coalescing slot and returned silently when the runtime
failed to build, leaving the uinput range stale for the new layout with nothing
in the log to explain it.
This commit is contained in:
Mariano Abad
2026-07-23 21:59:24 -03:00
parent 1fcc15488c
commit 36dc2638f7

View File

@@ -500,12 +500,21 @@ async fn recv_thread(
UINPUT_REFRESH_GEN.fetch_add(1, Ordering::AcqRel);
if !UINPUT_REFRESH_BUSY.swap(true, Ordering::AcqRel) {
std::thread::spawn(|| {
let Ok(rt) = tokio::runtime::Builder::new_current_thread()
let rt = match tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
else {
UINPUT_REFRESH_BUSY.store(false, Ordering::Release);
return;
{
Ok(rt) => rt,
Err(err) => {
// Release the slot so a later topology change can retry, and say
// why: silently skipping would leave the uinput range stale for
// the new layout with nothing in the log to explain it.
log::warn!(
"drm: uinput refresh worker could not build a runtime: {err}"
);
UINPUT_REFRESH_BUSY.store(false, Ordering::Release);
return;
}
};
let mut served = 0u64;
loop {