Skip to content

drm/simpledrm: Move H9G per-panel timings into device tree - #184

Open
grierj wants to merge 3 commits into
OrchardLinux:mainfrom
grierj:simpledrm-h9g-dt-timings
Open

grierj wants to merge 3 commits into
OrchardLinux:mainfrom
grierj:simpledrm-h9g-dt-timings

Conversation

@grierj

@grierj grierj commented Dec 5, 2026

Copy link
Copy Markdown

Follow-up to #173 (per #173 (comment)): move the per-panel H9G timing table out of drivers/gpu/drm/sysfb/simpledrm.c into standard panel-timing device tree subnodes on apple,t8011-h9g-display.

Commits

  1. dt-bindings: display: apple,t8011-h9g-display: Document panel-timing — Add optional panel-timing ($ref: /schemas/display/panel/panel-timing.yaml#) and an example describing the attached panel's native progressive 120 Hz active scanout (two active subframes).
  2. arm64: dts: apple: t8011: Describe iPad Pro 2 H9G panel timings — Populate &h9g_display { panel-timing { ... }; } on all four iPad Pro 2 boards:
    • 12.9-inch (t8011-j120.dts, t8011-j121.dts): 2048×2732, htotal 2088, vtotal 2994 (2 × 1497 subframe lines), 750.001 MHz.
    • 10.5-inch (t8011-j207.dts, t8011-j208.dts): 1668×2224, htotal 1756 (hfp 62 / hsync 8 / hbp 18), vtotal 2454 (2 × 1227 subframe lines), 517.107 MHz.
    • Ordered before the driver commit so every commit in the series bisects cleanly.
  3. drm/simpledrm: Read H9G panel timings from device tree — Replace simpledrm_h9g_panels[] and simpledrm_h9g_find_panel() with simpledrm_h9g_parse_timing() using of_get_display_timing() (selecting VIDEOMODE_HELPERS if OF on DRM_SIMPLEDRM while keeping non-OF builds stub-clean), validating active dimensions, progressive scan flags, u16 bounds across all cadences, and H9G_SUBFRAME_LINES.
    • Note: an older DTB without panel-timing gracefully stays on standard 60 Hz simpledrm rather than keeping a duplicate table in C.

Verification

  • Built cleanly via orchard build --device j207 --kernel /home/grier/git/linux hardware-check (zero warnings on simpledrm.o and t8011-{j120,j121,j207,j208}.dtb).
  • Verified binding schema + example + all five T8011 DTBs (j105a, j120, j121, j207, j208).
  • Live RAM boot on iPad Pro 10.5-inch Wi-Fi (J207):
    • Confirmed /proc/device-tree/soc/display-controller@206000000/panel-timing/* present and matching DTS.
    • Confirmed all 5 probed DRM modes from simpledrm with zero warnings/errors in dmesg:
      Probed mode: "1668x2224": 60 517107 1668 1730 1738 1756 2224 2454 2454 4908 0x48 0x0
      Probed mode: "1668x2224": 120 517107 1668 1730 1738 1756 2224 2454 2454 2454 0x40 0x0
      Probed mode: "1668x2224": 48 517107 1668 1730 1738 1756 2224 2454 2454 6135 0x40 0x0
      Probed mode: "1668x2224": 30 517107 1668 1730 1738 1756 2224 2454 2454 9816 0x40 0x0
      Probed mode: "1668x2224": 24 517107 1668 1730 1738 1756 2224 2454 2454 12270 0x40 0x0
      

Assisted-by: LLM

Allow the H9G display controller node to carry a standard panel-timing subnode describing the attached internal panel's native 120 Hz active scanout (two active subframes), so per-panel timings live in the board device trees instead of a lookup table in simpledrm.

Assisted-by: LLM
Signed-off-by: Grier Johnson <grier@scooterfarm.com>
Add the panel-timing subnode to h9g_display for the 12.9-inch (J120/J121, 2048x2732, htotal 2088, 1497 lines/subframe, 750.001 MHz) and 10.5-inch (J207/J208, 1668x2224, htotal 1756, 1227 lines/subframe, 517.107 MHz) iPad Pro 2 models so simpledrm can read per-panel H9G timings from the device tree.

Assisted-by: LLM
Signed-off-by: Grier Johnson <grier@scooterfarm.com>
Replace the hardcoded simpledrm_h9g_panels[] lookup table with of_get_display_timing() on the H9G display controller's panel-timing subnode, deriving htotal, sync positions, pixel clock, and subframe_lines (half of the 2-subframe native vtotal) directly from the device tree.

Select VIDEOMODE_HELPERS if OF for DRM_SIMPLEDRM so of_get_display_timing() is always available when OF is enabled, while non-OF builds keep using the inline stub without calling videomode_from_timing().

Assisted-by: LLM
Signed-off-by: Grier Johnson <grier@scooterfarm.com>
@grierj

grierj commented Dec 5, 2026

Copy link
Copy Markdown
Author

Also verified live in the full Omarchy A Wayland desktop (labwc + wlr-randr) on J207 with this kernel and DTB — all 5 modes are exposed from DT panel-timing and switching across every cadence updates H9G_EXTRA_SUBFRAMES (0x206018050) cleanly with zero DRM warnings/errors in dmesg:

target=1668x2224@24Hz  rc=0 EXTRA_SF=0x00060008 (sf=8) -> 1668x2224 px, 24.000000 Hz (current)
target=1668x2224@30Hz  rc=0 EXTRA_SF=0x00060006 (sf=6) -> 1668x2224 px, 30.000000 Hz (current)
target=1668x2224@48Hz  rc=0 EXTRA_SF=0x00000003 (sf=3) -> 1668x2224 px, 48.000000 Hz (current)
target=1668x2224@120Hz rc=0 EXTRA_SF=0x00000000 (sf=0) -> 1668x2224 px, 120.000000 Hz (current)
target=1668x2224@60Hz  rc=0 EXTRA_SF=0x00000002 (sf=2) -> 1668x2224 px, 60.000000 Hz (preferred, current)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant