diff mbox series

drm/bridge: synopsys: dw-mipi-dsi: enable EoTp by default

Message ID 6a7293bd06942131161c5a7b7878c51cfbbb807e.camel@googlemail.com (mailing list archive)
State New, archived
Headers show
Series drm/bridge: synopsys: dw-mipi-dsi: enable EoTp by default | expand

Commit Message

Christoph Fritz July 5, 2024, 9:38 a.m. UTC
Enable the transmission of an EoTp (end of transmission packet) by
default. EoTp should be enabled anyway because it is a Linux necessity
that can be disabled by a dsi mod_flag if needed.

EoTp signals the end of an HS transmission, this adds overall robustness
at protocol level at the expense of an increased overhead.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Christoph Fritz July 30, 2024, 5:33 p.m. UTC | #1
On Fri, 2024-07-05 at 11:38 +0200, Christoph Fritz wrote:
> Enable the transmission of an EoTp (end of transmission packet) by
> default. EoTp should be enabled anyway because it is a Linux
> necessity
> that can be disabled by a dsi mod_flag if needed.
> 
> EoTp signals the end of an HS transmission, this adds overall
> robustness
> at protocol level at the expense of an increased overhead.
> 
> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
> ---
>  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> index c4e9d96933dce..0fb02e4e7f4e5 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> @@ -722,7 +722,12 @@ static void dw_mipi_dsi_dpi_config(struct
> dw_mipi_dsi *dsi,
>  
>  static void dw_mipi_dsi_packet_handler_config(struct dw_mipi_dsi
> *dsi)
>  {
> -	dsi_write(dsi, DSI_PCKHDL_CFG, CRC_RX_EN | ECC_RX_EN |
> BTA_EN);
> +	u32 val = CRC_RX_EN | ECC_RX_EN | BTA_EN | EOTP_TX_EN;
> +
> +	if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET)
> +		val &= ~EOTP_TX_EN;
> +
> +	dsi_write(dsi, DSI_PCKHDL_CFG, val);
>  }
>  
>  static void dw_mipi_dsi_video_packet_config(struct dw_mipi_dsi *dsi,

*ping*
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
index c4e9d96933dce..0fb02e4e7f4e5 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
@@ -722,7 +722,12 @@  static void dw_mipi_dsi_dpi_config(struct dw_mipi_dsi *dsi,
 
 static void dw_mipi_dsi_packet_handler_config(struct dw_mipi_dsi *dsi)
 {
-	dsi_write(dsi, DSI_PCKHDL_CFG, CRC_RX_EN | ECC_RX_EN | BTA_EN);
+	u32 val = CRC_RX_EN | ECC_RX_EN | BTA_EN | EOTP_TX_EN;
+
+	if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET)
+		val &= ~EOTP_TX_EN;
+
+	dsi_write(dsi, DSI_PCKHDL_CFG, val);
 }
 
 static void dw_mipi_dsi_video_packet_config(struct dw_mipi_dsi *dsi,