Repository navigation
drm/simpledrm: Support 10.5-inch iPad Pro 2 and 48/30/24 Hz H9G cadences - #173
Conversation
|
Live DRM mode-switching verified on J207 (
|
Extend the A10X (T8011) H9G boot-scanout cadence switcher in simpledrm: 1. Add the 10.5-inch iPad Pro 2 panel (J207/J208, 1668x2224, htotal 1756, 1227 lines per subframe, 517107 kHz pixel clock) alongside the 12.9-inch iPad Pro 2 panel (J120/J121, 2048x2732, htotal 2088, 1497 lines per subframe, 750001 kHz). Both share t8011-pro2.dtsi, which already links framebuffer0 to h9g_display. 2. Expose the lower ProMotion scanout cadences via H9G_EXTRA_SUBFRAMES in addition to 120 Hz (0 extra) and the preferred 60 Hz boot cadence (2 extra): 48 Hz (3 extra), 30 Hz (6 extra), and 24 Hz (8 extra), while keeping 60 Hz as the default preferred mode and restoring the boot cadence on teardown. 3. Guard H9G register programming in simpledrm_atomic_enable() with drm_dev_enter()/drm_dev_exit() so queued nonblocking atomic commits cannot touch H9G MMIO after unplug, and add a .shutdown callback that unplugs DRM and restores the boot cadence so kexec from an alternate cadence hands off at 60 Hz. Verified live on J207 (iPad Pro 10.5-inch, Wi-Fi): - Hardware timing registers confirmed (0x1802c=0x08b00684, 0x18030=0x003e0012, 0x18034=0x00020008, 0x18708=1227, 0x1870c=0x200) - Measured refresh rates via H9G_EXTRA_SUBFRAMES counter: sf=2 -> 60.00 Hz, sf=3 -> 48.00 Hz, sf=6 -> 29.99 Hz, sf=8 -> 24.00 Hz - Visually verified clean/flicker-free at 24 Hz with Firefox and shell UI - Settled idle power on 500 mA desktop USB (bl=400, schedutil): dropping from 60 Hz to 24 Hz saves ~105 mA (~410 mW), lifting net battery current from +25/+36 mA to +131/+132 mA charging. Assisted-by: LLM Signed-off-by: Grier Johnson <grier@scooterfarm.com>
0d8dedf to
fd64614
Compare
|
Rebased onto
Re-verified live on J207 (iPad Pro 10.5-inch, Wi-Fi): |
|
Merged, thank you @grierj! The 10.5-inch iPad Pro 2 now switches refresh rates like the 12.9-inch, and both get 48/30/24 Hz on top of 60/120 with 60 Hz still the default. The ~105 mA idle saving at 24 Hz on the J207 is a great result, and the Nothing was changed on the branch and nothing was left out. The shutdown hook back to 60 Hz and the unplug guard are in too; both look right. Possible follow-up whenever you like (not urgent): upstream would carry the per-panel timings in the device tree rather than in a table inside simpledrm. This extends the approach main already used for the 12.9-inch, so it was fine to merge as is. It reaches users when orchard moves its kernel lock, which is happening next. |
Extends the existing A10X (
t8011) H9G boot-scanout cadence switching indrivers/gpu/drm/sysfb/simpledrm.c:J207/J208,1668×2224) alongside the existing 12.9-inch iPad Pro 2 (J120/J121,2048×2732). Both boards already sharet8011-pro2.dtsi, which wires&framebuffer0 { display = <&h9g_display>; };.48 / 30 / 24 Hz) viaH9G_EXTRA_SUBFRAMES(3 / 6 / 8extra blank subframes after the 2 active subframes on the fixed 240 Hz subframe clock) in addition to120 Hz(0) and the default preferred60 Hzboot cadence (2).Default boot behavior is unchanged (
60 Hzremains preferred and is restored on teardown); userspace/compositors can now drop to24 Hzwhen idle and step up to60/120 Hzwhen active.Verification on J207 (iPad Pro 10.5-inch, Wi-Fi)
orchard build --device j207 --kernel-tree(zero warnings).M3_CTL=3,MODE=1,IRQ_EN=0,OUT_EN=0,EXTRA_SF=2,SF_LINES=1227,ACT_SF=0x200,0x1802c=0x08b00684(1668×2224),htotal=1756.H9G_EXTRA_SUBFRAMESsubframe counter:sf=2:59.995 Hzsf=3:47.995 Hzsf=6:29.985 Hzsf=8:24.004 Hz24 Hzclean and usable on the panel (Firefox + control menu).bl=400,schedutil):60 Hz+25..+36 mA->24 Hz+131..+132 mA(~105 mA/~410 mWsaved).