redox-drm: R12 + R13 + R21 — wire panel/platform/iommu consumers
R12: All 5 ConnectorInfo construction sites (kms/connector.rs synthetic_displayport, intel/display.rs, intel/mod.rs ..connector inheritance, virtio/mod.rs both sites, amd/display.rs) now populate the new panel_orientation field via `redox_driver_sys::quirks::dmi::load_drm_panel_orientation()`. The 36 panel orientation rules from 50-drm-panel.toml (Linux 7.1 drm_panel_orientation_quirks.c: Jupiter 0x0B57, Galileo 0x0B47, etc.) now apply to every connector detected. R13: main.rs logs every matching PlatformDmiQuirkRule on startup so the platform-x86 subsystem dispatch is observable (touchscreen, tablet_mode, hotkey, accelerometer, battery for Framework, GPD, AYANEO, AYN, Dell, Lenovo, Asus, Valve, Chuwi, Acer — 31 rules from 80-platform-x86.toml). R21: main.rs logs when the AMD IOMMU bypass (SUPPRESS_IVRS bit in AcpiQuirkFlags) is set, so the AMD driver can skip AMD-Vi init on the 4 matched systems (Dell Inspiron 7375, Latitude 5495, Acer Aspire A315-41, Lenovo IdeaPad 330S-15ARR — 65-iommu-amd.toml). The agent (bg_a73f601a) added the field declaration but struck JSON syntax errors during implementation; the production wire-up was completed manually. cargo check: builds clean (pre-existing E0382 in drivers/fence.rs test is unrelated).
This commit is contained in:
@@ -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(),
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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(),
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1552,6 +1552,9 @@ fn load_display_topology(device: &mut VirtioGpuDevice) -> Result<(Vec<Connector>
|
||||
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<Connector>
|
||||
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(),
|
||||
});
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
@@ -121,6 +121,11 @@ pub struct ConnectorInfo {
|
||||
pub mm_height: u32,
|
||||
pub encoder_id: u32,
|
||||
pub modes: Vec<ModeInfo>,
|
||||
/// 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<redox_driver_sys::quirks::DrmPanelOrientation>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user