Skip to contentSkip to conversation

drm/bridge: ti-sn65dsi83: Add Non-Burst mode property

PATCH In review [email protected] 2 participants 2 messages Jul 8, 2024

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

PATCH 1/1 drm/bridge: ti-sn65dsi83: Add Non-Burst mode property

From: Stefano Radaelli <[email protected]>

The video mode can be divided into two methods for sending packet data:
burst mode and non-burst mode.
In burst mode, pixel data is compressed to save time for the interface to return to low power.
Non-burst modes transmit pixel data in a stream controlled by sync pulses or sync events.

Adding this property in the DTS gives the programmer the ability to disable Burst Mode, depending on how the MIPI controller is configured.

---
 drivers/gpu/drm/bridge/ti-sn65dsi83.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/bridge/ti-sn65dsi83.c +8 -1
index 57a7ed13f996..6314c03ce1e6 100644
@@ -145,6 +145,7 @@ struct sn65dsi83 {
 	struct drm_bridge		*panel_bridge;
 	struct gpio_desc		*enable_gpio;
 	struct regulator		*vcc;
+	bool				burst_mode;
 	bool				lvds_dual_link;
 	bool				lvds_dual_link_even_odd_swap;
 };
@@ -581,6 +582,7 @@ static int sn65dsi83_parse_dt(struct sn65dsi83 *ctx, enum sn65dsi83_model model)
 	struct drm_bridge *panel_bridge;
 	struct device *dev = ctx->dev;
 
+	ctx->burst_mode = !(of_property_read_bool(dev->of_node, "burst-mode-disabled"));
 	ctx->lvds_dual_link = false;
 	ctx->lvds_dual_link_even_odd_swap = false;
 	if (model != MODEL_SN65DSI83) {
@@ -654,10 +656,15 @@ 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_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP |
 			  MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET;
 
+	if (ctx->burst_mode)
+		dsi->mode_flags |= MIPI_DSI_MODE_VIDEO_BURST;
+	else
+		dsi->mode_flags |= MIPI_DSI_MODE_VIDEO_SYNC_PULSE;
+
 	ret = devm_mipi_dsi_attach(dev, dsi);
 	if (ret < 0) {
 		dev_err(dev, "failed to attach dsi to host: %d\n", ret);
Signature · 1 line
2.34.1
#1 lore raw
Quoted 9 lines · On 08/07/2024 17:18, [email protected] wrote:

From: Stefano Radaelli <[email protected]>

The video mode can be divided into two methods for sending packet data:
burst mode and non-burst mode.
In burst mode, pixel data is compressed to save time for the interface to return to low power.
Non-burst modes transmit pixel data in a stream controlled by sync pulses or sync events.

Quoted 6 lines

Adding this property in the DTS gives the programmer the ability to disable Burst Mode, depending on how the MIPI controller is configured.

Do not send bindings separate from their users. This requires quite an effort for me to provide feedback here - look for mbox, import it, respond.

To be clear: bindings were NAKed.

See submitting patches for explanation how to send patchset.

Best regards,
Krzysztof