1284534Sgonzo#-
2284534Sgonzo# Copyright (c) 2015 Oleksandr Tymoshenko <gonzo@freebsd.org>
3284534Sgonzo# All rights reserved.
4284534Sgonzo#
5284534Sgonzo# Redistribution and use in source and binary forms, with or without
6284534Sgonzo# modification, are permitted provided that the following conditions
7284534Sgonzo# are met:
8284534Sgonzo# 1. Redistributions of source code must retain the above copyright
9284534Sgonzo#    notice, this list of conditions and the following disclaimer.
10284534Sgonzo# 2. Redistributions in binary form must reproduce the above copyright
11284534Sgonzo#    notice, this list of conditions and the following disclaimer in the
12284534Sgonzo#    documentation and/or other materials provided with the distribution.
13284534Sgonzo#
14284534Sgonzo# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15284534Sgonzo# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16284534Sgonzo# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17284534Sgonzo# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18284534Sgonzo# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19284534Sgonzo# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20284534Sgonzo# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21284534Sgonzo# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22284534Sgonzo# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23284534Sgonzo# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24284534Sgonzo# SUCH DAMAGE.
25284534Sgonzo#
26284534Sgonzo# $FreeBSD$
27284534Sgonzo#
28284534Sgonzo
29284534Sgonzo#include <sys/bus.h>
30284534Sgonzo#include <dev/videomode/videomode.h>
31284534Sgonzo#include <dev/videomode/edidvar.h>
32284534Sgonzo
33284534SgonzoINTERFACE hdmi;
34284534Sgonzo
35290814SgonzoHEADER {
36290814Sgonzo	#include <sys/eventhandler.h>
37290814Sgonzo
38290831Sgonzo	typedef void (*hdmi_event_hook)(void *, device_t, int);
39290814Sgonzo	EVENTHANDLER_DECLARE(hdmi_event, hdmi_event_hook);
40290831Sgonzo
41290831Sgonzo	#define HDMI_EVENT_CONNECTED	0
42290814Sgonzo}
43290814Sgonzo
44284534Sgonzo#
45284534Sgonzo# Get EDID info
46284534Sgonzo#
47284534SgonzoMETHOD int get_edid {
48284534Sgonzo	device_t dev;
49284534Sgonzo	uint8_t **edid;
50284534Sgonzo	uint32_t *edid_length;
51284534Sgonzo};
52284534Sgonzo
53284534Sgonzo#
54284534Sgonzo# Set videomode
55284534Sgonzo#
56284534SgonzoMETHOD int set_videomode {
57284534Sgonzo	device_t dev;
58284534Sgonzo	const struct videomode *videomode;
59284534Sgonzo};
60296064Sjmcneill
61296064Sjmcneill#
62296064Sjmcneill# Enable/disable output
63296064Sjmcneill#
64296064SjmcneillMETHOD int enable {
65296064Sjmcneill	device_t dev;
66296064Sjmcneill	int onoff;
67296064Sjmcneill};
68