From nobody Wed Oct 8 13:21:51 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7F4E1DA21 for ; Fri, 27 Jun 2025 11:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751024772; cv=none; b=d0AQy5LKZdPpzCyaEaBD8LDVuvrcMfPNyYm1RqrahxASEIEZxPZpjv7HD5Fajko4V2Naa/imDQEPii6zUXODPl8Se+cPDWVxHrtIfZd57JkqCoJmQ5Q88JUcBoEijY45n1rUcdbMp7LMGw7S+Ybcx2dXk00rGUgOuRoYKvZGmXI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751024772; c=relaxed/simple; bh=s6zS0pHWcMOOiTba1t96zuUE7lsjYKkRW4PgdkGPxKs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ff/wdr4dQDD1xMDuPUt4EYMac1qLMiZCVVX/MjWL6Axsa6Rg3CT/EyZCCLbK56ci3fx5JP6Qlrkh/iEKSrBbLfFpX0OeOM2TlOk4E1wX7nvehcyHoker4XOvRdb+4k6m30/9AZycPb96fMYy9+5YWxJHK+T3D9+XKYGSentTDb4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uV7Wi-0004N2-Ip; Fri, 27 Jun 2025 13:45:52 +0200 From: Philipp Zabel Date: Fri, 27 Jun 2025 13:45:38 +0200 Subject: [PATCH v2 1/4] drm/bridge: samsung-dsim: Always flush display FIFO on vsync pulse 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: <20250627-dsi-vsync-flush-v2-1-4066899a5608@pengutronix.de> References: <20250627-dsi-vsync-flush-v2-0-4066899a5608@pengutronix.de> In-Reply-To: <20250627-dsi-vsync-flush-v2-0-4066899a5608@pengutronix.de> To: Inki Dae , Jagan Teki , Marek Szyprowski , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Artur Weber , Jessica Zhang , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Philipp Zabel X-Mailer: b4 0.14.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::54 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Always flush the display FIFO on vsync pulse, even if not explicitly requested by the panel via MIPI_DSI_MODE_VSYNC_FLUSH mode_flag. The display FIFO should be empty at vsync. Flushing it at vsync pulses helps to remove garbage that may have entered the FIFO during startup (if synchronisation between upstream display controller and Samsung DSIM is lacking) and that may persist in form of last frame's leftovers on subsequent frames. Flushing the display FIFO if it is already empty should have no effect. This will allow to remove the MIPI_DSI_MODE_VSYNC_FLUSH flag, which is only used by the Samsung DSIM bridge driver. Arguably this flag doesn't belong in the panel configuration at all: flushing the display FIFO on vsync is a workaround for issues with the integration between display controller and DSI bridge, not a property of the DSI link between bridge and panel. No panel actually has a requirement to receive garbage or old frame content after vsync. I wonder if host controller FIFO resets are mentioned by the MIPI DSI specification at all. This patch is based on the assumption that the MIPI_DSI_MODE_VSYNC_FLUSH flag only exists because the DSIM_MFLUSH_VS bit happens to be located in the same register as the bits controlling the DSI mode. Acked-by: Marek Szyprowski Signed-off-by: Philipp Zabel --- drivers/gpu/drm/bridge/samsung-dsim.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge= /samsung-dsim.c index 8ec6f4e7952f1f0cc1fc977732d8e457d6eb5012..c4997795db18280903570646b0a= 5b2c03b666307 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -897,8 +897,6 @@ static int samsung_dsim_init_link(struct samsung_dsim *= dsi) * The user manual describes that following bits are ignored in * command mode. */ - if (!(dsi->mode_flags & MIPI_DSI_MODE_VSYNC_FLUSH)) - reg |=3D DSIM_MFLUSH_VS; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) reg |=3D DSIM_SYNC_INFORM; if (dsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) --=20 2.39.5 From nobody Wed Oct 8 13:21:51 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8AC6233728 for ; Fri, 27 Jun 2025 11:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751024771; cv=none; b=NQEdIdywZ2gNKbh1YjQWpoy6O7c6cxebAUOeJ5vkhol9A9MOXQIDrmXAEG7+uAZmhonlHC4bvFOlzzA06eFxODCA3EAPySPOwt/nNt5N9l6XHjE3fAZNIuhKPkC9xUXZWIPLqW6vAe61U2pxAcQtdi2jQKNm2ciKuw96Y3SvZNs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751024771; c=relaxed/simple; bh=pwWlNz2DV8BdCvj4IeXBBjwqypfcikWFOyP/rC9OMgM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ch1VZ94KhG6UkZ29rmcGx5x8uFqs3CLmicLQiiL+ZVI0U4Zdu0A1ojgswPPIRXkx5DzkPieCeXxjgiwsG+ujZAkzfECES7VciH/K5SKi4/zo/wzh36KEza4G11j9107X5asY9kt0EW6o2qNdEV8q4zvcu5UV2NE+wV+wAxC/o/E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uV7Wi-0004N2-Ld; Fri, 27 Jun 2025 13:45:52 +0200 From: Philipp Zabel Date: Fri, 27 Jun 2025 13:45:39 +0200 Subject: [PATCH v2 2/4] drm/panel: samsung-s6d7aa0: Drop MIPI_DSI_MODE_VSYNC_FLUSH flag 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: <20250627-dsi-vsync-flush-v2-2-4066899a5608@pengutronix.de> References: <20250627-dsi-vsync-flush-v2-0-4066899a5608@pengutronix.de> In-Reply-To: <20250627-dsi-vsync-flush-v2-0-4066899a5608@pengutronix.de> To: Inki Dae , Jagan Teki , Marek Szyprowski , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Artur Weber , Jessica Zhang , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Philipp Zabel X-Mailer: b4 0.14.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::54 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Drop the MIPI_DSI_MODE_VSYNC_FLUSH flag from DSI mode_flags. It has no effect anymore. Acked-by: Marek Szyprowski Signed-off-by: Philipp Zabel Acked-by: Neil Armstrong --- drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c b/drivers/gpu/dr= m/panel/panel-samsung-s6d7aa0.c index b5b9e80690f66cc62acbd341865d8d47419e498b..692020081524ad9d1bc815464fa= 447b5a2d9241d 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c @@ -244,7 +244,7 @@ static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al= 02_desc =3D { .init_func =3D s6d7aa0_lsl080al02_init, .off_func =3D s6d7aa0_lsl080al02_off, .drm_mode =3D &s6d7aa0_lsl080al02_mode, - .mode_flags =3D MIPI_DSI_MODE_VSYNC_FLUSH | MIPI_DSI_MODE_VIDEO_NO_HFP, + .mode_flags =3D MIPI_DSI_MODE_VIDEO_NO_HFP, .bus_flags =3D 0, =20 .has_backlight =3D false, --=20 2.39.5 From nobody Wed Oct 8 13:21:51 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8A051DDC1E for ; Fri, 27 Jun 2025 11:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751024771; cv=none; b=csiZ6/rgGvCmjSAZofk0sY8gI51hPKON3Eh3V8XYbR4c+Oo/PNye3p9VVmDX/PSOmhaMwOlr4a3wrqSzqEMqIgkS9DtpyJ68oYLbCfct3ph6Jj6eMpDkdRcyk3yUb6NkFVJdre6x3sorqRbS7sogGBObrFUmbxjU32WI+3z4Uho= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751024771; c=relaxed/simple; bh=GVIWsvZtAs+h2Xtcin8mxo5dr7HmCd20WHpkCjwhmzg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Cbml4VIINCKrqyLPHHkKR0jJHr3opEWvYHv5Gy8q52sGzjCZ+MPoeJoTSAzZGz9uNSn7JbgbIzfSKy9LiCJ1K4Sm3kidXOL8gGAIjbs0q6BaE0YpfixEHZo27OwR8FaBUebv3g98HIFt82uIqbiFmcoE40FjOwhM9rEATKIqpIA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uV7Wi-0004N2-Nz; Fri, 27 Jun 2025 13:45:52 +0200 From: Philipp Zabel Date: Fri, 27 Jun 2025 13:45:40 +0200 Subject: [PATCH v2 3/4] drm/panel: samsung-s6e8aa0: Drop MIPI_DSI_MODE_VSYNC_FLUSH flag 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: <20250627-dsi-vsync-flush-v2-3-4066899a5608@pengutronix.de> References: <20250627-dsi-vsync-flush-v2-0-4066899a5608@pengutronix.de> In-Reply-To: <20250627-dsi-vsync-flush-v2-0-4066899a5608@pengutronix.de> To: Inki Dae , Jagan Teki , Marek Szyprowski , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Artur Weber , Jessica Zhang , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Philipp Zabel X-Mailer: b4 0.14.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::54 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Drop the MIPI_DSI_MODE_VSYNC_FLUSH flag from DSI mode_flags. It has no effect anymore. Acked-by: Marek Szyprowski Signed-off-by: Philipp Zabel Acked-by: Neil Armstrong --- drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c b/drivers/gpu/dr= m/panel/panel-samsung-s6e8aa0.c index 897df195f2f3437224d1fe9f42d0bfc761541ab2..1b5c500d4f4eb7d43dff4b452a0= f1b1bc06f5a2c 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c @@ -992,7 +992,7 @@ static int s6e8aa0_probe(struct mipi_dsi_device *dsi) dsi->lanes =3D 4; dsi->format =3D MIPI_DSI_FMT_RGB888; dsi->mode_flags =3D MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST - | MIPI_DSI_MODE_VSYNC_FLUSH | MIPI_DSI_MODE_VIDEO_AUTO_VERT; + | MIPI_DSI_MODE_VIDEO_AUTO_VERT; =20 ret =3D s6e8aa0_parse_dt(ctx); if (ret < 0) --=20 2.39.5 From nobody Wed Oct 8 13:21:51 2025 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8A6522F75C for ; Fri, 27 Jun 2025 11:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751024771; cv=none; b=NDED6JWUAAo6j9Idvda7FAPQAsoBkSenooL20ywlh5Z1/eBeA4HHrZXlzMxY5yZcrH5nn8upoPXN4YgXKHjycr1DXItwA/7dtyoV5Ez6vDI5VmE2kIN7ZMVEq+E7BFPVz1WMNLm5fVe6m3YVODkUVk6dV36/Z7haufJbc8dj8uI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751024771; c=relaxed/simple; bh=AmircmMluli+uVnLARe2NzwbiMu4iW7gLj3ed1iWcBo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rM+LyqXJgi6s49rHJQYscFtewvgTA8mVOSsRM60WDAEZcizY+KfKK1VQ0m12HNjaY8ESTms/L2FbWlylbJooeepUkwzMdpQietHkpjZI15VRt5W0G1oucS9U7yCUze/AnPObYKXKPt/spxKsCl3HeMLHhURkXicAgjWGTcJfr4s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uV7Wi-0004N2-QJ; Fri, 27 Jun 2025 13:45:52 +0200 From: Philipp Zabel Date: Fri, 27 Jun 2025 13:45:41 +0200 Subject: [PATCH v2 4/4] drm/mipi-dsi: Drop MIPI_DSI_MODE_VSYNC_FLUSH flag 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: <20250627-dsi-vsync-flush-v2-4-4066899a5608@pengutronix.de> References: <20250627-dsi-vsync-flush-v2-0-4066899a5608@pengutronix.de> In-Reply-To: <20250627-dsi-vsync-flush-v2-0-4066899a5608@pengutronix.de> To: Inki Dae , Jagan Teki , Marek Szyprowski , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Artur Weber , Jessica Zhang , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, Philipp Zabel X-Mailer: b4 0.14.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::54 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Drop the unused MIPI_DSI_MODE_VSYNC_FLUSH flag. Whether or not a display FIFO flush on vsync is required to avoid sending garbage to the panel is not a property of the DSI link, but of the integration between display controller and DSI host bridge. Acked-by: Marek Szyprowski Signed-off-by: Philipp Zabel Acked-by: Neil Armstrong --- include/drm/drm_mipi_dsi.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index b37860f4a895c25ef8ba1c5b3f44827ef53aa100..369b0d8830c3d14a4fc1e8e38d5= fa55f04ca143e 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -130,8 +130,6 @@ struct mipi_dsi_host *of_find_mipi_dsi_host_by_node(str= uct device_node *node); #define MIPI_DSI_MODE_VIDEO_NO_HBP BIT(6) /* disable hsync-active area */ #define MIPI_DSI_MODE_VIDEO_NO_HSA BIT(7) -/* flush display FIFO on vsync pulse */ -#define MIPI_DSI_MODE_VSYNC_FLUSH BIT(8) /* disable EoT packets in HS mode */ #define MIPI_DSI_MODE_NO_EOT_PACKET BIT(9) /* device supports non-continuous clock behavior (DSI spec 5.6.1) */ --=20 2.39.5