blob: 8b27cbbd89593276c92a420c037aebf0a416d901 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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_EXYNOS_DRM_H_
20#define _UAPI_EXYNOS_DRM_H_
Christopher Ferris106b3a82016-08-24 12:15:38 -070021#include "drm.h"
22#ifdef __cplusplus
Christopher Ferris106b3a82016-08-24 12:15:38 -070023#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070024struct drm_exynos_gem_create {
Christopher Ferris106b3a82016-08-24 12:15:38 -070025 __u64 size;
26 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -070027 __u32 handle;
Ben Cheng655a7c02013-10-16 16:09:24 -070028};
Christopher Ferris106b3a82016-08-24 12:15:38 -070029struct drm_exynos_gem_map {
30 __u32 handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -070031 __u32 reserved;
32 __u64 offset;
33};
Ben Cheng655a7c02013-10-16 16:09:24 -070034struct drm_exynos_gem_info {
Christopher Ferris106b3a82016-08-24 12:15:38 -070035 __u32 handle;
36 __u32 flags;
37 __u64 size;
Christopher Ferris82d75042015-01-26 10:57:07 -080038};
Christopher Ferris106b3a82016-08-24 12:15:38 -070039struct drm_exynos_vidi_connection {
40 __u32 connection;
41 __u32 extensions;
42 __u64 edid;
Ben Cheng655a7c02013-10-16 16:09:24 -070043};
44enum e_drm_exynos_gem_mem_type {
Tao Baod7db5942015-01-28 10:07:51 -080045 EXYNOS_BO_CONTIG = 0 << 0,
Tao Baod7db5942015-01-28 10:07:51 -080046 EXYNOS_BO_NONCONTIG = 1 << 0,
47 EXYNOS_BO_NONCACHABLE = 0 << 1,
48 EXYNOS_BO_CACHABLE = 1 << 1,
49 EXYNOS_BO_WC = 1 << 2,
Tao Baod7db5942015-01-28 10:07:51 -080050 EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE | EXYNOS_BO_WC
Ben Cheng655a7c02013-10-16 16:09:24 -070051};
52struct drm_exynos_g2d_get_ver {
Tao Baod7db5942015-01-28 10:07:51 -080053 __u32 major;
Tao Baod7db5942015-01-28 10:07:51 -080054 __u32 minor;
Ben Cheng655a7c02013-10-16 16:09:24 -070055};
56struct drm_exynos_g2d_cmd {
Tao Baod7db5942015-01-28 10:07:51 -080057 __u32 offset;
Tao Baod7db5942015-01-28 10:07:51 -080058 __u32 data;
Ben Cheng655a7c02013-10-16 16:09:24 -070059};
60enum drm_exynos_g2d_buf_type {
Tao Baod7db5942015-01-28 10:07:51 -080061 G2D_BUF_USERPTR = 1 << 31,
Ben Cheng655a7c02013-10-16 16:09:24 -070062};
63enum drm_exynos_g2d_event_type {
Tao Baod7db5942015-01-28 10:07:51 -080064 G2D_EVENT_NOT,
65 G2D_EVENT_NONSTOP,
Tao Baod7db5942015-01-28 10:07:51 -080066 G2D_EVENT_STOP,
Ben Cheng655a7c02013-10-16 16:09:24 -070067};
68struct drm_exynos_g2d_userptr {
Tao Baod7db5942015-01-28 10:07:51 -080069 unsigned long userptr;
Tao Baod7db5942015-01-28 10:07:51 -080070 unsigned long size;
Ben Cheng655a7c02013-10-16 16:09:24 -070071};
72struct drm_exynos_g2d_set_cmdlist {
Tao Baod7db5942015-01-28 10:07:51 -080073 __u64 cmd;
Tao Baod7db5942015-01-28 10:07:51 -080074 __u64 cmd_buf;
75 __u32 cmd_nr;
76 __u32 cmd_buf_nr;
77 __u64 event_type;
Tao Baod7db5942015-01-28 10:07:51 -080078 __u64 user_data;
Ben Cheng655a7c02013-10-16 16:09:24 -070079};
80struct drm_exynos_g2d_exec {
Tao Baod7db5942015-01-28 10:07:51 -080081 __u64 async;
Ben Cheng655a7c02013-10-16 16:09:24 -070082};
Christopher Ferris9ce28842018-10-25 12:11:39 -070083struct drm_exynos_ioctl_ipp_get_res {
84 __u32 count_ipps;
85 __u32 reserved;
86 __u64 ipp_id_ptr;
87};
88enum drm_exynos_ipp_format_type {
89 DRM_EXYNOS_IPP_FORMAT_SOURCE = 0x01,
90 DRM_EXYNOS_IPP_FORMAT_DESTINATION = 0x02,
91};
92struct drm_exynos_ipp_format {
93 __u32 fourcc;
94 __u32 type;
95 __u64 modifier;
96};
97enum drm_exynos_ipp_capability {
98 DRM_EXYNOS_IPP_CAP_CROP = 0x01,
99 DRM_EXYNOS_IPP_CAP_ROTATE = 0x02,
100 DRM_EXYNOS_IPP_CAP_SCALE = 0x04,
101 DRM_EXYNOS_IPP_CAP_CONVERT = 0x08,
102};
103struct drm_exynos_ioctl_ipp_get_caps {
104 __u32 ipp_id;
105 __u32 capabilities;
106 __u32 reserved;
107 __u32 formats_count;
108 __u64 formats_ptr;
109};
110enum drm_exynos_ipp_limit_type {
111 DRM_EXYNOS_IPP_LIMIT_TYPE_SIZE = 0x0001,
112 DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE = 0x0002,
113 DRM_EXYNOS_IPP_LIMIT_SIZE_BUFFER = 0x0001 << 16,
114 DRM_EXYNOS_IPP_LIMIT_SIZE_AREA = 0x0002 << 16,
115 DRM_EXYNOS_IPP_LIMIT_SIZE_ROTATED = 0x0003 << 16,
116 DRM_EXYNOS_IPP_LIMIT_TYPE_MASK = 0x000f,
117 DRM_EXYNOS_IPP_LIMIT_SIZE_MASK = 0x000f << 16,
118};
119struct drm_exynos_ipp_limit_val {
120 __u32 min;
121 __u32 max;
122 __u32 align;
123 __u32 reserved;
124};
125struct drm_exynos_ipp_limit {
126 __u32 type;
127 __u32 reserved;
128 struct drm_exynos_ipp_limit_val h;
129 struct drm_exynos_ipp_limit_val v;
130};
131struct drm_exynos_ioctl_ipp_get_limits {
132 __u32 ipp_id;
133 __u32 fourcc;
134 __u64 modifier;
135 __u32 type;
136 __u32 limits_count;
137 __u64 limits_ptr;
138};
139enum drm_exynos_ipp_task_id {
140 DRM_EXYNOS_IPP_TASK_BUFFER = 0x0001,
141 DRM_EXYNOS_IPP_TASK_RECTANGLE = 0x0002,
142 DRM_EXYNOS_IPP_TASK_TRANSFORM = 0x0003,
143 DRM_EXYNOS_IPP_TASK_ALPHA = 0x0004,
144 DRM_EXYNOS_IPP_TASK_TYPE_SOURCE = 0x0001 << 16,
145 DRM_EXYNOS_IPP_TASK_TYPE_DESTINATION = 0x0002 << 16,
146};
147struct drm_exynos_ipp_task_buffer {
148 __u32 id;
149 __u32 fourcc;
150 __u32 width, height;
151 __u32 gem_id[4];
152 __u32 offset[4];
153 __u32 pitch[4];
154 __u64 modifier;
155};
156struct drm_exynos_ipp_task_rect {
157 __u32 id;
158 __u32 reserved;
159 __u32 x;
160 __u32 y;
161 __u32 w;
162 __u32 h;
163};
164struct drm_exynos_ipp_task_transform {
165 __u32 id;
166 __u32 rotation;
167};
168struct drm_exynos_ipp_task_alpha {
169 __u32 id;
170 __u32 value;
171};
172enum drm_exynos_ipp_flag {
173 DRM_EXYNOS_IPP_FLAG_EVENT = 0x01,
174 DRM_EXYNOS_IPP_FLAG_TEST_ONLY = 0x02,
175 DRM_EXYNOS_IPP_FLAG_NONBLOCK = 0x04,
176};
177#define DRM_EXYNOS_IPP_FLAGS (DRM_EXYNOS_IPP_FLAG_EVENT | DRM_EXYNOS_IPP_FLAG_TEST_ONLY | DRM_EXYNOS_IPP_FLAG_NONBLOCK)
178struct drm_exynos_ioctl_ipp_commit {
179 __u32 ipp_id;
180 __u32 flags;
181 __u32 reserved;
182 __u32 params_size;
183 __u64 params_ptr;
184 __u64 user_data;
185};
Christopher Ferris82d75042015-01-26 10:57:07 -0800186#define DRM_EXYNOS_GEM_CREATE 0x00
Christopher Ferris106b3a82016-08-24 12:15:38 -0700187#define DRM_EXYNOS_GEM_MAP 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -0700188#define DRM_EXYNOS_GEM_GET 0x04
189#define DRM_EXYNOS_VIDI_CONNECTION 0x07
Ben Cheng655a7c02013-10-16 16:09:24 -0700190#define DRM_EXYNOS_G2D_GET_VER 0x20
191#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21
192#define DRM_EXYNOS_G2D_EXEC 0x22
Christopher Ferris9ce28842018-10-25 12:11:39 -0700193#define DRM_EXYNOS_IPP_GET_RESOURCES 0x40
194#define DRM_EXYNOS_IPP_GET_CAPS 0x41
195#define DRM_EXYNOS_IPP_GET_LIMITS 0x42
196#define DRM_EXYNOS_IPP_COMMIT 0x43
Tao Baod7db5942015-01-28 10:07:51 -0800197#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700198#define DRM_IOCTL_EXYNOS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_MAP, struct drm_exynos_gem_map)
Tao Baod7db5942015-01-28 10:07:51 -0800199#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
200#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700201#define DRM_IOCTL_EXYNOS_G2D_GET_VER DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_GET_VER, struct drm_exynos_g2d_get_ver)
Tao Baod7db5942015-01-28 10:07:51 -0800202#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist)
203#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec)
Christopher Ferris9ce28842018-10-25 12:11:39 -0700204#define DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_RESOURCES, struct drm_exynos_ioctl_ipp_get_res)
205#define DRM_IOCTL_EXYNOS_IPP_GET_CAPS DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_CAPS, struct drm_exynos_ioctl_ipp_get_caps)
206#define DRM_IOCTL_EXYNOS_IPP_GET_LIMITS DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_LIMITS, struct drm_exynos_ioctl_ipp_get_limits)
207#define DRM_IOCTL_EXYNOS_IPP_COMMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_COMMIT, struct drm_exynos_ioctl_ipp_commit)
Christopher Ferris82d75042015-01-26 10:57:07 -0800208#define DRM_EXYNOS_G2D_EVENT 0x80000000
Christopher Ferris9ce28842018-10-25 12:11:39 -0700209#define DRM_EXYNOS_IPP_EVENT 0x80000002
Ben Cheng655a7c02013-10-16 16:09:24 -0700210struct drm_exynos_g2d_event {
Tao Baod7db5942015-01-28 10:07:51 -0800211 struct drm_event base;
212 __u64 user_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700213 __u32 tv_sec;
Tao Baod7db5942015-01-28 10:07:51 -0800214 __u32 tv_usec;
215 __u32 cmdlist_no;
216 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700217};
Christopher Ferris9ce28842018-10-25 12:11:39 -0700218struct drm_exynos_ipp_event {
219 struct drm_event base;
220 __u64 user_data;
221 __u32 tv_sec;
222 __u32 tv_usec;
223 __u32 ipp_id;
224 __u32 sequence;
225 __u64 reserved;
226};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700227#ifdef __cplusplus
228#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700229#endif