From owner-svn-src-all@freebsd.org Sat Nov 14 21:01:37 2015 Return-Path: Delivered-To: svn-src-all@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 15ABDA2FA1A; Sat, 14 Nov 2015 21:01:37 +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 B810B1D56; Sat, 14 Nov 2015 21:01:36 +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 tAEL1ZSV051126; Sat, 14 Nov 2015 21:01:35 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAEL1Zhs051123; Sat, 14 Nov 2015 21:01:35 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201511142101.tAEL1Zhs051123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 14 Nov 2015 21:01:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290831 - in head/sys/arm: 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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Nov 2015 21:01:37 -0000 Author: gonzo Date: Sat Nov 14 21:01:35 2015 New Revision: 290831 URL: https://svnweb.freebsd.org/changeset/base/290831 Log: Somewhat improve HDMI event API - Pass device_t for HDMI framer as an argument for event hook - Use #define for event values, instead of opaque (and unused) 0 Modified: head/sys/arm/arm/hdmi_if.m head/sys/arm/ti/am335x/am335x_lcd.c head/sys/arm/ti/am335x/tda19988.c Modified: head/sys/arm/arm/hdmi_if.m ============================================================================== --- head/sys/arm/arm/hdmi_if.m Sat Nov 14 19:47:17 2015 (r290830) +++ head/sys/arm/arm/hdmi_if.m Sat Nov 14 21:01:35 2015 (r290831) @@ -35,8 +35,10 @@ INTERFACE hdmi; HEADER { #include - typedef void (*hdmi_event_hook)(void *, int); + typedef void (*hdmi_event_hook)(void *, device_t, int); EVENTHANDLER_DECLARE(hdmi_event, hdmi_event_hook); + + #define HDMI_EVENT_CONNECTED 0 } # Modified: head/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_lcd.c Sat Nov 14 19:47:17 2015 (r290830) +++ head/sys/arm/ti/am335x/am335x_lcd.c Sat Nov 14 21:01:35 2015 (r290831) @@ -800,7 +800,7 @@ done: } static void -am335x_lcd_hdmi_event(void *arg) +am335x_lcd_hdmi_event(void *arg, device_t hdmi, int event) { struct am335x_lcd_softc *sc; const struct videomode *videomode; @@ -1001,7 +1001,7 @@ am335x_lcd_attach(device_t dev) am335x_lcd_configure(sc); else sc->sc_hdmi_evh = EVENTHANDLER_REGISTER(hdmi_event, - am335x_lcd_hdmi_event, sc, 0); + am335x_lcd_hdmi_event, sc, EVENTHANDLER_PRI_ANY); return (0); } Modified: head/sys/arm/ti/am335x/tda19988.c ============================================================================== --- head/sys/arm/ti/am335x/tda19988.c Sat Nov 14 19:47:17 2015 (r290830) +++ head/sys/arm/ti/am335x/tda19988.c Sat Nov 14 21:01:35 2015 (r290831) @@ -635,7 +635,7 @@ tda19988_read_edid(struct tda19988_softc } } - EVENTHANDLER_INVOKE(hdmi_event, 0); + EVENTHANDLER_INVOKE(hdmi_event, sc->sc_dev, HDMI_EVENT_CONNECTED); done: if (sc->sc_version == TDA19988) tda19988_reg_set(sc, TDA_TX4, TX4_PD_RAM);