mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-21 07:41:51 +00:00
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:
parent
307735d3bf
commit
c2819b451b
1 changed files with 3 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue