From 66e605c3a6fcdc3c2182cfb0b6693703fdf29bf6 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Sat, 31 Oct 2026 14:39:12 -0400 Subject: [PATCH 01/10] dt-bindings: display: google,gs201-decon: Add the Tensor G3 The Tensor G3 (zuma) DECON0 is the Tensor G4's: Google's display driver builds zuma with the same CAL (cal_9865), and the Pixel 8 Pro's stock DECON0 node has zumapro's main registers (0x19470000), DPP0 read DMA (0x19900000), interrupts (SPI 243, 242, 241) and fourteen windows. Add its compatible. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- .../bindings/display/samsung/google,gs201-decon.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/display/samsung/google,gs201-decon.yaml b/Documentation/devicetree/bindings/display/samsung/google,gs201-decon.yaml index 58709681c6..baf0a8b90c 100644 --- a/Documentation/devicetree/bindings/display/samsung/google,gs201-decon.yaml +++ b/Documentation/devicetree/bindings/display/samsung/google,gs201-decon.yaml @@ -10,9 +10,9 @@ maintainers: - Derek Ross description: - The DECON is the display controller of the gs201 (Tensor G2) and zumapro - (Tensor G4) display pipelines. It blends up to six or fourteen windows, - respectively, each fed by a DPP read DMA + The DECON is the display controller of the gs201 (Tensor G2), zuma + (Tensor G3) and zumapro (Tensor G4) display pipelines. It blends up to + six (gs201) or fourteen windows, each fed by a DPP read DMA channel, compresses the result with DSC and hands it to a DSIM. In command mode a frame is sent on each tearing effect (TE) pulse of the panel; register writes are double-buffered and take effect at the @@ -22,6 +22,7 @@ properties: compatible: enum: - google,gs201-decon + - google,zuma-decon - google,zumapro-decon reg: From 02186e32107240cef6528a48eb31209b4ce69c76 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Sat, 31 Oct 2026 14:39:32 -0400 Subject: [PATCH 02/10] drm: google: gs-decon: Add the Tensor G3 The Tensor G3 (zuma) DECON0 and DPP0 are the Tensor G4's: Google's display driver builds zuma with cal_9865, the CAL the zumapro support follows, and the Pixel 8 Pro's stock DECON0 sits at the same addresses with the same interrupts and fourteen windows. Match google,zuma-decon with zumapro's register layout, padded pitch and hardware trigger, and the Pixel 8 Pro's HK3 panel modes: 1344x2992 at 60 and 120 Hz, with the porches of Google's panel-gs-hk3.c and its 70 x 155 mm size. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- drivers/gpu/drm/google/gs-decon.c | 43 +++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/google/gs-decon.c b/drivers/gpu/drm/google/gs-decon.c index 4d686e0e91..cbeeddc11d 100644 --- a/drivers/gpu/drm/google/gs-decon.c +++ b/drivers/gpu/drm/google/gs-decon.c @@ -33,8 +33,9 @@ * * Register layout from Google's GPL display driver * (google-modules/display/samsung/cal_9845/regs-decon.h and regs-dpp.h), - * which gs201 shares with gs101. G4 offsets and the fourteen-window mask - * follow cal_9865/regs-decon.h and regs-dpp.h in the same GPL driver. + * which gs201 shares with gs101. G3 and G4 offsets and the fourteen-window + * mask follow cal_9865/regs-decon.h and regs-dpp.h in the same GPL driver, + * which builds that CAL for both. */ #include @@ -232,6 +233,30 @@ static const struct drm_display_mode tegu_decon_modes[] = { TEGU_DECON_MODE(120), }; +/* + * The Pixel 8 Pro's HK3 at 1344x2992, from panel-gs-hk3.c, at 60 Hz (the + * bootloader's) and 120 Hz. + */ +#define HK3_DECON_MODE(hz) { \ + .clock = (1344 + 80 + 24 + 42) * (2992 + 12 + 4 + 22) * (hz) / 1000, \ + .hdisplay = 1344, \ + .hsync_start = 1344 + 80, \ + .hsync_end = 1344 + 80 + 24, \ + .htotal = 1344 + 80 + 24 + 42, \ + .vdisplay = 2992, \ + .vsync_start = 2992 + 12, \ + .vsync_end = 2992 + 12 + 4, \ + .vtotal = 2992 + 12 + 4 + 22, \ + .width_mm = 70, \ + .height_mm = 155, \ + .type = DRM_MODE_TYPE_DRIVER, \ +} + +static const struct drm_display_mode hk3_decon_modes[] = { + HK3_DECON_MODE(60), + HK3_DECON_MODE(120), +}; + struct gs_decon_soc_data { const struct drm_display_mode *modes; unsigned int num_modes; @@ -265,6 +290,19 @@ static const struct gs_decon_soc_data zumapro_decon_data = { .floors_optional = true, }; +/* G3 shares G4's CAL (cal_9865) and DECON0 registers. */ +static const struct gs_decon_soc_data zuma_decon_data = { + .modes = hk3_decon_modes, + .num_modes = ARRAY_SIZE(hk3_decon_modes), + .image_size_reg = 0x001c, + .source_offset_reg = 0x0018, + .shadow_update_mask = SHD_REG_UP_REQ_FLIP(0x3fff), + .separate_source_height = true, + .padded_pitch = true, + .start_hw_trigger = true, + .floors_optional = true, +}; + #define GS_DECON_BOOT_HZ 60 struct gs_decon { @@ -1542,6 +1580,7 @@ static void gs_decon_shutdown(struct platform_device *pdev) static const struct of_device_id gs_decon_of_match[] = { { .compatible = "google,gs201-decon", .data = &gs201_decon_data }, + { .compatible = "google,zuma-decon", .data = &zuma_decon_data }, { .compatible = "google,zumapro-decon", .data = &zumapro_decon_data }, { /* sentinel */ } }; From 2e1c5cff0de054cb8d04ebd8dc0d5614376efca1 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Sat, 31 Oct 2026 14:39:45 -0400 Subject: [PATCH 03/10] arm64: dts: exynos: google: zuma: add DECON0 Describe zuma's DECON0 with its DPP0 read DMA window and its frame start, frame done and extra interrupts, from the Pixel 8 Pro's stock node, as zumapro.dtsi does. It is disabled: a board enables it with its scanout pool and boot framebuffer. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- arch/arm64/boot/dts/exynos/google/zuma.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma.dtsi b/arch/arm64/boot/dts/exynos/google/zuma.dtsi index 3e7f5ce278..aa16188026 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma.dtsi @@ -879,6 +879,18 @@ }; }; + /* Scans out what the bootloader set up; no panel or clock control. */ + decon0: display-controller@19470000 { + compatible = "google,zuma-decon"; + reg = <0x19470000 0x2000>, <0x19900000 0x1000>; + reg-names = "main", "dma"; + interrupts = , + , + ; + interrupt-names = "frame_start", "frame_done", "extra"; + status = "disabled"; + }; + cmu_top: clock-controller@26040000 { compatible = "google,zuma-cmu-top"; reg = <0x26040000 0x8000>; From c5f9f3ca3be464acf4dd4e9f43116433dc38dd9f Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Sat, 31 Oct 2026 14:40:41 -0400 Subject: [PATCH 04/10] arm64: dts: exynos: google: zuma-husky: enable DECON0 Turn on DECON0 on the Pixel 8 Pro with a 64 MiB reusable scanout pool below 4 GiB, for DPP0's 32-bit DMA, in RAM that stock leaves free, and the bootloader's splash as its boot framebuffer. DPP0 already scans the splash out by its physical address (RDMA_BASEADDR_P0 reads 0xfac00000). There is no DSIM on its output port yet, so gs-decon stays at the bootloader's 60 Hz. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- .../boot/dts/exynos/google/zuma-husky.dts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts index b822ba3077..3a06251b0d 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts +++ b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts @@ -168,6 +168,18 @@ no-map; }; + /* + * DECON's scanout buffers, below 4 GiB for DPP0's 32-bit DMA, + * in RAM that stock leaves free. + */ + display_pool: display-pool { + compatible = "shared-dma-pool"; + reusable; + size = <0x04000000>; + alignment = <0x0 0x00200000>; + alloc-ranges = <0x0 0xc4000000 0x10000000>; + }; + /* * All of the Wi-Fi chip's DMA buffers come from this pool, below * 4 GiB, as on the Pixel 7 Pro: it keeps driver bugs and stray @@ -207,6 +219,17 @@ }; }; +/* + * DECON0 takes the display over from simple-framebuffer and flips DPP0 + * between scanout buffers. Without a DSIM on its output port it stays at + * the bootloader's 60 Hz. + */ +&decon0 { + memory-region = <&display_pool>, <&cont_splash_mem>; + memory-region-names = "pool", "boot-framebuffer"; + status = "okay"; +}; + /* * Wi-Fi: the BCM4398 on pcie_1, one Gen3 lane as on stock. Its DMA * buffers come from wifi_dma_pool. From 24ba8f188d9bd54d989fde3c1449536d19e27c48 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Mon, 9 Nov 2026 13:06:14 -0500 Subject: [PATCH 05/10] dt-bindings: display: samsung: google,gs201-dsim: Add the Tensor G3 The Tensor G3 (zuma) DSIM0 has gs201's register layout for the command path: Google's cal_9865/regs-dsim.h, which its display driver builds for zuma, has cal_9845's offsets for every register gs-dsim-cmd uses, and on the Pixel 8 Pro they hold the bootloader's command-mode setup (version 0x02090100). Add google,zuma-dsim next to google,zumapro-dsim, with google,gs201-dsim as the fallback of both. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- .../bindings/display/samsung/google,gs201-dsim.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/display/samsung/google,gs201-dsim.yaml b/Documentation/devicetree/bindings/display/samsung/google,gs201-dsim.yaml index e70bda177c..db2f48a8cb 100644 --- a/Documentation/devicetree/bindings/display/samsung/google,gs201-dsim.yaml +++ b/Documentation/devicetree/bindings/display/samsung/google,gs201-dsim.yaml @@ -14,8 +14,8 @@ description: pipeline. It takes pixel data from a DECON and drives up to four data lanes through a combined D-PHY/C-PHY, in video or command mode, with DSC slice packing and TE-based command scheduling. Panels are described - as child nodes. The Tensor G4 (zumapro) has the same DSIM, at the same - register layout. + as child nodes. The Tensor G3 (zuma) and Tensor G4 (zumapro) have the + same DSIM, at the same register layout. allOf: - $ref: /schemas/display/dsi-controller.yaml# @@ -25,7 +25,9 @@ properties: oneOf: - const: google,gs201-dsim - items: - - const: google,zumapro-dsim + - enum: + - google,zuma-dsim + - google,zumapro-dsim - const: google,gs201-dsim reg: From 048bc1142976f6e11a9ed6d69595dddaab1431ba Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Sat, 31 Oct 2026 15:04:12 -0400 Subject: [PATCH 06/10] arm64: dts: exynos: google: zuma: add DSIM0 Describe zuma's DSIM0 with its link and D-PHY windows and its interrupt (SPI 252), from the Pixel 8 Pro's stock node, as Google's zuma tree has them. It is disabled: a board enables it with its panel. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- arch/arm64/boot/dts/exynos/google/zuma.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma.dtsi b/arch/arm64/boot/dts/exynos/google/zuma.dtsi index aa16188026..209e23b744 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma.dtsi @@ -879,6 +879,17 @@ }; }; + dsi0: dsi@19440000 { + compatible = "google,zuma-dsim", "google,gs201-dsim"; + reg = <0x19440000 0x300>, <0x19460100 0x700>, + <0x19460000 0x100>; + reg-names = "dsi", "dphy", "dphy-extra"; + interrupts = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + /* Scans out what the bootloader set up; no panel or clock control. */ decon0: display-controller@19470000 { compatible = "google,zuma-decon"; From 68041c09a047656f155a14e2f54533534b80ee42 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Sat, 31 Oct 2026 15:05:12 -0400 Subject: [PATCH 07/10] drm: google: gs-dsim-cmd: Add the Pixel 8 Pro's link timers Add the command-mode timers for the Pixel 8 Pro's HK3 link, so gs-decon can switch it between 60 and 120 Hz. The 60 Hz pair is the bootloader's (UNDERRUN_CTRL 0x2235, CMD_TE_CTRL1 0x34c53c1e). At 120 Hz the TE protect and timeout fields are halved, as for the other two links, and the underrun is Google's dsim_calc_underrun() for 4 lanes at 1368 Mbit/s, DSC 3:1, 1344x2992 and HK3's TE idle of 350 us with a 1 % variance: the same formula gives the bootloader's 60 Hz value exactly. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- drivers/gpu/drm/google/gs-dsim-cmd.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/google/gs-dsim-cmd.c b/drivers/gpu/drm/google/gs-dsim-cmd.c index a332f8b0fd..cdb67ffd0c 100644 --- a/drivers/gpu/drm/google/gs-dsim-cmd.c +++ b/drivers/gpu/drm/google/gs-dsim-cmd.c @@ -123,6 +123,16 @@ static const struct gs_dsim_rate gs_dsim_rates[][2] = { { .hz = 60, .underrun = 0x18c8, .te_ctrl1 = 0x2a82306d }, { .hz = 120, .underrun = 0x02a0, .te_ctrl1 = 0x15411836 }, }, + /* + * Pixel 8 Pro, HK3: 4 lanes at 1368 Mbit/s (word clock 85.5 MHz), + * DSC 3:1, 1344x2992, TE idle 350 us. Google's dsim_calc_underrun() + * gives the bootloader's 60 Hz value exactly at that rate, so the + * 120 Hz one is the formula's too. + */ + { + { .hz = 60, .underrun = 0x2235, .te_ctrl1 = 0x34c53c1e }, + { .hz = 120, .underrun = 0x06a7, .te_ctrl1 = 0x1a621e0f }, + }, }; struct gs_dsim { From 21bb48e28eab33d8a1d38ebf15b0f97765a55049 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Sat, 31 Oct 2026 15:07:20 -0400 Subject: [PATCH 08/10] dt-bindings: display: panel: Add Google HK3 The HK3 is the Google Pixel 8 Pro's 1344x2992 command-mode AMOLED panel: DSC 1.2 with two 672x187 slices at 8 bits per pixel over four DSI lanes, a TE line, and 60 or 120 Hz, as in Google's panel-gs-hk3.c. Its supplies and reset line are described as on the TG4C, though the driver takes the panel over as the bootloader left it. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- .../bindings/display/panel/google,hk3.yaml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/google,hk3.yaml diff --git a/Documentation/devicetree/bindings/display/panel/google,hk3.yaml b/Documentation/devicetree/bindings/display/panel/google,hk3.yaml new file mode 100644 index 0000000000..1548826727 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/google,hk3.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/google,hk3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Google HK3 AMOLED DSI panel + +description: + The HK3 is the 1344x2992 command-mode AMOLED panel of the Google Pixel + 8 Pro. It takes DSC 1.2 compressed pixel data (two 672x187 slices at 8 + bits per pixel) over four MIPI DSI lanes, reports its refresh timing on + a tearing effect (TE) line and runs at 60 or 120 Hz. + +maintainers: + - Brett-Michael Green + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + const: google,hk3 + + reg: + maxItems: 1 + + reset-gpios: true + + vddi-supply: + description: I/O supply + + vddd-supply: + description: Digital core supply + + vci-supply: + description: Analog supply + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "google,hk3"; + reg = <0>; + reset-gpios = <&gpp0 0 GPIO_ACTIVE_LOW>; + vci-supply = <&vci>; + vddi-supply = <&vddi>; + vddd-supply = <&vddd>; + }; + }; + +... From 6064fe03677c9646f6065fbc8d366dc5d9b2b6a1 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Sat, 31 Oct 2026 15:07:32 -0400 Subject: [PATCH 09/10] drm/panel: Add Google HK3 panel driver Add a driver for the Google Pixel 8 Pro's HK3 command-mode AMOLED panel, with command sequences from Google's MIT-licensed panel-gs-hk3.c. Like the TG4C driver, it takes the panel over as the bootloader left it: out of sleep, with the display on, at 60 Hz. It never resets the panel or touches its supplies. It: - puts the panel to sleep and wakes it, with Google's display on and off sequences around display on/off (the AMP type and Vreg changes, with the Vreg of panels from DVT1 on, the retail ones); - switches it between 60 and 120 Hz in high-speed (HS) manual mode, sending the whole of Google's panel feature update for that mode each time: fixed TE and early exit at 120 Hz, changeable TE and no early exit at 60 Hz, then the manual frequency, applied together by the frame update command. The HBM and IRC settings stay as the bootloader left them; - exposes its brightness as a backlight over Google's normal range, DBV 196-3307 (2-1000 nits), using pixel off at 0 as Google does. A level set while the panel is asleep, or before gs-dsim-cmd allows commands (allow_tx), is kept and sent with the next write, so a boot-time restore of the saved level does not fail. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-google-hk3.c | 381 +++++++++++++++++++++++ 4 files changed, 400 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-google-hk3.c diff --git a/MAINTAINERS b/MAINTAINERS index 1a68316b1c..a41d259607 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8148,6 +8148,12 @@ T: git https://gitlab.freedesktop.org/drm/misc/kernel.git F: drivers/gpu/drm/gud/ F: include/drm/gud.h +DRM DRIVER FOR GOOGLE HK3 PANELS +M: Brett-Michael Green +S: Maintained +F: Documentation/devicetree/bindings/display/panel/google,hk3.yaml +F: drivers/gpu/drm/panel/panel-google-hk3.c + DRM DRIVER FOR GOOGLE TG4C PANELS M: W4HO <87742609+W4HO-ham@users.noreply.github.com> S: Maintained diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index f094fcda72..625290c7fa 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -213,6 +213,18 @@ config DRM_PANEL_DSI_CM DRM panel driver for DSI command mode panels with support for embedded and external backlights. +config DRM_PANEL_GOOGLE_HK3 + tristate "Google HK3 DSI command mode panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y or M here if you want to enable support for the Google + HK3 1344x2992 command-mode AMOLED panel, found in the Google + Pixel 8 Pro. The driver takes over the panel the bootloader left + running, switches it between 60 and 120 Hz, puts it to sleep and + exposes its brightness as a backlight. + config DRM_PANEL_GOOGLE_TG4C tristate "Google TG4C DSI command mode panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 23955a31d9..93ed5eecea 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_DRM_PANEL_BOE_TV101WUM_NL6) += panel-boe-tv101wum-nl6.o obj-$(CONFIG_DRM_PANEL_CHIPONE_ICNA35XX) += panel-chipone-icna35xx.o obj-$(CONFIG_DRM_PANEL_CHIPWEALTH_CH13726A) += panel-chipwealth-ch13726a.o obj-$(CONFIG_DRM_PANEL_DSI_CM) += panel-dsi-cm.o +obj-$(CONFIG_DRM_PANEL_GOOGLE_HK3) += panel-google-hk3.o obj-$(CONFIG_DRM_PANEL_GOOGLE_TG4C) += panel-google-tg4c.o obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o diff --git a/drivers/gpu/drm/panel/panel-google-hk3.c b/drivers/gpu/drm/panel/panel-google-hk3.c new file mode 100644 index 0000000000..e1842d92fc --- /dev/null +++ b/drivers/gpu/drm/panel/panel-google-hk3.c @@ -0,0 +1,381 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Google HK3 DSI command-mode AMOLED panel (Google Pixel 8 Pro) + * + * Command sequences from Google's MIT-licensed panel driver + * (kernel/devices/google/shusky/display/panel-gs-hk3.c). + * + * The bootloader powers the panel on, initialises it and leaves it running + * at 60 Hz. The driver takes it over as it is and never resets it or + * touches its supplies: it puts it to sleep and wakes it (sleep in/out, + * the panel keeps its registers), switches it between 60 and 120 Hz in + * high-speed (HS) manual mode and sets its brightness. A panel without + * the bootloader's initialisation is not handled. + */ + +#include +#include +#include +#include + +#include