blob: cd4ab1636a2f35f9613f5cb82c260696332bd5d6 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI_EXYNOS_DRM_H_
8#define _UAPI_EXYNOS_DRM_H_
Christopher Ferris106b3a82016-08-24 12:15:38 -07009#include "drm.h"
10#ifdef __cplusplus
Christopher Ferris48fe0ae2019-01-10 15:59:33 -080011extern "C" {
Christopher Ferris106b3a82016-08-24 12:15:38 -070012#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070013struct drm_exynos_gem_create {
Christopher Ferris106b3a82016-08-24 12:15:38 -070014 __u64 size;
15 __u32 flags;
Christopher Ferris106b3a82016-08-24 12:15:38 -070016 __u32 handle;
Ben Cheng655a7c02013-10-16 16:09:24 -070017};
Christopher Ferris106b3a82016-08-24 12:15:38 -070018struct drm_exynos_gem_map {
19 __u32 handle;
Christopher Ferris106b3a82016-08-24 12:15:38 -070020 __u32 reserved;
21 __u64 offset;
22};
Ben Cheng655a7c02013-10-16 16:09:24 -070023struct drm_exynos_gem_info {
Christopher Ferris106b3a82016-08-24 12:15:38 -070024 __u32 handle;
25 __u32 flags;
26 __u64 size;
Christopher Ferris82d75042015-01-26 10:57:07 -080027};
Christopher Ferris106b3a82016-08-24 12:15:38 -070028struct drm_exynos_vidi_connection {
29 __u32 connection;
30 __u32 extensions;
31 __u64 edid;
Ben Cheng655a7c02013-10-16 16:09:24 -070032};
33enum e_drm_exynos_gem_mem_type {
Tao Baod7db5942015-01-28 10:07:51 -080034 EXYNOS_BO_CONTIG = 0 << 0,
Tao Baod7db5942015-01-28 10:07:51 -080035 EXYNOS_BO_NONCONTIG = 1 << 0,
36 EXYNOS_BO_NONCACHABLE = 0 << 1,
37 EXYNOS_BO_CACHABLE = 1 << 1,
38 EXYNOS_BO_WC = 1 << 2,
Tao Baod7db5942015-01-28 10:07:51 -080039 EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE | EXYNOS_BO_WC
Ben Cheng655a7c02013-10-16 16:09:24 -070040};
41struct drm_exynos_g2d_get_ver {
Tao Baod7db5942015-01-28 10:07:51 -080042 __u32 major;
Tao Baod7db5942015-01-28 10:07:51 -080043 __u32 minor;
Ben Cheng655a7c02013-10-16 16:09:24 -070044};
45struct drm_exynos_g2d_cmd {
Tao Baod7db5942015-01-28 10:07:51 -080046 __u32 offset;
Tao Baod7db5942015-01-28 10:07:51 -080047 __u32 data;
Ben Cheng655a7c02013-10-16 16:09:24 -070048};
49enum drm_exynos_g2d_buf_type {
Tao Baod7db5942015-01-28 10:07:51 -080050 G2D_BUF_USERPTR = 1 << 31,
Ben Cheng655a7c02013-10-16 16:09:24 -070051};
52enum drm_exynos_g2d_event_type {
Tao Baod7db5942015-01-28 10:07:51 -080053 G2D_EVENT_NOT,
54 G2D_EVENT_NONSTOP,
Tao Baod7db5942015-01-28 10:07:51 -080055 G2D_EVENT_STOP,
Ben Cheng655a7c02013-10-16 16:09:24 -070056};
57struct drm_exynos_g2d_userptr {
Tao Baod7db5942015-01-28 10:07:51 -080058 unsigned long userptr;
Tao Baod7db5942015-01-28 10:07:51 -080059 unsigned long size;
Ben Cheng655a7c02013-10-16 16:09:24 -070060};
61struct drm_exynos_g2d_set_cmdlist {
Tao Baod7db5942015-01-28 10:07:51 -080062 __u64 cmd;
Tao Baod7db5942015-01-28 10:07:51 -080063 __u64 cmd_buf;
64 __u32 cmd_nr;
65 __u32 cmd_buf_nr;
66 __u64 event_type;
Tao Baod7db5942015-01-28 10:07:51 -080067 __u64 user_data;
Ben Cheng655a7c02013-10-16 16:09:24 -070068};
69struct drm_exynos_g2d_exec {
Tao Baod7db5942015-01-28 10:07:51 -080070 __u64 async;
Ben Cheng655a7c02013-10-16 16:09:24 -070071};
Christopher Ferris9ce28842018-10-25 12:11:39 -070072struct drm_exynos_ioctl_ipp_get_res {
73 __u32 count_ipps;
74 __u32 reserved;
75 __u64 ipp_id_ptr;
76};
77enum drm_exynos_ipp_format_type {
78 DRM_EXYNOS_IPP_FORMAT_SOURCE = 0x01,
79 DRM_EXYNOS_IPP_FORMAT_DESTINATION = 0x02,
80};
81struct drm_exynos_ipp_format {
82 __u32 fourcc;
83 __u32 type;
84 __u64 modifier;
85};
86enum drm_exynos_ipp_capability {
87 DRM_EXYNOS_IPP_CAP_CROP = 0x01,
88 DRM_EXYNOS_IPP_CAP_ROTATE = 0x02,
89 DRM_EXYNOS_IPP_CAP_SCALE = 0x04,
90 DRM_EXYNOS_IPP_CAP_CONVERT = 0x08,
91};
92struct drm_exynos_ioctl_ipp_get_caps {
93 __u32 ipp_id;
94 __u32 capabilities;
95 __u32 reserved;
96 __u32 formats_count;
97 __u64 formats_ptr;
98};
99enum drm_exynos_ipp_limit_type {
100 DRM_EXYNOS_IPP_LIMIT_TYPE_SIZE = 0x0001,
101 DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE = 0x0002,
102 DRM_EXYNOS_IPP_LIMIT_SIZE_BUFFER = 0x0001 << 16,
103 DRM_EXYNOS_IPP_LIMIT_SIZE_AREA = 0x0002 << 16,
104 DRM_EXYNOS_IPP_LIMIT_SIZE_ROTATED = 0x0003 << 16,
105 DRM_EXYNOS_IPP_LIMIT_TYPE_MASK = 0x000f,
106 DRM_EXYNOS_IPP_LIMIT_SIZE_MASK = 0x000f << 16,
107};
108struct drm_exynos_ipp_limit_val {
109 __u32 min;
110 __u32 max;
111 __u32 align;
112 __u32 reserved;
113};
114struct drm_exynos_ipp_limit {
115 __u32 type;
116 __u32 reserved;
117 struct drm_exynos_ipp_limit_val h;
118 struct drm_exynos_ipp_limit_val v;
119};
120struct drm_exynos_ioctl_ipp_get_limits {
121 __u32 ipp_id;
122 __u32 fourcc;
123 __u64 modifier;
124 __u32 type;
125 __u32 limits_count;
126 __u64 limits_ptr;
127};
128enum drm_exynos_ipp_task_id {
129 DRM_EXYNOS_IPP_TASK_BUFFER = 0x0001,
130 DRM_EXYNOS_IPP_TASK_RECTANGLE = 0x0002,
131 DRM_EXYNOS_IPP_TASK_TRANSFORM = 0x0003,
132 DRM_EXYNOS_IPP_TASK_ALPHA = 0x0004,
133 DRM_EXYNOS_IPP_TASK_TYPE_SOURCE = 0x0001 << 16,
134 DRM_EXYNOS_IPP_TASK_TYPE_DESTINATION = 0x0002 << 16,
135};
136struct drm_exynos_ipp_task_buffer {
137 __u32 id;
138 __u32 fourcc;
139 __u32 width, height;
140 __u32 gem_id[4];
141 __u32 offset[4];
142 __u32 pitch[4];
143 __u64 modifier;
144};
145struct drm_exynos_ipp_task_rect {
146 __u32 id;
147 __u32 reserved;
148 __u32 x;
149 __u32 y;
150 __u32 w;
151 __u32 h;
152};
153struct drm_exynos_ipp_task_transform {
154 __u32 id;
155 __u32 rotation;
156};
157struct drm_exynos_ipp_task_alpha {
158 __u32 id;
159 __u32 value;
160};
161enum drm_exynos_ipp_flag {
162 DRM_EXYNOS_IPP_FLAG_EVENT = 0x01,
163 DRM_EXYNOS_IPP_FLAG_TEST_ONLY = 0x02,
164 DRM_EXYNOS_IPP_FLAG_NONBLOCK = 0x04,
165};
166#define DRM_EXYNOS_IPP_FLAGS (DRM_EXYNOS_IPP_FLAG_EVENT | DRM_EXYNOS_IPP_FLAG_TEST_ONLY | DRM_EXYNOS_IPP_FLAG_NONBLOCK)
167struct drm_exynos_ioctl_ipp_commit {
168 __u32 ipp_id;
169 __u32 flags;
170 __u32 reserved;
171 __u32 params_size;
172 __u64 params_ptr;
173 __u64 user_data;
174};
Christopher Ferris82d75042015-01-26 10:57:07 -0800175#define DRM_EXYNOS_GEM_CREATE 0x00
Christopher Ferris106b3a82016-08-24 12:15:38 -0700176#define DRM_EXYNOS_GEM_MAP 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -0700177#define DRM_EXYNOS_GEM_GET 0x04
178#define DRM_EXYNOS_VIDI_CONNECTION 0x07
Ben Cheng655a7c02013-10-16 16:09:24 -0700179#define DRM_EXYNOS_G2D_GET_VER 0x20
180#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21
181#define DRM_EXYNOS_G2D_EXEC 0x22
Christopher Ferris9ce28842018-10-25 12:11:39 -0700182#define DRM_EXYNOS_IPP_GET_RESOURCES 0x40
183#define DRM_EXYNOS_IPP_GET_CAPS 0x41
184#define DRM_EXYNOS_IPP_GET_LIMITS 0x42
185#define DRM_EXYNOS_IPP_COMMIT 0x43
Tao Baod7db5942015-01-28 10:07:51 -0800186#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 -0700187#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 -0800188#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
189#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 -0700190#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 -0800191#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist)
192#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 -0700193#define DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_RESOURCES, struct drm_exynos_ioctl_ipp_get_res)
194#define DRM_IOCTL_EXYNOS_IPP_GET_CAPS DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_CAPS, struct drm_exynos_ioctl_ipp_get_caps)
195#define DRM_IOCTL_EXYNOS_IPP_GET_LIMITS DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_LIMITS, struct drm_exynos_ioctl_ipp_get_limits)
196#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 -0800197#define DRM_EXYNOS_G2D_EVENT 0x80000000
Christopher Ferris9ce28842018-10-25 12:11:39 -0700198#define DRM_EXYNOS_IPP_EVENT 0x80000002
Ben Cheng655a7c02013-10-16 16:09:24 -0700199struct drm_exynos_g2d_event {
Tao Baod7db5942015-01-28 10:07:51 -0800200 struct drm_event base;
201 __u64 user_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700202 __u32 tv_sec;
Tao Baod7db5942015-01-28 10:07:51 -0800203 __u32 tv_usec;
204 __u32 cmdlist_no;
205 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700206};
Christopher Ferris9ce28842018-10-25 12:11:39 -0700207struct drm_exynos_ipp_event {
208 struct drm_event base;
209 __u64 user_data;
210 __u32 tv_sec;
211 __u32 tv_usec;
212 __u32 ipp_id;
213 __u32 sequence;
214 __u64 reserved;
215};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700216#ifdef __cplusplus
Christopher Ferris48fe0ae2019-01-10 15:59:33 -0800217}
Christopher Ferris106b3a82016-08-24 12:15:38 -0700218#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700219#endif