blob: 1c016cde31a09718ad3c97d8b9422040d485c757 [file] [log] [blame]
Elliott Hughes8cb52b02013-11-21 13:43:23 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_VIDEO_ADF_H_
20#define _UAPI_VIDEO_ADF_H_
21#include <linux/ioctl.h>
22#include <linux/types.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#include <drm/drm_fourcc.h>
25#include <drm/drm_mode.h>
26#define ADF_NAME_LEN 32
27#define ADF_MAX_CUSTOM_DATA_SIZE PAGE_SIZE
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29enum adf_interface_type {
30 ADF_INTF_DSI = 0,
31 ADF_INTF_eDP = 1,
32 ADF_INTF_DPI = 2,
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 ADF_INTF_VGA = 3,
35 ADF_INTF_DVI = 4,
36 ADF_INTF_HDMI = 5,
37 ADF_INTF_MEMORY = 6,
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 ADF_INTF_TYPE_DEVICE_CUSTOM = 128,
40 ADF_INTF_TYPE_MAX = (~(__u32)0),
41};
42#define ADF_INTF_FLAG_PRIMARY (1 << 0)
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define ADF_INTF_FLAG_EXTERNAL (1 << 1)
45enum adf_event_type {
46 ADF_EVENT_VSYNC = 0,
47 ADF_EVENT_HOTPLUG = 1,
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 ADF_EVENT_DEVICE_CUSTOM = 128,
50 ADF_EVENT_TYPE_MAX = 255,
51};
52struct adf_set_event {
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 __u8 type;
55 __u8 enabled;
56};
57struct adf_event {
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 __u8 type;
60 __u32 length;
61};
62struct adf_vsync_event {
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 struct adf_event base;
65 __u64 timestamp;
66};
67struct adf_hotplug_event {
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 struct adf_event base;
70 __u8 connected;
71};
72#define ADF_MAX_PLANES 4
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74struct adf_buffer_config {
75 __u32 overlay_engine;
76 __u32 w;
77 __u32 h;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 __u32 format;
80 __s64 fd[ADF_MAX_PLANES];
81 __u32 offset[ADF_MAX_PLANES];
82 __u32 pitch[ADF_MAX_PLANES];
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 __u8 n_planes;
85 __s64 acquire_fence;
86};
87#define ADF_MAX_BUFFERS (PAGE_SIZE / sizeof(struct adf_buffer_config))
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89struct adf_post_config {
90 size_t n_interfaces;
91 __u32 __user *interfaces;
92 size_t n_bufs;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 struct adf_buffer_config __user *bufs;
95 size_t custom_data_size;
96 void __user *custom_data;
97 __s64 complete_fence;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99};
100#define ADF_MAX_INTERFACES (PAGE_SIZE / sizeof(__u32))
101struct adf_simple_buffer_alloc {
102 __u16 w;
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 __u16 h;
105 __u32 format;
106 __s64 fd;
107 __u32 offset;
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109 __u32 pitch;
110};
111struct adf_simple_post_config {
112 struct adf_buffer_config buf;
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114 __s64 complete_fence;
115};
116struct adf_attachment_config {
117 __u32 overlay_engine;
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119 __u32 interface;
120};
121struct adf_device_data {
122 char name[ADF_NAME_LEN];
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124 size_t n_attachments;
125 struct adf_attachment_config __user *attachments;
126 size_t n_allowed_attachments;
127 struct adf_attachment_config __user *allowed_attachments;
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 size_t custom_data_size;
130 void __user *custom_data;
131};
132#define ADF_MAX_ATTACHMENTS (PAGE_SIZE / sizeof(struct adf_attachment))
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134struct adf_interface_data {
135 char name[ADF_NAME_LEN];
136 __u32 type;
137 __u32 id;
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 __u32 flags;
140 __u8 dpms_state;
141 __u8 hotplug_detect;
142 __u16 width_mm;
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144 __u16 height_mm;
145 struct drm_mode_modeinfo current_mode;
146 size_t n_available_modes;
147 struct drm_mode_modeinfo __user *available_modes;
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 size_t custom_data_size;
150 void __user *custom_data;
151};
152#define ADF_MAX_MODES (PAGE_SIZE / sizeof(struct drm_mode_modeinfo))
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154struct adf_overlay_engine_data {
155 char name[ADF_NAME_LEN];
156 size_t n_supported_formats;
157 __u32 __user *supported_formats;
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159 size_t custom_data_size;
160 void __user *custom_data;
161};
162#define ADF_MAX_SUPPORTED_FORMATS (PAGE_SIZE / sizeof(__u32))
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164#define ADF_SET_EVENT _IOW('D', 0, struct adf_set_event)
165#define ADF_BLANK _IOW('D', 1, __u8)
166#define ADF_POST_CONFIG _IOW('D', 2, struct adf_post_config)
167#define ADF_SET_MODE _IOW('D', 3, struct drm_mode_modeinfo)
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169#define ADF_GET_DEVICE_DATA _IOR('D', 4, struct adf_device_data)
170#define ADF_GET_INTERFACE_DATA _IOR('D', 5, struct adf_interface_data)
171#define ADF_GET_OVERLAY_ENGINE_DATA _IOR('D', 6, struct adf_overlay_engine_data)
172#define ADF_SIMPLE_POST_CONFIG _IOW('D', 7, struct adf_simple_post_config)
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174#define ADF_SIMPLE_BUFFER_ALLOC _IOW('D', 8, struct adf_simple_buffer_alloc)
175#define ADF_ATTACH _IOW('D', 9, struct adf_attachment_config)
176#define ADF_DETACH _IOW('D', 10, struct adf_attachment_config)
177#endif
178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */