svn commit: r316306 - head/sys/arm/ti/am335x

Oleksandr Tymoshenko gonzo at FreeBSD.org
Thu Mar 30 21:54:58 UTC 2017


Author: gonzo
Date: Thu Mar 30 21:54:57 2017
New Revision: 316306
URL: https://svnweb.freebsd.org/changeset/base/316306

Log:
  [am335x] Fix HDMI suport for Beaglebone Black
  
  Fallback to Linux video interface bindings introduced in r313068 worked
  with then current DTS but that DTS turned out to be not conformant to
  the the bindings spec. DTS import in r314854 fixed the conformancy but
  broke the functionality. This commit syncs up functionality to the actual
  spec.
  
  Reported by:	manu@

Modified:
  head/sys/arm/ti/am335x/am335x_lcd.c

Modified: head/sys/arm/ti/am335x/am335x_lcd.c
==============================================================================
--- head/sys/arm/ti/am335x/am335x_lcd.c	Thu Mar 30 21:39:03 2017	(r316305)
+++ head/sys/arm/ti/am335x/am335x_lcd.c	Thu Mar 30 21:54:57 2017	(r316306)
@@ -342,7 +342,7 @@ am335x_mode_is_valid(const struct videom
 static void
 am335x_read_hdmi_property(device_t dev)
 {
-	phandle_t node;
+	phandle_t node, xref;
 	phandle_t endpoint;
 	phandle_t hdmi_xref;
 	struct am335x_lcd_softc *sc;
@@ -372,13 +372,15 @@ am335x_read_hdmi_property(device_t dev)
 		return;
 
 	for (endpoint = OF_child(node); endpoint != 0; endpoint = OF_peer(endpoint)) {
-		if (OF_getencprop(endpoint, "remote-endpoint", &node, sizeof(node)) != -1) {
-			/* port node of remote endpoint */
-			node = OF_node_from_xref(node);
-			/* port/ node */
+		if (OF_getencprop(endpoint, "remote-endpoint", &xref, sizeof(xref)) != -1) {
+			/* port/port at 0/endpoint at 0 */
+			node = OF_node_from_xref(xref);
+			/* port/port at 0 */
 			node = OF_parent(node);
-			/* actual owner of port/endpoint, in our case HDMI framer */
-			sc->sc_hdmi_framer = OF_parent(node);
+			/* port */
+			node = OF_parent(node);
+			/* actual owner of port, in our case HDMI framer */
+			sc->sc_hdmi_framer = OF_xref_from_node(OF_parent(node));
 			if (sc->sc_hdmi_framer != 0)
 				return;
 		}


More information about the svn-src-all mailing list