Skip to contentSkip to conversation

drm/bridge: tc358767: Handle dsi_lanes == 0 as invalid

PATCH New Marek Vasut 1 participant 2 messages May 19, 2022

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

PATCH v2 1/2 drm/bridge: tc358767: Handle dsi_lanes == 0 as invalid

Handle empty data-lanes = < >; property, which translates to dsi_lanes = 0 as invalid.

Fixes bbfd3190b6562 ("drm/bridge: tc358767: Add DSI-to-DPI mode support")
Cc Jonas Karlman <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Robert Foss <[email protected]>
Cc Sam Ravnborg <[email protected]>

---
V2: - Add RB from Andrzej and Lucas

---
 drivers/gpu/drm/bridge/tc358767.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/tc358767.c +1 -1
index 798da0e4d0863..f78c2ad845159 100644
@@ -1899,7 +1899,7 @@ static int tc_mipi_dsi_host_attach(struct tc_data *tc)
 	of_node_put(host_node);
 	of_node_put(endpoint);
 
-	if (dsi_lanes < 0 || dsi_lanes > 4)
+	if (dsi_lanes <= 0 || dsi_lanes > 4)
 		return -EINVAL;
 
 	if (!host)
Signature · 1 line
2.35.1
#1 lore raw

PATCH v2 2/2 drm/bridge: tc358767: Report DSI-to-(e)DP as supported

The DSI-to-e(DP) mode is now supported, update the driver comment to reflect this. No functional change.

Fixes 3080c21a043ab ("drm/bridge: tc358767: Add DSI-to-(e)DP mode support")
Cc Jonas Karlman <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Robert Foss <[email protected]>
Cc Sam Ravnborg <[email protected]>

---
V2: - Shorten the comment, since all modes are supported. This also
fixes disparity between -- and ... spacer on 1st and 2nd line of the comment.
- Add RB from Andrzej and Lucas

---
 drivers/gpu/drm/bridge/tc358767.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/bridge/tc358767.c +1 -4
index f78c2ad845159..45ea829d56601 100644
@@ -3,10 +3,7 @@
  * TC358767/TC358867/TC9595 DSI/DPI-to-DPI/(e)DP bridge driver
  *
  * The TC358767/TC358867/TC9595 can operate in multiple modes.
- * The following modes are supported:
- *   DPI->(e)DP -- supported
- *   DSI->DPI .... supported
- *   DSI->(e)DP .. NOT supported
+ * All modes are supported -- DPI->(e)DP / DSI->DPI / DSI->(e)DP .
  *
  * Copyright (C) 2016 CogentEmbedded Inc
  * Author: Andrey Gusakov <[email protected]>
Signature · 1 line
2.35.1