Date: Thu, 30 Mar 2017 21:54:57 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316306 - head/sys/arm/ti/am335x Message-ID: <201703302154.v2ULsvHG091507@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@0/endpoint@0 */ + node = OF_node_from_xref(xref); + /* port/port@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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703302154.v2ULsvHG091507>