LinuxKMS: Add XRGB8888 fallback when no DRM plane formats found

Instead of failing when no plane formats are detected, fall back to
XRGB8888 which is widely supported. This prevents crashes on systems
where plane enumeration fails while still allowing the display to
function with a common pixel format.

Signed-off-by: minicx <minicx@disroot.org>
This commit is contained in:
minicx 2025-09-06 23:29:39 +03:00 committed by Simon Hausmann
parent 307735d3bf
commit c2819b451b

View file

@ -274,8 +274,9 @@ impl DrmOutput {
}
}
Err(format!("No available formats found for current plane with CRTC {:?}", self.crtc)
.into())
eprintln!("No available formats found for any plane with CRTC {:?}. Falling back to XRGB8888 format", self.crtc);
Ok(vec![drm::buffer::DrmFourcc::Xrgb8888])
}
pub fn size(&self) -> (u32, u32) {