From 29da854c4ac9a3dd5ad5a650cd4945ef4462cbbb Mon Sep 17 00:00:00 2001 From: Jonathan Goyvaerts Date: Thu, 29 Oct 2026 13:36:19 -0300 Subject: [PATCH] drm/apple: show the notch when the boot loader keeps it Showing the notch takes two switches today: aura's chosen.asahi,show-notch=1 keeps the notch rows in the boot framebuffer, and appledrm.show_notch=1 keeps them in the mode. With only the first, the boot framebuffer covers the full panel and the mode does not, so fbcon and Plymouth jump by the notch height at the handoff; with only the second, it is the other way round. aura passes the setting on as /chosen/asahi,show-notch = "1". Read it, so the boot loader setting alone shows the notch from the first frame to the desktop. The module parameters still turn it on as before. On the J616s (MacBook Pro M4 Pro) the mode is 3456x2160 without it and 3456x2234 with it (apple,notch-height = 74). Signed-off-by: Jonathan Goyvaerts Assisted-by: LLM --- drivers/gpu/drm/apple/dcp.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/apple/dcp.c b/drivers/gpu/drm/apple/dcp.c index 5583688f1957d..60fb8e561e86a 100644 --- a/drivers/gpu/drm/apple/dcp.c +++ b/drivers/gpu/drm/apple/dcp.c @@ -201,7 +201,7 @@ bool dcp_h17p_external_ready(struct device_node *np) static bool show_notch; module_param(show_notch, bool, 0644); -MODULE_PARM_DESC(show_notch, "Use the full display height and shows the notch"); +MODULE_PARM_DESC(show_notch, "Use the full display height and show the notch (also when /chosen/asahi,show-notch is \"1\")"); bool hdmi_audio; module_param(hdmi_audio, bool, 0644); @@ -4922,6 +4922,19 @@ static bool dcp_external_is_idle(struct apple_dcp *dcp) (status & APPLE_DCP_COPROC_CPU_STATUS_IDLE); } +/* + * The boot loader keeps the notch rows in its framebuffer when the OS is to + * drive the full panel (aura: chosen.asahi,show-notch=1). Follow it, so the + * mode covers the same rows as the boot framebuffer did. + */ +static bool boot_show_notch(void) +{ + const char *val; + + return !of_property_read_string(of_chosen, "asahi,show-notch", &val) && + !strcmp(val, "1"); +} + /* * T8122 dcpext (DCP_FIRMWARE_V_14_7_TEMPLATE): if the PMP runs, the display * gate added its DISPEXT request and pointed the dcpext at it @@ -5068,7 +5081,7 @@ static int dcp_comp_bind_pipe(struct device *dev, struct device *main, void *dat dev_info(dev, "DCP index:%u dptx target phy: %u dptx die: %u\n", dcp->index, dcp->dptx_phy, dcp->dptx_die); - if (!show_notch) + if (!show_notch && !boot_show_notch()) ret = of_property_read_u32(dev->of_node, "apple,notch-height", &dcp->notch_height);