From 4d7f8b454a62aa7f005ce8bee98516951bbc67e7 Mon Sep 17 00:00:00 2001 From: Grier Johnson Date: Fri, 4 Dec 2026 20:40:46 -0700 Subject: [PATCH 1/3] dt-bindings: display: apple,t8011-h9g-display: Document panel-timing 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 --- .../display/apple,t8011-h9g-display.yaml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Documentation/devicetree/bindings/display/apple,t8011-h9g-display.yaml b/Documentation/devicetree/bindings/display/apple,t8011-h9g-display.yaml index feee15f18d72c9..ca22d9e971b506 100644 --- a/Documentation/devicetree/bindings/display/apple,t8011-h9g-display.yaml +++ b/Documentation/devicetree/bindings/display/apple,t8011-h9g-display.yaml @@ -21,8 +21,46 @@ properties: reg: maxItems: 1 + panel-timing: + $ref: /schemas/display/panel/panel-timing.yaml# + description: | + Native progressive active-scanout timing of the attached internal + panel (two active subframes, i.e. the 120 Hz base scanout). The active + resolution is matched against simple-framebuffer and half the total + vertical line count (lines per subframe) is verified against the + running H9G boot scanout; pixel clock, total horizontal pixels and + subframe line count are used to derive the alternate H9G cadence + modes. Where individual porch and sync pulse splits have not yet been + measured from hardware, total blanking may be carried in the front + porch with zero sync length and back porch (not literal zero-width + hardware pulses). + required: - compatible - reg additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + display-controller@206000000 { + compatible = "apple,t8011-h9g-display"; + reg = <0x2 0x06000000 0x0 0xe0000>; + + panel-timing { + clock-frequency = <517107000>; + hactive = <1668>; + vactive = <2224>; + hfront-porch = <62>; + hback-porch = <18>; + hsync-len = <8>; + vfront-porch = <230>; + vback-porch = <0>; + vsync-len = <0>; + }; + }; + }; From 54d7ce66abaa93d85dfd7c5e26f4793baf8f9474 Mon Sep 17 00:00:00 2001 From: Grier Johnson Date: Fri, 4 Dec 2026 20:41:05 -0700 Subject: [PATCH 2/3] arm64: dts: apple: t8011: Describe iPad Pro 2 H9G panel timings 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 --- arch/arm64/boot/dts/apple/t8011-j120.dts | 19 +++++++++++++++++++ arch/arm64/boot/dts/apple/t8011-j121.dts | 19 +++++++++++++++++++ arch/arm64/boot/dts/apple/t8011-j207.dts | 18 ++++++++++++++++++ arch/arm64/boot/dts/apple/t8011-j208.dts | 18 ++++++++++++++++++ 4 files changed, 74 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8011-j120.dts b/arch/arm64/boot/dts/apple/t8011-j120.dts index 9a7da541738e1d..a82077de161981 100644 --- a/arch/arm64/boot/dts/apple/t8011-j120.dts +++ b/arch/arm64/boot/dts/apple/t8011-j120.dts @@ -19,6 +19,25 @@ compatible = "apple,j120-bcm4355c0-bt", "brcm,bcm4355c0-bt"; }; +&h9g_display { + panel-timing { + /* + * 12.9-inch iPad Pro 2 native 120 Hz active scanout (two + * 1497-line subframes). Only total blanking (htotal 2088, + * vtotal 2994) is known, carried in the front porches. + */ + clock-frequency = <750001000>; + hactive = <2048>; + vactive = <2732>; + hfront-porch = <40>; + hback-porch = <0>; + hsync-len = <0>; + vfront-porch = <262>; + vback-porch = <0>; + vsync-len = <0>; + }; +}; + &headphones { simple-audio-card,name = "J120 Headphones"; }; diff --git a/arch/arm64/boot/dts/apple/t8011-j121.dts b/arch/arm64/boot/dts/apple/t8011-j121.dts index 242dc7a1459267..d2f1c50d5ed472 100644 --- a/arch/arm64/boot/dts/apple/t8011-j121.dts +++ b/arch/arm64/boot/dts/apple/t8011-j121.dts @@ -19,6 +19,25 @@ compatible = "apple,j121-bcm4355c0-bt", "brcm,bcm4355c0-bt"; }; +&h9g_display { + panel-timing { + /* + * 12.9-inch iPad Pro 2 native 120 Hz active scanout (two + * 1497-line subframes). Only total blanking (htotal 2088, + * vtotal 2994) is known, carried in the front porches. + */ + clock-frequency = <750001000>; + hactive = <2048>; + vactive = <2732>; + hfront-porch = <40>; + hback-porch = <0>; + hsync-len = <0>; + vfront-porch = <262>; + vback-porch = <0>; + vsync-len = <0>; + }; +}; + &headphones { simple-audio-card,name = "J121 Headphones"; }; diff --git a/arch/arm64/boot/dts/apple/t8011-j207.dts b/arch/arm64/boot/dts/apple/t8011-j207.dts index fae86820e3ff05..d12e20b66bab36 100644 --- a/arch/arm64/boot/dts/apple/t8011-j207.dts +++ b/arch/arm64/boot/dts/apple/t8011-j207.dts @@ -19,6 +19,24 @@ compatible = "apple,j207-bcm4355c0-bt", "brcm,bcm4355c0-bt"; }; +&h9g_display { + panel-timing { + /* + * 10.5-inch iPad Pro 2 native 120 Hz active scanout (two + * 1227-line subframes, htotal 1756, vtotal 2454). + */ + clock-frequency = <517107000>; + hactive = <1668>; + vactive = <2224>; + hfront-porch = <62>; + hback-porch = <18>; + hsync-len = <8>; + vfront-porch = <230>; + vback-porch = <0>; + vsync-len = <0>; + }; +}; + &headphones { simple-audio-card,name = "J207 Headphones"; }; diff --git a/arch/arm64/boot/dts/apple/t8011-j208.dts b/arch/arm64/boot/dts/apple/t8011-j208.dts index 041b107c60f39d..ae0b0c5e15c8a6 100644 --- a/arch/arm64/boot/dts/apple/t8011-j208.dts +++ b/arch/arm64/boot/dts/apple/t8011-j208.dts @@ -19,6 +19,24 @@ compatible = "apple,j208-bcm4355c0-bt", "brcm,bcm4355c0-bt"; }; +&h9g_display { + panel-timing { + /* + * 10.5-inch iPad Pro 2 native 120 Hz active scanout (two + * 1227-line subframes, htotal 1756, vtotal 2454). + */ + clock-frequency = <517107000>; + hactive = <1668>; + vactive = <2224>; + hfront-porch = <62>; + hback-porch = <18>; + hsync-len = <8>; + vfront-porch = <230>; + vback-porch = <0>; + vsync-len = <0>; + }; +}; + &headphones { simple-audio-card,name = "J208 Headphones"; }; From 1f3b910e6e49677071fe612f01b31ac79757a977 Mon Sep 17 00:00:00 2001 From: Grier Johnson Date: Fri, 4 Dec 2026 20:41:48 -0700 Subject: [PATCH 3/3] drm/simpledrm: Read H9G panel timings from device tree 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 --- drivers/gpu/drm/sysfb/Kconfig | 1 + drivers/gpu/drm/sysfb/simpledrm.c | 112 ++++++++++++++++++++++-------- 2 files changed, 83 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/sysfb/Kconfig b/drivers/gpu/drm/sysfb/Kconfig index f7e48178885ee8..d9266e1b874b4e 100644 --- a/drivers/gpu/drm/sysfb/Kconfig +++ b/drivers/gpu/drm/sysfb/Kconfig @@ -62,6 +62,7 @@ config DRM_SIMPLEDRM select DRM_GEM_SHMEM_HELPER select DRM_KMS_HELPER select DRM_SYSFB_HELPER + select VIDEOMODE_HELPERS if OF help DRM driver for simple platform-provided framebuffers. diff --git a/drivers/gpu/drm/sysfb/simpledrm.c b/drivers/gpu/drm/sysfb/simpledrm.c index b34230a7cbe4d6..2326e27014652b 100644 --- a/drivers/gpu/drm/sysfb/simpledrm.c +++ b/drivers/gpu/drm/sysfb/simpledrm.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -14,6 +15,9 @@ #include #include +#include