From 3be97a964a11e1f6746cb3e053fc061611d2ff26 Mon Sep 17 00:00:00 2001 From: Admin Pupkin Date: Mon, 1 Jun 2026 07:51:04 +0300 Subject: [PATCH] drm: wire poll_hotplug into IRQ event thread When handle_irq() returns Ok(None) (no IRQ event received), also call poll_hotplug() to detect connector changes via HPD register polling fallback. Events are fed through the same event channel to the scheme handler. --- local/recipes/gpu/redox-drm/source/src/main.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/local/recipes/gpu/redox-drm/source/src/main.rs b/local/recipes/gpu/redox-drm/source/src/main.rs index e814e50265..c135f3e6cd 100644 --- a/local/recipes/gpu/redox-drm/source/src/main.rs +++ b/local/recipes/gpu/redox-drm/source/src/main.rs @@ -83,7 +83,20 @@ fn run(daemon: daemon::Daemon) -> Result<()> { break; } } - Ok(None) => {} + Ok(None) => { + match irq_driver.poll_hotplug() { + Ok(Some(event)) => { + if event_tx.send(event).is_err() { + error!("redox-drm: event consumer dropped, stopping IRQ event thread"); + break; + } + } + Ok(None) => {} + Err(e) => { + error!("redox-drm: hotplug poll error: {}", e); + } + } + } Err(e) => { error!("redox-drm: IRQ handler error: {}", e); }