From 384b754c2f3c70c15da177c8b11a0a51f23c76fc Mon Sep 17 00:00:00 2001 From: Robert Morell Date: Thu, 3 Mar 2011 15:02:53 -0800 Subject: video: tegra: Add control device to dc extension driver This device exposes control over everything that's not specific to one of T20's two display controllers. It supports: - output devices - event delivery - hotplug events bug 818525 Original-Change-Id: I3a46f1dddc483b08ed3ee91a4f9c64111c1fd7eb Signed-off-by: Robert Morell Reviewed-on: http://git-master/r/40520 Reviewed-by: Varun Colbert Tested-by: Varun Colbert Rebase-Id: R9e49fe41f3327b797ec65c3729f4f94edbb45307 --- include/video/tegra_dc_ext.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'include/video') diff --git a/include/video/tegra_dc_ext.h b/include/video/tegra_dc_ext.h index f9935ef8c04f..6f43ee689b26 100644 --- a/include/video/tegra_dc_ext.h +++ b/include/video/tegra_dc_ext.h @@ -25,6 +25,7 @@ # include #else # include +# include #endif #define TEGRA_DC_EXT_FMT_P1 0 @@ -145,4 +146,46 @@ struct tegra_dc_ext_cursor { #define TEGRA_DC_EXT_SET_CURSOR \ _IOW('D', 0x07, struct tegra_dc_ext_cursor) + +enum tegra_dc_ext_control_output_type { + TEGRA_DC_EXT_DSI, + TEGRA_DC_EXT_LVDS, + TEGRA_DC_EXT_VGA, + TEGRA_DC_EXT_HDMI, + TEGRA_DC_EXT_DVI, +}; + +struct tegra_dc_ext_control_output_properties { + __u32 handle; + enum tegra_dc_ext_control_output_type type; + __u32 connected; + __s32 associated_head; +}; + +struct tegra_dc_ext_control_output_edid { + __u32 handle; + __u32 size; + void *data; +}; + +struct tegra_dc_ext_event { + __u32 type; + ssize_t data_size; + char data[0]; +}; + +#define TEGRA_DC_EXT_EVENT_HOTPLUG 0x1 +struct tegra_dc_ext_control_event_hotplug { + __u32 handle; +}; + +#define TEGRA_DC_EXT_CONTROL_GET_NUM_OUTPUTS \ + _IOR('C', 0x00, __u32) +#define TEGRA_DC_EXT_CONTROL_GET_OUTPUT_PROPERTIES \ + _IOWR('C', 0x01, struct tegra_dc_ext_control_output_properties) +#define TEGRA_DC_EXT_CONTROL_GET_OUTPUT_EDID \ + _IOWR('C', 0x02, struct tegra_dc_ext_control_output_edid) +#define TEGRA_DC_EXT_CONTROL_SET_EVENT_MASK \ + _IOW('C', 0x03, __u32) + #endif /* __TEGRA_DC_EXT_H */ -- cgit v1.2.3