From b5a3160322b2f0ccee98370afdc126681964e015 Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Wed, 14 Oct 2026 22:32:18 +0100 Subject: [PATCH 1/9] dt-bindings: display: samsung: add gs101 to the gs201 DECON and DSIM gs101 (Tensor) has the same DECON and DSIM blocks as gs201 (Google's cal_9845 register layout); only DECON0's address and the interrupt numbers differ. Describe both with gs201's compatible as the fallback. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo --- .../bindings/display/samsung/google,gs201-decon.yaml | 12 ++++++++---- .../bindings/display/samsung/google,gs201-dsim.yaml | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/display/samsung/google,gs201-decon.yaml b/Documentation/devicetree/bindings/display/samsung/google,gs201-decon.yaml index baf0a8b90c..28dfb1a80e 100644 --- a/Documentation/devicetree/bindings/display/samsung/google,gs201-decon.yaml +++ b/Documentation/devicetree/bindings/display/samsung/google,gs201-decon.yaml @@ -20,10 +20,14 @@ description: properties: compatible: - enum: - - google,gs201-decon - - google,zuma-decon - - google,zumapro-decon + oneOf: + - enum: + - google,gs201-decon + - google,zuma-decon + - google,zumapro-decon + - items: + - const: google,gs101-decon + - const: google,gs201-decon reg: items: diff --git a/Documentation/devicetree/bindings/display/samsung/google,gs201-dsim.yaml b/Documentation/devicetree/bindings/display/samsung/google,gs201-dsim.yaml index db2f48a8cb..1244b872cf 100644 --- a/Documentation/devicetree/bindings/display/samsung/google,gs201-dsim.yaml +++ b/Documentation/devicetree/bindings/display/samsung/google,gs201-dsim.yaml @@ -26,6 +26,7 @@ properties: - const: google,gs201-dsim - items: - enum: + - google,gs101-dsim - google,zuma-dsim - google,zumapro-dsim - const: google,gs201-dsim From d312f4a480bc4602a727f56ce6b54d4c7de00a27 Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Thu, 29 Oct 2026 06:18:07 +0000 Subject: [PATCH 2/9] drm: google: gs-decon: gs101's own match data gs101's DECON is gs201's (Google's cal_9845 register layout), and it falls back to gs201's compatible. Give "google,gs101-decon" its own match data, gs201's for now, so that behaviour found and tested on the Pixel 6 Pro only can be turned on for gs101 without changing the Pixel 7 Pro. The DSIM needs nothing of its own and matches through the gs201 fallback. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo --- drivers/gpu/drm/google/gs-decon.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/google/gs-decon.c b/drivers/gpu/drm/google/gs-decon.c index cbeeddc11d..1df22cdc7f 100644 --- a/drivers/gpu/drm/google/gs-decon.c +++ b/drivers/gpu/drm/google/gs-decon.c @@ -33,9 +33,10 @@ * * 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. 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. + * which gs201 shares with gs101. On gs101 only DECON0's address and the + * interrupt numbers differ (device tree). 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 @@ -278,6 +279,18 @@ static const struct gs_decon_soc_data gs201_decon_data = { .shadow_update_mask = SHD_REG_UP_REQ_FLIP(SHD_REG_UP_REQ_ALL_WIN), }; +/* + * gs101 is gs201's DECON; the boot framebuffer and sleep handling below were + * found and tested on raven only, so they stay off for gs201. + */ +static const struct gs_decon_soc_data gs101_decon_data = { + .modes = gs_decon_modes, + .num_modes = ARRAY_SIZE(gs_decon_modes), + .image_size_reg = RDMA_IMG_SIZE, + .source_offset_reg = RDMA_SRC_OFFSET, + .shadow_update_mask = SHD_REG_UP_REQ_FLIP(SHD_REG_UP_REQ_ALL_WIN), +}; + static const struct gs_decon_soc_data zumapro_decon_data = { .modes = tegu_decon_modes, .num_modes = ARRAY_SIZE(tegu_decon_modes), @@ -1579,6 +1592,7 @@ static void gs_decon_shutdown(struct platform_device *pdev) } static const struct of_device_id gs_decon_of_match[] = { + { .compatible = "google,gs101-decon", .data = &gs101_decon_data }, { .compatible = "google,gs201-decon", .data = &gs201_decon_data }, { .compatible = "google,zuma-decon", .data = &zuma_decon_data }, { .compatible = "google,zumapro-decon", .data = &zumapro_decon_data }, From 6a6a4276698298e8d2ee05c538ec300bae55a199 Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Thu, 15 Oct 2026 04:47:00 +0100 Subject: [PATCH 3/9] dt-bindings: display: panel: samsung,s6e3hc4: add the S6E3HC3 The S6E3HC3 in the Pixel 6 Pro is the S6E3HC4's predecessor, with the same supplies and reset line. The bootloader leaves it running and its driver takes it over without a reset, so reset-gpios is required only for the S6E3HC4. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo --- .../bindings/display/panel/samsung,s6e3hc4.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/samsung,s6e3hc4.yaml b/Documentation/devicetree/bindings/display/panel/samsung,s6e3hc4.yaml index 39c26ee093..4a5081ceab 100644 --- a/Documentation/devicetree/bindings/display/panel/samsung,s6e3hc4.yaml +++ b/Documentation/devicetree/bindings/display/panel/samsung,s6e3hc4.yaml @@ -20,7 +20,9 @@ allOf: properties: compatible: - const: samsung,s6e3hc4 + enum: + - samsung,s6e3hc3 + - samsung,s6e3hc4 reg: maxItems: 1 @@ -39,7 +41,15 @@ properties: required: - compatible - reg - - reset-gpios + +if: + properties: + compatible: + contains: + const: samsung,s6e3hc4 +then: + required: + - reset-gpios unevaluatedProperties: false From 199ad15395050c80201008137c2ff8b16a39eaee Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Thu, 15 Oct 2026 04:47:00 +0100 Subject: [PATCH 4/9] drm/panel: add a Samsung S6E3HC3 driver The Pixel 6 Pro's bootloader leaves the S6E3HC3 running in DSI command mode. Take it over as it is, like the S6E3HC4 driver: no reset or rail changes, nothing sent until the backlight changes. Brightness is DCS 0x51 in the normal range 4..2047 (Google's GPL driver). Level 0 is the dimmest level, not off: Omarchy darkens with level 0 before locking and puts the level back afterwards, and when the put-back did not happen the panel stayed dark with nothing to wake it. A blanked backlight turns the display off (0x28, then 20 ms), and the next unblanked update turns it back on. Since a reloaded driver cannot know whether the panel was left with its display off, its first unblanked update sends display on. The refresh rate switches between 60 and 120 Hz with the vendor driver's manual mode: unlock F0, BD 21 (manual), 60 00 for 120 Hz or 60 01 for 60 Hz, F7 0F (frequency update), lock F0. The panel takes the new rate at its next frame without a power cycle; gs-dsim-cmd switches its link timers around it. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo --- MAINTAINERS | 5 + drivers/gpu/drm/panel/Kconfig | 12 ++ drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6e3hc3.c | 204 ++++++++++++++++++ 4 files changed, 222 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6e3hc3.c diff --git a/MAINTAINERS b/MAINTAINERS index a41d259607..2c4ec69a7a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8498,6 +8498,11 @@ S: Maintained F: Documentation/devicetree/bindings/display/panel/samsung,s6e3ha8.yaml F: drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c +DRM DRIVER FOR SAMSUNG S6E3HC3 PANELS +M: saiththerobo +S: Maintained +F: drivers/gpu/drm/panel/panel-samsung-s6e3hc3.c + DRM DRIVER FOR SAMSUNG S6E8FC0 PANELS M: Yedaya Katsman S: Maintained diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 625290c7fa..d82882275e 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -1085,6 +1085,18 @@ config DRM_PANEL_SAMSUNG_S6E3HA8 Samsung AMB577PX01 (found in the Samsung S9 smartphone) +config DRM_PANEL_SAMSUNG_S6E3HC3 + tristate "Samsung S6E3HC3 DSI command mode panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y or M here to control the Samsung S6E3HC3 command-mode AMOLED + panel in the Google Pixel 6 Pro: its brightness through a backlight + device, and display on and off. The panel is used as the bootloader + left it running: the driver sends no initialisation sequence, and + the display modes come from the display controller's driver. + config DRM_PANEL_SAMSUNG_S6E3HC4 tristate "Samsung S6E3HC4 DSI command mode panel" depends on GPIOLIB diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 93ed5eecea..e9506c1721 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -103,6 +103,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3FC2X01) += panel-samsung-s6e3fc2x01.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3FC3) += panel-samsung-s6e3fc3.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA8) += panel-samsung-s6e3ha8.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HC3) += panel-samsung-s6e3hc3.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HC4) += panel-samsung-s6e3hc4.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) += panel-samsung-s6e63m0.o diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3hc3.c b/drivers/gpu/drm/panel/panel-samsung-s6e3hc3.c new file mode 100644 index 0000000000..0aaaf56eff --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3hc3.c @@ -0,0 +1,204 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Samsung S6E3HC3 DSI command-mode AMOLED panel (Google Pixel 6 Pro) + * + * Brightness levels and the display off/on commands from Google's GPL panel + * driver (google-modules/display/samsung/panel/panel-samsung-s6e3hc3.c). + * + * The bootloader powers the panel on and leaves it running, scanned out by + * simpledrm or gs-decon. This driver takes it over as it is: it never drives + * the reset line or the rails, and sends nothing until the brightness or the + * backlight power state changes. A blanked backlight (bl_power) turns the + * display off, which stops the OLED emitting but keeps the panel out of + * sleep with its registers intact; unblanking turns it back on. Level 0 + * is the dimmest level, not off. It switches between 60 and 120 Hz for the + * DSIM (drm_panel_set_refresh_rate()). + */ + +#include +#include +#include +#include + +#include +#include +#include + +/* Normal range; 2232..3152 are the high brightness mode (HBM) levels. */ +#define S6E3HC3_MIN_BRIGHTNESS 4 +#define S6E3HC3_MAX_BRIGHTNESS 2047 +#define S6E3HC3_DEFAULT_BRIGHTNESS 1023 + +struct s6e3hc3 { + struct drm_panel panel; + struct mipi_dsi_device *dsi; + /* guards the state below and keeps sequences from interleaving */ + struct mutex lock; + bool display_off; +}; + +static int s6e3hc3_bl_update_status(struct backlight_device *bl) +{ + struct s6e3hc3 *ctx = bl_get_data(bl); + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; + u16 brightness = backlight_get_brightness(bl); + int ret; + + guard(mutex)(&ctx->lock); + + /* + * Only a blanked backlight turns the display off. Level 0 is the + * dimmest level: Omarchy darkens with 0 before locking and puts the + * level back afterwards, and a level left at 0 must not leave the + * panel dark with nothing to wake it. + */ + if (backlight_is_blank(bl)) { + if (!ctx->display_off) { + mipi_dsi_dcs_set_display_off_multi(&dsi_ctx); + /* as the vendor driver: 20 ms after display off */ + mipi_dsi_msleep(&dsi_ctx, 20); + if (!dsi_ctx.accum_err) + ctx->display_off = true; + } + return dsi_ctx.accum_err; + } + + /* DBV, most significant byte first */ + brightness = max_t(u16, brightness, S6E3HC3_MIN_BRIGHTNESS); + ret = mipi_dsi_dcs_set_display_brightness_large(ctx->dsi, brightness); + if (ret < 0) + return ret; + + if (ctx->display_off) { + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx); + if (!dsi_ctx.accum_err) + ctx->display_off = false; + } + + return dsi_ctx.accum_err; +} + +static const struct backlight_ops s6e3hc3_bl_ops = { + .update_status = s6e3hc3_bl_update_status, +}; + +/* + * Manual 60/120 Hz, as the vendor driver's s6e3hc3_set_manual_mode(): the + * rate takes effect at the panel's next frame (frequency update), with no + * power cycle. The DSIM switches its link timers around this. + */ +static int s6e3hc3_set_refresh_rate(struct drm_panel *panel, unsigned int hz) +{ + struct s6e3hc3 *ctx = container_of(panel, struct s6e3hc3, panel); + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; + + if (hz != 60 && hz != 120) + return -EINVAL; + + guard(mutex)(&ctx->lock); + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0x5a, 0x5a); + /* manual mode, then 0x00 for 120 Hz or 0x01 for 60 Hz */ + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xbd, 0x21); + if (hz == 120) + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x60, 0x00); + else + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x60, 0x01); + /* frequency update */ + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf7, 0x0f); + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0xa5, 0xa5); + + return dsi_ctx.accum_err; +} + +static const struct drm_panel_funcs s6e3hc3_panel_funcs = { + .set_refresh_rate = s6e3hc3_set_refresh_rate, +}; + +static int s6e3hc3_probe(struct mipi_dsi_device *dsi) +{ + struct device *dev = &dsi->dev; + struct backlight_properties props = { + .type = BACKLIGHT_RAW, + .brightness = S6E3HC3_DEFAULT_BRIGHTNESS, + .max_brightness = S6E3HC3_MAX_BRIGHTNESS, + .scale = BACKLIGHT_SCALE_NON_LINEAR, + }; + struct backlight_device *bl; + struct s6e3hc3 *ctx; + int ret; + + ctx = devm_drm_panel_alloc(dev, struct s6e3hc3, panel, + &s6e3hc3_panel_funcs, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(ctx)) + return PTR_ERR(ctx); + + ret = devm_mutex_init(dev, &ctx->lock); + if (ret) + return ret; + + ctx->dsi = dsi; + mipi_dsi_set_drvdata(dsi, ctx); + /* + * Unknown after a module reload: the first unblanked update sends + * display on, which is harmless on a lit panel. + */ + ctx->display_off = true; + + dsi->lanes = 4; + dsi->format = MIPI_DSI_FMT_RGB888; + dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS; + + /* + * The bootloader's level is unknown, so the first write sets the + * default. Nothing is sent until then. + */ + bl = devm_backlight_device_register(dev, dev_name(dev), dev, ctx, + &s6e3hc3_bl_ops, &props); + if (IS_ERR(bl)) + return dev_err_probe(dev, PTR_ERR(bl), + "failed to register backlight\n"); + ctx->panel.backlight = bl; + + drm_panel_add(&ctx->panel); + + ret = mipi_dsi_attach(dsi); + if (ret < 0) { + drm_panel_remove(&ctx->panel); + return dev_err_probe(dev, ret, "failed to attach to DSI host\n"); + } + + dev_info(dev, "taken over from the bootloader\n"); + return 0; +} + +static void s6e3hc3_remove(struct mipi_dsi_device *dsi) +{ + struct s6e3hc3 *ctx = mipi_dsi_get_drvdata(dsi); + int ret; + + ret = mipi_dsi_detach(dsi); + if (ret < 0) + dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret); + + drm_panel_remove(&ctx->panel); +} + +static const struct of_device_id s6e3hc3_of_match[] = { + { .compatible = "samsung,s6e3hc3" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, s6e3hc3_of_match); + +static struct mipi_dsi_driver s6e3hc3_driver = { + .probe = s6e3hc3_probe, + .remove = s6e3hc3_remove, + .driver = { + .name = "panel-samsung-s6e3hc3", + .of_match_table = s6e3hc3_of_match, + }, +}; +module_mipi_dsi_driver(s6e3hc3_driver); + +MODULE_DESCRIPTION("Samsung S6E3HC3 panel: brightness and display on/off"); +MODULE_LICENSE("GPL"); From 0a31474ddbe4607e6c92ea54b7101b5e455d3871 Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Thu, 15 Oct 2026 07:31:26 +0100 Subject: [PATCH 5/9] drm: google: gs-decon: put MIF back after a 120 Hz stint Dropping the 120 Hz floor left MIF at 1352 MHz, screen off included, since nothing else votes on it. Remember the rate at probe and set it back when the floor goes (the CRTC disable drops to 60 Hz first). On the Pixel 7 Pro MIF reads 2028 MHz at probe, above the 1352 MHz floor, and nothing else votes on it, so this costs one ACPM read when leaving 120 Hz and writes nothing there. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo --- drivers/gpu/drm/google/gs-decon.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/google/gs-decon.c b/drivers/gpu/drm/google/gs-decon.c index 1df22cdc7f..6f1c8c8a06 100644 --- a/drivers/gpu/drm/google/gs-decon.c +++ b/drivers/gpu/drm/google/gs-decon.c @@ -344,6 +344,8 @@ struct gs_decon { /* optional ACPM DVFS domains, floors at 120 Hz */ struct clk *mif; + /* MIF before any 120 Hz floor, put back when the floor goes */ + unsigned long mif_rest; struct clk *disp; /* the link and panel, for rate switching; NULL: 60 Hz only */ @@ -719,6 +721,17 @@ static void gs_decon_set_floors(struct gs_decon *dc, unsigned int hz) if (ret) dev_warn(dc->dev, "DISP floor for %u Hz: %d\n", hz, ret); + /* + * Nothing else votes on MIF yet, so without this it would stay at the + * 120 Hz floor after every 120 Hz stint, screen off included. + */ + if (!high && dc->mif_rest && clk_get_rate(dc->mif) > dc->mif_rest) { + ret = clk_set_rate(dc->mif, dc->mif_rest); + if (ret) + dev_warn(dc->dev, "MIF back to %lu Hz: %d\n", + dc->mif_rest, ret); + } + if (high) dev_dbg(dc->dev, "MIF %lu Hz, DISP %lu Hz\n", clk_get_rate(dc->mif), clk_get_rate(dc->disp)); @@ -1481,8 +1494,10 @@ static int gs_decon_probe(struct platform_device *pdev) dc->disp = devm_clk_get_optional(dev, "disp"); if (IS_ERR(dc->disp)) return dev_err_probe(dev, PTR_ERR(dc->disp), "disp clock\n"); - if (dc->mif) - dev_info(dev, "MIF at %lu Hz\n", clk_get_rate(dc->mif)); + if (dc->mif) { + dc->mif_rest = clk_get_rate(dc->mif); + dev_info(dev, "MIF at %lu Hz\n", dc->mif_rest); + } if (dc->disp) dev_info(dev, "DISP at %lu Hz\n", clk_get_rate(dc->disp)); From 107828152db5d1754f1a646d00d06c6dc39985f6 Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Thu, 15 Oct 2026 20:22:17 +0100 Subject: [PATCH 6/9] drm: google: gs-decon: hold the boot framebuffer's aperture gs-decon evicts simpledrm from the boot framebuffer, but on raven simpledrm probed 30 ms after gs-decon registered, found the aperture free and stayed: Hyprland drove it as a second, invisible monitor (Unknown-1) next to the panel. After the eviction, acquire the range too, so a later simpledrm fails its own acquire with -EBUSY. Only gs101 holds it: it adds a failure path to probe, and the Pixel 7 Pro (gs201) has not shown the race. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo --- drivers/gpu/drm/google/gs-decon.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/google/gs-decon.c b/drivers/gpu/drm/google/gs-decon.c index 6f1c8c8a06..68875de489 100644 --- a/drivers/gpu/drm/google/gs-decon.c +++ b/drivers/gpu/drm/google/gs-decon.c @@ -269,6 +269,8 @@ struct gs_decon_soc_data { bool start_hw_trigger; /* the bootloader leaves MIF and DISP above the 120 Hz floors */ bool floors_optional; + /* hold the boot framebuffer's aperture after evicting simpledrm */ + bool hold_boot_fb; }; static const struct gs_decon_soc_data gs201_decon_data = { @@ -289,6 +291,7 @@ static const struct gs_decon_soc_data gs101_decon_data = { .image_size_reg = RDMA_IMG_SIZE, .source_offset_reg = RDMA_SRC_OFFSET, .shadow_update_mask = SHD_REG_UP_REQ_FLIP(SHD_REG_UP_REQ_ALL_WIN), + .hold_boot_fb = true, }; static const struct gs_decon_soc_data zumapro_decon_data = { @@ -1546,6 +1549,17 @@ static int gs_decon_probe(struct platform_device *pdev) gs_decon_driver.name); if (ret) goto err_irqs; + /* + * and keep it: on raven simpledrm probed 30 ms after us, found the + * aperture free and stayed as a second, phantom output. Holding the + * range makes its own acquire fail with -EBUSY. + */ + if (dc->soc->hold_boot_fb) { + ret = devm_aperture_acquire_for_platform_device(pdev, dc->boot_fb.start, + resource_size(&dc->boot_fb)); + if (ret) + goto err_irqs; + } dc->kms = true; ret = drm_dev_register(&dc->drm, 0); From 3207df25bd83486f11067d4f00be732bb233dc5e Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Fri, 16 Oct 2026 13:54:46 +0100 Subject: [PATCH 7/9] drm: google: gs-decon: no VT switch around system sleep without fbdev With no fbdev console the suspend VT switch has nothing to show, but it still takes the session away from the compositor: logind deactivates and reactivates it, Hyprland (libseat) drops its input devices and reopens them, and the power-key press that woke the Pixel 6 Pro from s2idle is lost with the old device. Every wake needed a second press. Tell the PM core a VT switch is only needed with the fbdev console, and stop tracking the device on remove. Only on gs101 for now: the Pixel 7 Pro (gs201) runs without fbdev too, and its validated s2idle path keeps its VT switch until this has been tested there. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo --- drivers/gpu/drm/google/gs-decon.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/google/gs-decon.c b/drivers/gpu/drm/google/gs-decon.c index 68875de489..1a5dd8c216 100644 --- a/drivers/gpu/drm/google/gs-decon.c +++ b/drivers/gpu/drm/google/gs-decon.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -271,6 +272,8 @@ struct gs_decon_soc_data { bool floors_optional; /* hold the boot framebuffer's aperture after evicting simpledrm */ bool hold_boot_fb; + /* a VT switch around system sleep only with the fbdev console */ + bool vt_switch_fbdev_only; }; static const struct gs_decon_soc_data gs201_decon_data = { @@ -292,6 +295,7 @@ static const struct gs_decon_soc_data gs101_decon_data = { .source_offset_reg = RDMA_SRC_OFFSET, .shadow_update_mask = SHD_REG_UP_REQ_FLIP(SHD_REG_UP_REQ_ALL_WIN), .hold_boot_fb = true, + .vt_switch_fbdev_only = true, }; static const struct gs_decon_soc_data zumapro_decon_data = { @@ -1573,6 +1577,15 @@ static int gs_decon_probe(struct platform_device *pdev) */ if (fbdev) drm_client_setup(&dc->drm, NULL); + + /* + * Without an fbdev console, a VT switch around system sleep has + * nothing to show, and it costs the compositor its input devices: + * logind takes the session away and gives it back, and the key press + * that woke the phone is lost with the device it was queued on. + */ + if (dc->soc->vt_switch_fbdev_only) + pm_vt_switch_required(dev, fbdev); dev_info(dev, "flip-only KMS on DECON0, %ux%u, up to %u Hz (at %u Hz)\n", dc->width, dc->height, dc->max_hz, dc->hz); @@ -1591,6 +1604,8 @@ static void gs_decon_remove(struct platform_device *pdev) struct gs_decon *dc = platform_get_drvdata(pdev); if (dc->kms) { + if (dc->soc->vt_switch_fbdev_only) + pm_vt_switch_unregister(&pdev->dev); dc->going_down = true; drm_dev_unplug(&dc->drm); drm_atomic_helper_shutdown(&dc->drm); From a52e8a9d4a7c86b2664e5acbd978f22dd2109312 Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Thu, 15 Oct 2026 14:35:22 +0100 Subject: [PATCH 8/9] arm64: dts: exynos: gs101: add DECON0 and DSIM0 DECON0 at 0x1c300000 (frame start/done/extra on SPI 338/337/336), the DPP0 read DMA at 0x1c0b0000 and DSIM0 at 0x1c2c0000 (SPI 345), from Google's gs101-drm-dpu.dtsi, disabled. No power-domains: nothing may power the DPU down under DECON while the bootloader's pipeline runs. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo --- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi index ad1816b74f..95135701b8 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi @@ -2123,6 +2123,48 @@ clocks = <&cmu_dpu CLK_GOUT_DPU_SYSREG_DPU_PCLK>; }; + /* + * The display pipeline as the bootloader leaves it running: + * DECON0 in DSI command mode, scanning out through the DPP0 + * read DMA, into DSIM0 (Google's gs101-drm-dpu.dtsi). No + * power-domains: nothing may power the DPU down under DECON. + */ + decon0: display-controller@1c300000 { + compatible = "google,gs101-decon", "google,gs201-decon"; + reg = <0x1c300000 0x6000>, <0x1c0b0000 0x1000>; + reg-names = "main", "dma"; + interrupts = , + , + ; + interrupt-names = "frame_start", "frame_done", "extra"; + clocks = <&acpm_ipc GS101_CLK_ACPM_DVFS_MIF>, + <&acpm_ipc GS101_CLK_ACPM_DVFS_DISP>; + clock-names = "mif", "disp"; + status = "disabled"; + + port { + decon0_out: endpoint { + remote-endpoint = <&dsi0_in>; + }; + }; + }; + + dsi0: dsi@1c2c0000 { + compatible = "google,gs101-dsim", "google,gs201-dsim"; + reg = <0x1c2c0000 0x300>, + <0x1c2e0100 0x700>, + <0x1c2e0000 0x100>; + reg-names = "dsi", "dphy", "dphy-extra"; + interrupts = ; + status = "disabled"; + + port { + dsi0_in: endpoint { + remote-endpoint = <&decon0_out>; + }; + }; + }; + gpu: gpu@1c500000 { compatible = "google,gs101-mali", "arm,mali-valhall-jm"; reg = <0x1c500000 0x5000>; From 78d4ce6a165af51a77fbfdcccc54d8798fc0c800 Mon Sep 17 00:00:00 2001 From: saiththerobo Date: Thu, 15 Oct 2026 14:35:44 +0100 Subject: [PATCH 9/9] arm64: dts: exynos: google: gs101-raven: enable the display gs-decon takes the bootloader's pipeline over from simpledrm: DECON0 into DSIM0, with the S6E3HC3 panel for brightness, display on/off and 60/120 Hz. gs-decon also stops the frames with the screen off (screen_off), so the DSIM gets no google,decon phandle. Scanout buffers come from a reusable 92 MiB pool between 2.5 and 3.5 GiB: DPP0 takes 32-bit addresses with the DPU SysMMU bypassed, and its reads from 0xf2c00000 and up hung silently. The framebuffer node holds the panel's vci (LDO22M) and vddi (BUCKA) rails. When gs-decon takes over, simpledrm goes away and releases them; the panel lost power and DECON's first shadow update never completed. Keep both rails on: the S6E3HC3 driver doesn't switch them. Assisted-by: Claude Opus 5.5 Signed-off-by: saiththerobo --- .../boot/dts/exynos/google/gs101-raven.dts | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/gs101-raven.dts b/arch/arm64/boot/dts/exynos/google/gs101-raven.dts index 266456f9a0..164e2dd58c 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101-raven.dts +++ b/arch/arm64/boot/dts/exynos/google/gs101-raven.dts @@ -44,6 +44,22 @@ constant-charge-voltage-max-microvolt = <4450000>; constant-charge-current-max-microamp = <1466730>; }; + + reserved-memory { + /* + * Scanout buffers for gs-decon: DPP0 takes 32-bit addresses and + * the DPU SysMMU is bypassed (as on cheetah). Five 1440x3120 + * XRGB8888 buffers; reusable while unused. + */ + display_pool: display-pool { + compatible = "shared-dma-pool"; + reusable; + size = <0x5c00000>; + alignment = <0x0 0x200000>; + /* Not in 3.75-4 GiB: DPP0's reads from 0xf2c00000+ hung silently */ + alloc-ranges = <0x0 0xa0000000 0x40000000>; + }; + }; }; &acpm_ipc { @@ -155,6 +171,25 @@ status = "okay"; }; +/* The display: gs-decon takes over the bootloader's pipeline from simpledrm */ +&decon0 { + memory-region = <&display_pool>, <&cont_splash_mem>; + memory-region-names = "pool", "boot-framebuffer"; + status = "okay"; +}; + +&dsi0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + /* brightness, display on/off and 60/120 Hz; the bootloader runs it */ + panel@0 { + compatible = "samsung,s6e3hc3"; + reg = <0>; + }; +}; + &framebuffer0 { width = <1440>; height = <3120>; @@ -342,3 +377,17 @@ cirrus,boost-ctl-microvolt = <7500000>; }; }; + +/* + * The panel's rails (the framebuffer's vci and vddi supplies). simpledrm + * holds them; when gs-decon takes the display over, simpledrm goes away and + * releases them, the panel lost power and DECON stalled on its first flip. + * The S6E3HC3 driver doesn't switch them, so they stay on. + */ +&s2mpg10_ldo22m { + regulator-always-on; +}; + +&s2mpg11_bucka { + regulator-always-on; +};