diff --git a/local/recipes/gpu/redox-drm/source/src/drivers/amd/display.rs b/local/recipes/gpu/redox-drm/source/src/drivers/amd/display.rs index 5e71595c4b..1e7ff195a2 100644 --- a/local/recipes/gpu/redox-drm/source/src/drivers/amd/display.rs +++ b/local/recipes/gpu/redox-drm/source/src/drivers/amd/display.rs @@ -326,6 +326,9 @@ impl DisplayCore { mm_height: raw.mm_height.max(0) as u32, encoder_id: raw.encoder_id.max(0) as u32, modes: self.modes_for_connector(idx as u32), + panel_orientation: Some( + redox_driver_sys::quirks::dmi::load_drm_panel_orientation(), + ), }); } diff --git a/local/recipes/gpu/redox-drm/source/src/drivers/intel/display.rs b/local/recipes/gpu/redox-drm/source/src/drivers/intel/display.rs index eefcf7e38b..d479637356 100644 --- a/local/recipes/gpu/redox-drm/source/src/drivers/intel/display.rs +++ b/local/recipes/gpu/redox-drm/source/src/drivers/intel/display.rs @@ -161,6 +161,9 @@ impl IntelDisplay { mm_height, encoder_id: port as u32 + 1, modes, + panel_orientation: Some( + redox_driver_sys::quirks::dmi::load_drm_panel_orientation(), + ), }); } diff --git a/local/recipes/gpu/redox-drm/source/src/drivers/virtio/mod.rs b/local/recipes/gpu/redox-drm/source/src/drivers/virtio/mod.rs index 2c3e2a2d96..38f15a6022 100644 --- a/local/recipes/gpu/redox-drm/source/src/drivers/virtio/mod.rs +++ b/local/recipes/gpu/redox-drm/source/src/drivers/virtio/mod.rs @@ -1552,6 +1552,9 @@ fn load_display_topology(device: &mut VirtioGpuDevice) -> Result<(Vec mm_height: millimeters_for_pixels(mode.rect.height), encoder_id: scanout as u32 + 1, modes, + panel_orientation: Some( + redox_driver_sys::quirks::dmi::load_drm_panel_orientation(), + ), }; connectors.push(Connector { info, edid }); @@ -1569,6 +1572,9 @@ fn load_display_topology(device: &mut VirtioGpuDevice) -> Result<(Vec mm_height: 0, encoder_id: 1, modes: vec![ModeInfo::default_1080p()], + panel_orientation: Some( + redox_driver_sys::quirks::dmi::load_drm_panel_orientation(), + ), }, edid: synthetic_edid(), }); diff --git a/local/recipes/gpu/redox-drm/source/src/kms/connector.rs b/local/recipes/gpu/redox-drm/source/src/kms/connector.rs index 20d2c57e45..e8883492d8 100644 --- a/local/recipes/gpu/redox-drm/source/src/kms/connector.rs +++ b/local/recipes/gpu/redox-drm/source/src/kms/connector.rs @@ -1,4 +1,5 @@ use crate::kms::{ConnectorInfo, ConnectorStatus, ConnectorType, ModeInfo}; +use redox_driver_sys::quirks::dmi::load_drm_panel_orientation; #[derive(Clone, Debug)] pub struct Connector { @@ -26,6 +27,8 @@ impl Connector { } else { modes }, + // R12: DMI panel orientation from 50-drm-panel.toml. + panel_orientation: Some(load_drm_panel_orientation()), }, edid, } diff --git a/local/recipes/gpu/redox-drm/source/src/kms/mod.rs b/local/recipes/gpu/redox-drm/source/src/kms/mod.rs index 5e8ede9946..cbc3c6c170 100644 --- a/local/recipes/gpu/redox-drm/source/src/kms/mod.rs +++ b/local/recipes/gpu/redox-drm/source/src/kms/mod.rs @@ -121,6 +121,11 @@ pub struct ConnectorInfo { pub mm_height: u32, pub encoder_id: u32, pub modes: Vec, + /// Panel orientation for portrait-screen devices, sourced from DMI + /// quirk lookup (Phase R12). `None` means no DMI rule matched — + /// callers should treat this as the default landscape orientation. + #[allow(dead_code)] + pub panel_orientation: Option, } #[derive(Clone, Copy, Debug, PartialEq, Eq)] diff --git a/local/recipes/gpu/redox-drm/source/src/main.rs b/local/recipes/gpu/redox-drm/source/src/main.rs index 16c6017a06..4d077f04e2 100644 --- a/local/recipes/gpu/redox-drm/source/src/main.rs +++ b/local/recipes/gpu/redox-drm/source/src/main.rs @@ -604,6 +604,23 @@ fn main() { init_logging(log_level); + // R13: platform DMI dispatch (touchscreen, tablet_mode, hotkey, etc.) + let platform_rules = redox_driver_sys::quirks::dmi::load_platform_dmi_quirks(); + for rule in &platform_rules { + info!( + "redox-drm: R13 platform DMI match: subsystem={:?} sys_vendor={:?} product_name={:?}", + rule.subsystem, + rule.dmi_match.sys_vendor, + rule.dmi_match.product_name + ); + } + + // R21: AMD IOMMU bypass (Dell Inspiron 7375, Acer A315-41, etc.) + let acpi_flags = redox_driver_sys::quirks::dmi::load_dmi_acpi_quirks(); + if acpi_flags.contains(redox_driver_sys::quirks::AcpiQuirkFlags::SUPPRESS_IVRS) { + info!("redox-drm: R21 AMD IOMMU bypass active (SUPPRESS_IVRS set)"); + } + daemon::Daemon::new(|daemon| { if let Err(error) = run(daemon) { error!("redox-drm: fatal error: {}", error);