From owner-svn-src-head@freebsd.org Thu Mar 30 21:54:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACED2D254FE; Thu, 30 Mar 2017 21:54:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7187CC02; Thu, 30 Mar 2017 21:54:58 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2ULsvWe091508; Thu, 30 Mar 2017 21:54:57 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2ULsvHG091507; Thu, 30 Mar 2017 21:54:57 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201703302154.v2ULsvHG091507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 30 Mar 2017 21:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316306 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 21:54:58 -0000 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; }