From nobody Tue Sep 29 10:32:59 2026 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E5AF3290A5; Sun, 9 Aug 2026 08:28:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786264104; cv=none; b=YD16mjerfGu5i9COlVSYrBqi2mt4/c10493jnFwzkyovOW9rh9rqUN3QpFc/8T7U9cmbgWLgUPBPWW4MHvhnuiKAHWoqRg5H9FZ8NTnrBCSHz19EwTqbyLoawksbMkObF1fvtSzxhTxFd19XptcUmBY8NKLF5M2bLuCir0U+mR0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786264104; c=relaxed/simple; bh=KkCb88jpb3D1kBUtynsLp4Zj81VOJWY1vhwCs7mKWUQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jviPekSna3qrjogVCA2tWFlR86GbuebB7VcYQVWxWTtH5iP0JwBsGTnpL7E2svbUEoGunwS3mbuF1fQq5f9YqbPOoCvbqbOOmS2PX08XhYD6otDTA37wIt1UqrUi5LHaN1dEd3ksZXPZ+EPGEK7B8Tt1PHbr5uXq/QjC5ph7h7s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=JY4v5OMr; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="JY4v5OMr" Received: from mail01.layka.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A863742B7B; Sun, 09 Aug 2026 10:28:20 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id mdd-XtsM1l3B; Sun, 9 Aug 2026 10:28:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1786264099; bh=KkCb88jpb3D1kBUtynsLp4Zj81VOJWY1vhwCs7mKWUQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=JY4v5OMrLxpPHP7l7QywxqzjAeSxTspZqScFRu4EJK4V6S6t/AuLIQ9RRSj5fEI0x jubozgpW5qQjOkumZ3F2xx0revjNE1GPvLL/xSsqg9OI8i6N5s2ezTO0cL50cyeXl3 bBzcNXcEIg8GaQqvdXgMAXkHwimK8S4AGNImPKIJ8olKKp4JFtwUt9uQ6tHpyQRE3N XUE+IB0f9vbPU6aLbKO8YrTqrBMXzZ2b18AsSG7yAsOSUAeOiTTnoV8FL/oFJ0g2it SsmzNvrAQBND4+yX/weFlmLD2vfH0UldbN86SBcMqYRW958Ij+rv3uX8HUUL4MiN5G WOFJ6xPgQ2Slg== From: Kaustabh Chakraborty Date: Sun, 09 Aug 2026 13:57:41 +0530 Subject: [PATCH v4 1/3] drm/bridge: samsung-dsim: enable MFLUSH_VS for Exynos 7870 DSIM Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260809-exynos-dsim-fixes-v4-1-ca67c51e61b7@disroot.org> References: <20260809-exynos-dsim-fixes-v4-0-ca67c51e61b7@disroot.org> In-Reply-To: <20260809-exynos-dsim-fixes-v4-0-ca67c51e61b7@disroot.org> To: Inki Dae , Jagan Teki , Marek Szyprowski , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Peter Griffin , Alim Akhtar Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Kaustabh Chakraborty , stable@vger.kernel.org Commit a36c533ad3e1 ("drm/bridge: samsung-dsim: Always flush display FIFO on vsync pulse") intends to enable FIFO flushing at v-sync pulse by not setting the active-low MFLUSH_VS bit. However, in Exynos 7870 DSIM, the MFLUSH_VS bit is active-high. There is no publicly available documentation to the best of my knowledge, but downstream kernel code [1] supports this claim. Enable the bit for Exynos 7870. Fixes: a36c533ad3e1 ("drm/bridge: samsung-dsim: Always flush display FIFO o= n vsync pulse") Cc: stable@vger.kernel.org # v6.17 and later Link: https://github.com/samsungexynos7870/android_kernel_samsung_exynos787= 0/blob/a3762bb1761ae/drivers/video/fbdev/exynos/decon_7870/dsim_reg_7870.c#= L699 [1] Tested-by: Marek Szyprowski Signed-off-by: Kaustabh Chakraborty --- drivers/gpu/drm/bridge/samsung-dsim.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge= /samsung-dsim.c index 25ab475309e8..fc42acc6b9ef 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -1089,6 +1089,13 @@ static int samsung_dsim_init_link(struct samsung_dsi= m *dsi) reg |=3D DSIM_HBP_DISABLE_MODE; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_NO_HSA) reg |=3D DSIM_HSA_DISABLE_MODE; + + /* + * For some hardware types, DSIM_MFLUSH_VS bit needs to be + * enabled as its active-high. + */ + if (dsi->plat_data->hw_type =3D=3D DSIM_TYPE_EXYNOS7870) + reg |=3D DSIM_MFLUSH_VS; } =20 if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET) --=20 2.54.0 From nobody Tue Sep 29 10:32:59 2026 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8583F351C20; Sun, 9 Aug 2026 08:28:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786264120; cv=none; b=guHwixGmh75w35ZpYjp5b3HYKKcNVDzrlN+yqFc39n/ap+UnJLj/UxzaLMvNIMOxBmWbxGy50KE9lFvTCAp3cFN92W+V5388cmXe5p8iLX8oGLHOqwmlpM55/83V1dNMFQhUhkYKCqSus3naj3Q1oEgLZW11yIiyGHO1IGl+Hpo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786264120; c=relaxed/simple; bh=9TT9CJ5yyDMdNry/NTuAsIsN0De4CnxEpXPpkHY+ljg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QzoMyQnVoDY1W8pHObnq353jhgTxi3XKyKowLjnJvR9UPBVm6gFA7yQqbZJYZarvHYVNX7l6/MjEouD7Y6P4XoW0wU0weUaq57lYIjO34ZL5+2K58cKVUMs/fPLTwvst3JVZ0ACltDZdxNcp5m09+hPp4YHL7zQJ3R+0tuE9WH0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=QfT+4o60; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="QfT+4o60" Received: from mail01.layka.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id BBC6C43092; Sun, 09 Aug 2026 10:28:35 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id hdaL4yVniJMY; Sun, 9 Aug 2026 10:28:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1786264114; bh=9TT9CJ5yyDMdNry/NTuAsIsN0De4CnxEpXPpkHY+ljg=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=QfT+4o60gSuO6xHX+8Tw2kmL/E/jAybh39MXwlN+ZJF1KdsWCG/x8X6QuMLpqhckt ++Xe+OJH6rlQ0eCmw8vwMD0cKYgHQs4TXByjqNBALJX7i5Z3MASjX9sxJODk9L2lhO wJoOxjylQHNyusFSJ/BtgkMhuMUjvy+u77kRhVWbk2oioszlX7a1jTJxBVW7+VKEPo 2PAlql+bsFzMXURcOgx7vfLZQwjPH5CtZFUEmV+dcujPoLM/tdKeNoemr69VkolTO8 i+US13h/bfi/EyzdSjVk2uCpORw+gcNgW/gC7P9hRdR0upchdeuPfyFgGichKvCODb bMEe/6nm38lkg== From: Kaustabh Chakraborty Date: Sun, 09 Aug 2026 13:57:42 +0530 Subject: [PATCH v4 2/3] drm/bridge: samsung-dsim: use DSIM interrupt to wait for PLL stability Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260809-exynos-dsim-fixes-v4-2-ca67c51e61b7@disroot.org> References: <20260809-exynos-dsim-fixes-v4-0-ca67c51e61b7@disroot.org> In-Reply-To: <20260809-exynos-dsim-fixes-v4-0-ca67c51e61b7@disroot.org> To: Inki Dae , Jagan Teki , Marek Szyprowski , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Peter Griffin , Alim Akhtar Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Kaustabh Chakraborty Stabilizing PLL needs to be waited for. This is done using a loop, checking the PLL_STABLE bit in the status register. DSIM fires an interrupt when the PLL is stabilized. Rely on this functionality for stabilization wait, getting rid of the implicit loop. To utilize this, explicitly unmask PLL_STABLE and SW_RST_RELEASE right after reset, and wait for reset before setting up clock. This has been tested on a Galaxy J6 (Exynos 7870). Unfortunately, since testing on all supported devices is less feasible, introduce a stop-gap measure where the timeout has a gracious lower bound of 100 microseconds. This will (hopefully) prevent regressions due to timeout on other devices. Suggested-by: Inki Dae Link: https://lore.kernel.org/r/CAAQKjZMLMbwDVZRb5+Xb_5yz3AEP4uuzFJMuuZy9NF= Du13VU5w@mail.gmail.com Signed-off-by: Kaustabh Chakraborty --- drivers/gpu/drm/bridge/samsung-dsim.c | 49 +++++++++++++++++++++++++------= ---- include/drm/bridge/samsung-dsim.h | 1 + 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge= /samsung-dsim.c index fc42acc6b9ef..9f58c7b1be53 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -722,9 +723,14 @@ static void samsung_dsim_wait_for_reset(struct samsung= _dsim *dsi) static void samsung_dsim_reset(struct samsung_dsim *dsi) { u32 reset_val =3D dsi->driver_data->reg_values[RESET_TYPE]; + u32 status; =20 reinit_completion(&dsi->completed); samsung_dsim_write(dsi, DSIM_SWRST_REG, reset_val); + + status =3D samsung_dsim_read(dsi, DSIM_INTMSK_REG); + status &=3D ~(DSIM_INT_PLL_STABLE | DSIM_INT_SW_RST_RELEASE); + samsung_dsim_write(dsi, DSIM_INTMSK_REG, status); } =20 static unsigned long samsung_dsim_pll_find_pms(struct samsung_dsim *dsi, @@ -787,8 +793,7 @@ static unsigned long samsung_dsim_set_pll(struct samsun= g_dsim *dsi, unsigned long freq) { const struct samsung_dsim_driver_data *driver_data =3D dsi->driver_data; - unsigned long fin, fout; - int timeout; + unsigned long fin, fout, timeout_us, bus_clk_mhz; u8 p, s; u16 m; u32 reg; @@ -849,19 +854,33 @@ static unsigned long samsung_dsim_set_pll(struct sams= ung_dsim *dsi, if (dsi->swap_dn_dp_data) reg |=3D DSIM_PLL_DPDNSWAP_DAT; =20 + /* + * The PLL_TIMER value is the product of the timeout delay and the APB + * bus clock rate. Calculate the timeout delay on-the-fly here. + * It is assumed that the bus clock is the first clock in the provided + * bulk clock data. + */ + timeout_us =3D 100; + bus_clk_mhz =3D clk_get_rate(dsi->driver_data->clk_data[0].clk) / HZ_PER_= MHZ; + if (bus_clk_mhz) + timeout_us =3D max(driver_data->reg_values[PLL_TIMER] / bus_clk_mhz, + timeout_us); + + reinit_completion(&dsi->pll_stabilized); samsung_dsim_write(dsi, DSIM_PLLCTRL_REG, reg); =20 - timeout =3D 3000; - do { - if (timeout-- =3D=3D 0) { - dev_err(dsi->dev, "PLL failed to stabilize\n"); - return 0; - } + if (!wait_for_completion_timeout(&dsi->pll_stabilized, + usecs_to_jiffies(timeout_us))) { if (driver_data->has_legacy_status_reg) reg =3D samsung_dsim_read(dsi, DSIM_STATUS_REG); else reg =3D samsung_dsim_read(dsi, DSIM_LINK_STATUS_REG); - } while ((reg & BIT(driver_data->pll_stable_bit)) =3D=3D 0); + + if (!(reg & BIT(driver_data->pll_stable_bit))) { + dev_err(dsi->dev, "PLL failed to stabilize\n"); + return 0; + } + } =20 dsi->hs_clock =3D fout; =20 @@ -1586,7 +1605,8 @@ static irqreturn_t samsung_dsim_irq(int irq, void *de= v_id) samsung_dsim_write(dsi, DSIM_INTSRC_REG, status); =20 if (status & DSIM_INT_SW_RST_RELEASE) { - unsigned long mask =3D ~(DSIM_INT_RX_DONE | + unsigned long mask =3D ~(DSIM_INT_PLL_STABLE | + DSIM_INT_RX_DONE | DSIM_INT_SFR_FIFO_EMPTY | DSIM_INT_SFR_HDR_FIFO_EMPTY | DSIM_INT_RX_ECC_ERR | @@ -1596,8 +1616,10 @@ static irqreturn_t samsung_dsim_irq(int irq, void *d= ev_id) return IRQ_HANDLED; } =20 - if (!(status & (DSIM_INT_RX_DONE | DSIM_INT_SFR_FIFO_EMPTY | - DSIM_INT_PLL_STABLE))) + if (status & DSIM_INT_PLL_STABLE) + complete(&dsi->pll_stabilized); + + if (!(status & (DSIM_INT_RX_DONE | DSIM_INT_SFR_FIFO_EMPTY))) return IRQ_HANDLED; =20 if (samsung_dsim_transfer_finish(dsi)) @@ -1635,9 +1657,9 @@ static int samsung_dsim_init(struct samsung_dsim *dsi) if (driver_data->reg_values[RESET_TYPE] =3D=3D DSIM_FUNCRST) samsung_dsim_enable_lane(dsi, BIT(dsi->lanes) - 1); =20 - samsung_dsim_enable_clock(dsi); if (driver_data->wait_for_reset) samsung_dsim_wait_for_reset(dsi); + samsung_dsim_enable_clock(dsi); samsung_dsim_set_phy_ctrl(dsi); samsung_dsim_init_link(dsi); =20 @@ -2148,6 +2170,7 @@ int samsung_dsim_probe(struct platform_device *pdev) return PTR_ERR(dsi); =20 init_completion(&dsi->completed); + init_completion(&dsi->pll_stabilized); spin_lock_init(&dsi->transfer_lock); INIT_LIST_HEAD(&dsi->transfer_list); =20 diff --git a/include/drm/bridge/samsung-dsim.h b/include/drm/bridge/samsung= -dsim.h index 03005e474704..e3433da21ad0 100644 --- a/include/drm/bridge/samsung-dsim.h +++ b/include/drm/bridge/samsung-dsim.h @@ -123,6 +123,7 @@ struct samsung_dsim { int state; struct drm_property *brightness; struct completion completed; + struct completion pll_stabilized; =20 spinlock_t transfer_lock; /* protects transfer_list */ struct list_head transfer_list; --=20 2.54.0 From nobody Tue Sep 29 10:32:59 2026 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F5453AB28E; Sun, 9 Aug 2026 08:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786264135; cv=none; b=bFac1KKWmguaDk6p2SFjCQg5EotzT9ceCYr9Ll+YOe0xdta51aR01UlzHMyxpmRcy7R3IEOMSF+4g9pjw5i6t3hgV6EjUOMise/V3/J0wK8Ygeb8BlAJXg3ybuePlgwmaGuKMQjW1zH/aCEKbNs7O4W3mIAY8VxNyZB2AycGK4o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786264135; c=relaxed/simple; bh=MTjTVyarpd88D5ZxrVO4ObVIuSjSS0DqMMOdUmEf1DQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GyEw28vo7QuDzupRhgzfdLc/YhxACRlNt/K54tAgUNkQpFLOyEtoI/ilzOGYxsGE0yQgZW6RQlpVBX1VzSRyb94vseUosrNiQdG47FF5cwAgono9bQZQC/ya2TgL+lFvxN6oqOPNn7YTv1HyKOCnKDS6WTuIKqSSQaJHOocL+7w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=lR7nLBLc; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="lR7nLBLc" Received: from mail01.layka.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 445044311E; Sun, 09 Aug 2026 10:28:52 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id G_LpA_Hfk9A1; Sun, 9 Aug 2026 10:28:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1786264131; bh=MTjTVyarpd88D5ZxrVO4ObVIuSjSS0DqMMOdUmEf1DQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=lR7nLBLc4+ybkANIsaBBrWwS/psblrIffutt3uDtVp/jccGSBLReHMfwXe6KQylfp Nug7tXvyQECxoifu5nO3x88dMowyNv695ca1VN8O9Pg4vLr8murBuXJnFgAPFHma3B Yp5j+VQzny86fME1jXuJqAtyXnb9KlZligNiStSjQFL8+G/0026UWeXNOrcLwG0hk4 EuQu8mPi8OM5Tp0FXTiAE0BUIFyY7v6/Q6aTrKxIxph7Ic+tZmQ6kLKlSOWqviQuOk If413ERAOI7aNkS5d/8CO7EpxnV1eF0+2F82nsO3Nh5n7onmBJ9OwftXLWxbWLdXjB 39hXUiRz7PWgw== From: Kaustabh Chakraborty Date: Sun, 09 Aug 2026 13:57:43 +0530 Subject: [PATCH v4 3/3] drm/exynos: remove simplefb nodes before init Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260809-exynos-dsim-fixes-v4-3-ca67c51e61b7@disroot.org> References: <20260809-exynos-dsim-fixes-v4-0-ca67c51e61b7@disroot.org> In-Reply-To: <20260809-exynos-dsim-fixes-v4-0-ca67c51e61b7@disroot.org> To: Inki Dae , Jagan Teki , Marek Szyprowski , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Peter Griffin , Alim Akhtar Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Kaustabh Chakraborty The simple-framebuffer uses the framebuffer region initialized by the boot loader for display. However, with Linux the DSI and FIMD/DECON stack is initialized from scratch. However, both are destined use the same memory region, so both cannot co-exist. For a seamless display transition during boot, the framebuffer must be destroyed, which releases the memory region, followed by proper IP re-initialization. Achieve it using aperture_remove_all_conflicting_devices(). This is also implemented in other similar systems such as in Qualcomm's msm_kms driver. Signed-off-by: Kaustabh Chakraborty --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exyn= os/exynos_drm_drv.c index 9ee30086879f..e05e520449ed 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -7,6 +7,7 @@ * Seung-Woo Kim */ =20 +#include #include #include #include @@ -268,6 +269,11 @@ static int exynos_drm_bind(struct device *dev) list_for_each_entry(encoder, &drm->mode_config.encoder_list, head) encoder->possible_clones =3D clone_mask; =20 + /* Remove existing devices which own the framebuffer memory. */ + ret =3D aperture_remove_all_conflicting_devices(exynos_drm_driver.name); + if (ret) + goto err_unbind_all; + /* Try to bind all sub drivers. */ ret =3D component_bind_all(drm->dev, drm); if (ret) --=20 2.54.0