Skip to contentSkip to conversation

drm/bridge: ti-sn65dsi83: Do not generate HFP/HBP/HSA and EOT packet

PATCH Applied Marek Vasut 4 participants 5 messages Apr 3, 2023 – Sep 27, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/bridge: ti-sn65dsi83: Do not generate HFP/HBP/HSA and EOT packet

Do not generate the HS front and back porch gaps, the HSA gap and EOT packet, as per "SN65DSI83 datasheet SLLSEC1I - SEPTEMBER 2012
- REVISED OCTOBER 2020", page 22, these packets are not required. This makes the TI SN65DSI83 bridge work with Samsung DSIM on i.MX8MN.

---
Cc: Andrzej Hajda <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Jagan Teki <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Michael Walle <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Robert Foss <[email protected]>
Cc: [email protected]

---
 drivers/gpu/drm/bridge/ti-sn65dsi83.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/bridge/ti-sn65dsi83.c +3 -1
index 91ecfbe45bf90..b60ae1dc1191d 100644
@@ -642,7 +642,9 @@ static int sn65dsi83_host_attach(struct sn65dsi83 *ctx)
 
 	dsi->lanes = dsi_lanes;
 	dsi->format = MIPI_DSI_FMT_RGB888;
-	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST;
+	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
+			  MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP |
+			  MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET;
 
 	ret = devm_mipi_dsi_attach(dev, dsi);
 	if (ret < 0) {
Signature · 1 line
2.39.2
reviewer Reviewed-by on v1 1/1
#1 lore raw

Hi Marek,

Thank you for the patch.

Quoted 6 lines · Marek Vasut

Do not generate the HS front and back porch gaps, the HSA gap and EOT packet, as per "SN65DSI83 datasheet SLLSEC1I - SEPTEMBER 2012
- REVISED OCTOBER 2020", page 22, these packets are not required. This makes the TI SN65DSI83 bridge work with Samsung DSIM on i.MX8MN.

I have successfully used this driver with a Raspberry Pi CM4. The VC4 DSI driver does not seem to support the newly added flags, so this patch shouldn't have any effect there.

Quoted 31 lines

---
Cc: Andrzej Hajda <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Jagan Teki <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: Jonas Karlman <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Michael Walle <[email protected]>
Cc: Neil Armstrong <[email protected]>
Cc: Robert Foss <[email protected]>
Cc: [email protected]

---
 drivers/gpu/drm/bridge/ti-sn65dsi83.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/bridge/ti-sn65dsi83.c +3 -1
index 91ecfbe45bf90..b60ae1dc1191d 100644
@@ -642,7 +642,9 @@ static int sn65dsi83_host_attach(struct sn65dsi83 *ctx)
 
 	dsi->lanes = dsi_lanes;
 	dsi->format = MIPI_DSI_FMT_RGB888;
-	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST;
+	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
+			  MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP |
+			  MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET;
 
 	ret = devm_mipi_dsi_attach(dev, dsi);
 	if (ret < 0) {
Signature · 3 lines
Regards,

Laurent Pinchart
#2 lore raw
Quoted 1 line · Laurent Pinchart

Hi Marek,

Hi,

Quoted 8 lines

Thank you for the patch.

Quoted 5 lines · Marek Vasut

Do not generate the HS front and back porch gaps, the HSA gap and EOT packet, as per "SN65DSI83 datasheet SLLSEC1I - SEPTEMBER 2012
- REVISED OCTOBER 2020", page 22, these packets are not required. This makes the TI SN65DSI83 bridge work with Samsung DSIM on i.MX8MN.

Quoted 5 lines
Quoted 1 line

I have successfully used this driver with a Raspberry Pi CM4. The VC4 DSI driver does not seem to support the newly added flags, so this patch shouldn't have any effect there.

Indeed, I noticed very few controllers support those flags . Maybe over time we will get more of the support on controller side.

maintainer Applied
#3 lore raw
In reply to Marek Vasut

From: Robert Foss <[email protected]>

Quoted 6 lines · Marek Vasut

Do not generate the HS front and back porch gaps, the HSA gap and EOT packet, as per "SN65DSI83 datasheet SLLSEC1I - SEPTEMBER 2012
- REVISED OCTOBER 2020", page 22, these packets are not required. This makes the TI SN65DSI83 bridge work with Samsung DSIM on i.MX8MN.

Applied, thanks!

[1/1] drm/bridge: ti-sn65dsi83: Do not generate HFP/HBP/HSA and EOT packet

      https://cgit.freedesktop.org/drm/drm-misc/commit/?id=ca161b259cc8

Rob

Reviewed-by Laurent Pinchart on v1 1/1
#4 lore raw
In reply to Marek Vasut
Quoted 6 lines · Marek Vasut

Do not generate the HS front and back porch gaps, the HSA gap and EOT packet, as per "SN65DSI83 datasheet SLLSEC1I - SEPTEMBER 2012
- REVISED OCTOBER 2020", page 22, these packets are not required. This makes the TI SN65DSI83 bridge work with Samsung DSIM on i.MX8MN.

Hello,
can you please queue up this to kernel v6.1-stable ?

commit ca161b259cc84fe1f4a2ce4c73c3832cf6f713f1
Author: Marek Vasut <[email protected]>
Commit: Robert Foss <[email protected]>

drm/bridge: ti-sn65dsi83: Do not generate HFP/HBP/HSA and EOT packet

Do not generate the HS front and back porch gaps, the HSA gap and EOT packet, as per "SN65DSI83 datasheet SLLSEC1I - SEPTEMBER 2012
- REVISED OCTOBER 2020", page 22, these packets are not required. This makes the TI SN65DSI83 bridge work with Samsung DSIM on i.MX8MN.

It solves a real issue with some displays not working without it.

Thanks,
Francesco