87ea8a9acf
Phase R12 (2026-06-07) — DRM panel orientation quirks.
The data side lands now; consumer wiring in redox-drm is
deferred until compositor rotation lands (Phase 4 KDE).
Changes:
1. DrmPanelOrientation enum (mod.rs:225) with four
values: Normal, RightUp, LeftUp, BottomUp. Sourced
from Linux 7.1 include/drm/drm_panel_orientation.h.
Provides from_name() for TOML parsing and as_str()
for logging.
2. DmiDrmPanelQuirkRule (dmi.rs:517) — DMI match + panel
orientation, mirrors the existing DmiAcpiQuirkRule
shape from R11.
3. DMI_DRM_PANEL_QUIRK_RULES (dmi.rs:531) — empty
compiled-in table; runtime TOML is the data surface
(see 50-drm-panel.toml).
4. load_drm_panel_orientation() (dmi.rs:537) — reads
live SMBIOS via read_dmi_info, applies the
compiled-in + TOML rules, returns the orientation.
Falls back to Normal if DMI data is unavailable or
no rule matches.
5. read_toml_drm_panel_entries + parse_drm_panel_toml
(toml_loader.rs) — new [[drm_panel_quirk]] TOML
table type with sub-table +
string. Unknown orientation names log a warning
and skip the entry.
6. load_drm_panel_orientation (toml_loader) — applies
the first matching TOML rule, returns Normal if
none match.
7. 1 new unit test: phase_r12_drm_panel_orientation_from_name_round_trip
exercises all four orientation values + a bogus
name. 123/123 redox-driver-sys tests pass.
8. quirks.d/50-drm-panel.toml (234 lines) — 36 DMI
entries sourced from Linux 7.1
drivers/gpu/drm/drm_panel_orientation_quirks.c.
Covers Acer, Anbernic, Asus, AYA NEO (full range
including 2/2S, 2021, AIR, FLIP, Founder, GEEK,
NEXT, KUN, SLIDE), AYN (Loki Max, Loki Zero),
Chuwi, Dynabook, GPD (MicroPC, WIN Max, Pocket 2/3,
WIN2/3/4, WIN Max 2), Lenovo, OneXPlayer, OrangePi,
Samsung Galaxy Book, Valve Jupiter/Galileo
(Steam Deck family), ZOTAC. The data spans
laptop, tablet, and handheld form factors.
cargo test: 123/123 (was 122, +1 for the new test).
cargo check: clean.
cargo clippy: no new warnings in this code.
Consumer wiring is R12.1 (out of scope for this turn):
redox-drm will call load_drm_panel_orientation() at
connector enumeration time and apply the returned
transform once the compositor supports rotation.