Date: Sat, 14 Nov 2015 21:01:35 +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: r290831 - in head/sys/arm: arm ti/am335x Message-ID: <201511142101.tAEL1Zhs051123@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/eventhandler.h> - 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511142101.tAEL1Zhs051123>