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.
235 lines
5.1 KiB
TOML
235 lines
5.1 KiB
TOML
# DRM panel orientation quirks — DMI-based.
|
|
# Mined from Linux 7.1
|
|
# `drivers/gpu/drm/drm_panel_orientation_quirks.c` (55 entries).
|
|
# Each `[[drm_panel_quirk]]` entry maps a DMI fingerprint to a
|
|
# panel orientation: Normal (default), RightUp (90° CW),
|
|
# LeftUp (90° CCW), BottomUp (180°).
|
|
#
|
|
# Phase R12 (2026-06-07). Consumer is `redox-drm` —
|
|
# rotation support is deferred until Phase 4 KDE session.
|
|
# The lookup function `load_drm_panel_orientation()` is callable
|
|
# today; consumers just need to read its result and apply the
|
|
# transform.
|
|
|
|
# Acer One 10 (S1003)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "Acer"
|
|
match.product_name = "One S1003"
|
|
|
|
# Acer Switch V 10 (SW5-017)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "Acer"
|
|
match.product_name = "SW5-017"
|
|
|
|
# Anbernic Win600
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.board_vendor = "Anbernic"
|
|
match.product_name = "Win600"
|
|
|
|
# Asus T100HAN
|
|
[[drm_panel_quirk]]
|
|
orientation = "LeftUp"
|
|
match.sys_vendor = "ASUSTeK COMPUTER INC."
|
|
match.product_name = "T100HAN"
|
|
|
|
# Asus T101HA
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "ASUSTeK COMPUTER INC."
|
|
match.product_name = "T101HA"
|
|
|
|
# Asus T103HAF
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "ASUSTeK COMPUTER INC."
|
|
match.product_name = "T103HAF"
|
|
|
|
# AYA NEO AYANEO 2 / 2S
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "AYANEO"
|
|
match.product_name = "AYANEO 2"
|
|
|
|
# AYA NEO 2021
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "AYADEVICE"
|
|
match.product_name = "AYA NEO 2021"
|
|
|
|
# AYA NEO AIR
|
|
[[drm_panel_quirk]]
|
|
orientation = "LeftUp"
|
|
match.sys_vendor = "AYANEO"
|
|
match.product_name = "AIR"
|
|
|
|
# AYA NEO Flip DS Bottom Screen
|
|
[[drm_panel_quirk]]
|
|
orientation = "LeftUp"
|
|
match.sys_vendor = "AYANEO"
|
|
match.product_name = "FLIP DS"
|
|
|
|
# AYA NEO Flip KB/DS Top Screen
|
|
[[drm_panel_quirk]]
|
|
orientation = "LeftUp"
|
|
match.sys_vendor = "AYANEO"
|
|
match.product_name = "FLIP"
|
|
|
|
# AYA NEO Founder
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "AYA NEO"
|
|
match.product_name = "AYA NEO Founder"
|
|
|
|
# AYA NEO GEEK
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "AYANEO"
|
|
match.product_name = "GEEK"
|
|
|
|
# AYA NEO NEXT
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.board_vendor = "AYANEO"
|
|
match.board_name = "NEXT"
|
|
|
|
# AYA NEO KUN
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.board_vendor = "AYANEO"
|
|
match.board_name = "KUN"
|
|
|
|
# AYA NEO SLIDE
|
|
[[drm_panel_quirk]]
|
|
orientation = "LeftUp"
|
|
match.sys_vendor = "AYANEO"
|
|
match.product_name = "SLIDE"
|
|
|
|
# AYN Loki Max
|
|
[[drm_panel_quirk]]
|
|
orientation = "LeftUp"
|
|
match.sys_vendor = "ayn"
|
|
match.product_name = "Loki Max"
|
|
|
|
# AYN Loki Zero
|
|
[[drm_panel_quirk]]
|
|
orientation = "LeftUp"
|
|
match.sys_vendor = "ayn"
|
|
match.product_name = "Loki Zero"
|
|
|
|
# Chuwi Hi10 Pro (CWI529)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.board_vendor = "Hampoo"
|
|
match.product_name = "Hi10 pro tablet"
|
|
|
|
# Dynabook K50
|
|
[[drm_panel_quirk]]
|
|
orientation = "LeftUp"
|
|
match.sys_vendor = "Dynabook Inc."
|
|
match.product_name = "dynabook K50/FR"
|
|
|
|
# GPD MicroPC
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "GPD"
|
|
match.product_name = "MicroPC"
|
|
|
|
# GPD Win Max (G1619-01)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "GPD"
|
|
match.product_name = "G1619-01"
|
|
|
|
# GPD Pocket (G1617-01)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "GPD"
|
|
match.product_name = "G1617-01"
|
|
|
|
# GPD Pocket 2
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "GPD"
|
|
match.product_name = "Pocket 2"
|
|
|
|
# GPD Pocket 3
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "GPD"
|
|
match.product_name = "Pocket 3"
|
|
|
|
# GPD WIN2
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "GPD"
|
|
match.product_name = "WIN2"
|
|
|
|
# GPD WIN3
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "GPD"
|
|
match.product_name = "G1618-03"
|
|
|
|
# GPD WIN4
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "GPD"
|
|
match.product_name = "G1618-04"
|
|
|
|
# GPD WIN Max 2 (2023)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "GPD"
|
|
match.product_name = "G1619-04"
|
|
|
|
# Lenovo Ideapad Miix 320 (80SG)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "LENOVO"
|
|
match.product_name = "80SG"
|
|
|
|
# Lenovo Ideapad D330 (80XF)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "LENOVO"
|
|
match.product_name = "80XF"
|
|
|
|
# OneXPlayer
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "ONE-NETBOOK TECHNOLOGY CO., LTD."
|
|
match.product_name = "ONE XPLAYER"
|
|
|
|
# OrangePi NEO-01
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "OrangePi"
|
|
match.product_name = "NEO-01"
|
|
|
|
# Samsung Galaxy Book 10.6
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "SAMSUNG ELECTRONICS CO., LTD."
|
|
match.product_name = "Galaxy Book 10.6"
|
|
|
|
# Valve Jupiter (Steam Deck)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "Valve"
|
|
match.product_name = "Jupiter"
|
|
|
|
# Valve Galileo (Steam Deck OLED)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "Valve"
|
|
match.product_name = "Galileo"
|
|
|
|
# ZOTAC ZBOX PI336 (G0A1W)
|
|
[[drm_panel_quirk]]
|
|
orientation = "RightUp"
|
|
match.sys_vendor = "ZOTAC"
|
|
match.board_name = "G0A1W"
|