Skip to content

Commit

Permalink
kms: Handle subpixel layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Oct 11, 2023
1 parent cc1d1c0 commit c4587da
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/backend/kms/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,14 @@ impl Device {
interface,
PhysicalProperties {
size: (phys_w as i32, phys_h as i32).into(),
// TODO: We need to read that from the connector properties
subpixel: Subpixel::Unknown,
subpixel: match conn_info.subpixel() {
connector::SubPixel::HorizontalRgb => Subpixel::HorizontalRgb,
connector::SubPixel::HorizontalBgr => Subpixel::HorizontalBgr,
connector::SubPixel::VerticalRgb => Subpixel::VerticalRgb,
connector::SubPixel::VerticalBgr => Subpixel::VerticalBgr,
connector::SubPixel::None => Subpixel::None,
_ => Subpixel::Unknown,
},
make: edid_info
.as_ref()
.map(|info| info.manufacturer.clone())
Expand Down

0 comments on commit c4587da

Please sign in to comment.