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 2A04E3B47F7; Sun, 9 Aug 2026 08:56:41 +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=1786265803; cv=none; b=MtG5nUoHEDSae4KCME2wUnViPWz5ZNI85A20GxRRO0OtHr9xGLjXFGLsKneKMPug+C2E8vIqM5dpqmu1CLt4XGo+bIQlOuojORjj4KefzM67hn2vRkACCgKmyxEcRjyHl97Is1evDEz4Nqjz81OTv65XnsGWxelW0CYIQB2buxA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786265803; c=relaxed/simple; bh=KkCb88jpb3D1kBUtynsLp4Zj81VOJWY1vhwCs7mKWUQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WHulZ9KWVEiejFSxDsPnLi+TbcKCQffV0sHqxGA0xJfMlftg9g3F2DPLOz6DObh4486ebs0QKL2SIaTZ4SEEhAdlua29Uwua18iJrOPFJMxlmhZTm/Uk9dTM20VSEP300J3/+Hv7npAr3AnjJFSSHUiLR+cydMGn1Egs+fbIA+E= 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=jPnHcDws; 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="jPnHcDws" Received: from mail01.layka.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 8351242C2F; Sun, 09 Aug 2026 10:56:40 +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 5a2gwA-ajPo8; Sun, 9 Aug 2026 10:56:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1786265799; bh=KkCb88jpb3D1kBUtynsLp4Zj81VOJWY1vhwCs7mKWUQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=jPnHcDwsXkaZQQylVP4a2dD9xTWzBDA24HuB3SXecErTuRnvVHajXSaL6yCJvwXhz f0F7bnmz+CT5yMRoA/phNg9wCIMgDjznuPzCYRDxpq5w6CyBb2Mj+2HYG0Wf/4OqkG xDQP7FqnW0UEll1YNyUS1KXH7xWHdH9cmckEuQHd3yfKOOdbuGr+b3NSeNpARTQz86 V3RoFtBakIm+U/cR9d9IJiKu3KApGfytKsiGvIFPxhyto3U8SGLDfB3ZDerXgX9U6U 49ZW04bkX8pW03Fb2H56RxCwjZY/6a+Ddr8zkctBL92z9OWzGaYJQ7ruIdlXnyd/R6 euhzGV3dvRqfw== From: Kaustabh Chakraborty Date: Sun, 09 Aug 2026 14:25:59 +0530 Subject: [PATCH v5 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-v5-1-6e63dc6c238f@disroot.org> References: <20260809-exynos-dsim-fixes-v5-0-6e63dc6c238f@disroot.org> In-Reply-To: <20260809-exynos-dsim-fixes-v5-0-6e63dc6c238f@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 9F8E63B6359; Sun, 9 Aug 2026 08:56:58 +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=1786265820; cv=none; b=HCTKw4WpzQ5KEsf95XVDp4OmqdHfHZeW7biBHUlEquuwMuz/yZlGV3luX+DVisvRAEenq8dfJA5AiLTKLdO+LJDp3cRwjnVZGraR56sAjsnlglgWK3bshdJ6JAGJ6s+AzRalZP84amIQRSKJYl1TvyN2akHIjw3fNJHmD+bZ2P4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786265820; c=relaxed/simple; bh=9TT9CJ5yyDMdNry/NTuAsIsN0De4CnxEpXPpkHY+ljg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YadWhAPRFwUkE7F82vxaTh13aXRU5hrsL5Uj8pSrA3Ocl8ll8T8Rb25uenBMWj79g9v9VX6Ez/54wmPZRdiKg0LiCCIJTIlk6GxFkfwZBtxBuoJ7W36Gg0HQlR4GKbaVf4yKAIgxvHf9oS/YzbIGQS+gE+Gsj7br6RxshHMowcg= 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=kDFeZX6v; 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="kDFeZX6v" Received: from mail01.layka.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 17E8942C2F; Sun, 09 Aug 2026 10:56:56 +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 Gwja3od2zCai; Sun, 9 Aug 2026 10:56:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1786265814; bh=9TT9CJ5yyDMdNry/NTuAsIsN0De4CnxEpXPpkHY+ljg=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=kDFeZX6vTSw30ZBG9nMDzQBdiRqKAAr/2JKkLV5nfOM5+CGB+SxEzZJUdAKhgYLQ0 MzTO4GMzXiu8Uv5MKe6yXxd8B0C63o/CA4SabAZaHHp199XSjLzICoC1eOAWshItmV LyAE3MYH2tGQGBjsImpdui9fNmzjyjom9EdIOPs/j0rA4H5sRFXrf5/SK8EzEH7yjZ CQ0gpmiYFiQOoTtqjvE5Gz6xieR/9Nd9oQ22A1lT4EwSjpsr73pnzuPXtQnQ8XzqhW /0r1ipUMeJUnTqxxELABcRMZZAKy8z+8aLEqGRm7k1h4GK/tjNFFWOFP/tB3mnjwe5 yielQATbI/HrQ== From: Kaustabh Chakraborty Date: Sun, 09 Aug 2026 14:26:00 +0530 Subject: [PATCH v5 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-v5-2-6e63dc6c238f@disroot.org> References: <20260809-exynos-dsim-fixes-v5-0-6e63dc6c238f@disroot.org> In-Reply-To: <20260809-exynos-dsim-fixes-v5-0-6e63dc6c238f@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 895743B635F; Sun, 9 Aug 2026 08:57:13 +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=1786265835; cv=none; b=tC5Vs6zxAQ2QVUwJnSEVEyqkbVccEL6IYoTNXjiul5LmjTUEVL3fQ8BMHQsnGoqdClJl4Z8J4SnXJf4hAy8b7sfwJzromtyAjKvtuhV5Qi199fPKRDNTr9u7LUGiaM8Dvr3MUjQC/Zfgpo8KEj6+v9uJXrcNlJ0pcJXZ22smE6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786265835; c=relaxed/simple; bh=sSdMlVv4KPv7PSTWKJG/U2qBKfr06yN4H3Mqo+2KEPE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YMVb8aSvwydj/CUTA6YHDlgBYHRWtzzfVKxa3FfxQCfL4YMMib8M9SzGW9Y0xZclNNHawqb3ghPzfSq9cTvOt+i7JH9leFGRZsYY2HtlnT/FmxSyFzlRBHJY+Xhxcc3E30nSZE8+Xl5JrsAk3YSKvzpn/tREi2F1+SDwFejHp8I= 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=lftYWenW; 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="lftYWenW" Received: from mail01.layka.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id E78B642C2F; Sun, 09 Aug 2026 10:57:11 +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 O7Ek0Z2ZZo3d; Sun, 9 Aug 2026 10:57:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1786265831; bh=sSdMlVv4KPv7PSTWKJG/U2qBKfr06yN4H3Mqo+2KEPE=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=lftYWenWAOn2suYR7aHNnjqqaQ2KzoDiknnCEA8FfoxP0/1hPIZDYUXMVXA456hfu 68U+eTB8OFFHgViT4ri/ZgYKGwpzKAn67IO4ku+vqPKv439G5O6Jl7vGDV49YOTAJQ axrzQBzeW6jO9txjC+VFA8VlCYtJJ3lp2xmN3uQCg83tvB0V/ILf3JVoy6rmmE9gJM wqFXr9awuEkfm+YJtMaNNwK4bKCWj+AT4Wg+PTg5xceSqfr17sCgNB4hSlp8AERweU fv85F8xxvIakFgPyDjiKafCeMPISVuzzAzwYXaJAyGzVNQLqqwtxm+JvlDfk0NR3HK 55tQ+3zMuWwgQ== From: Kaustabh Chakraborty Date: Sun, 09 Aug 2026 14:26:01 +0530 Subject: [PATCH v5 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-v5-3-6e63dc6c238f@disroot.org> References: <20260809-exynos-dsim-fixes-v5-0-6e63dc6c238f@disroot.org> In-Reply-To: <20260809-exynos-dsim-fixes-v5-0-6e63dc6c238f@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..62eeacbc2180 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_mode_config_cleanup; + /* Try to bind all sub drivers. */ ret =3D component_bind_all(drm->dev, drm); if (ret) --=20 2.54.0