blob: 9514d758fe549809b3640e46e810077ff09445c9 [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};
83enum drm_exynos_ops_id {
Tao Baod7db5942015-01-28 10:07:51 -080084 EXYNOS_DRM_OPS_SRC,
85 EXYNOS_DRM_OPS_DST,
Tao Baod7db5942015-01-28 10:07:51 -080086 EXYNOS_DRM_OPS_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -070087};
88struct drm_exynos_sz {
Tao Baod7db5942015-01-28 10:07:51 -080089 __u32 hsize;
Tao Baod7db5942015-01-28 10:07:51 -080090 __u32 vsize;
Ben Cheng655a7c02013-10-16 16:09:24 -070091};
92struct drm_exynos_pos {
Tao Baod7db5942015-01-28 10:07:51 -080093 __u32 x;
Tao Baod7db5942015-01-28 10:07:51 -080094 __u32 y;
95 __u32 w;
96 __u32 h;
Christopher Ferris82d75042015-01-26 10:57:07 -080097};
Ben Cheng655a7c02013-10-16 16:09:24 -070098enum drm_exynos_flip {
Tao Baod7db5942015-01-28 10:07:51 -080099 EXYNOS_DRM_FLIP_NONE = (0 << 0),
100 EXYNOS_DRM_FLIP_VERTICAL = (1 << 0),
101 EXYNOS_DRM_FLIP_HORIZONTAL = (1 << 1),
Tao Baod7db5942015-01-28 10:07:51 -0800102 EXYNOS_DRM_FLIP_BOTH = EXYNOS_DRM_FLIP_VERTICAL | EXYNOS_DRM_FLIP_HORIZONTAL,
Ben Cheng655a7c02013-10-16 16:09:24 -0700103};
Christopher Ferris82d75042015-01-26 10:57:07 -0800104enum drm_exynos_degree {
Tao Baod7db5942015-01-28 10:07:51 -0800105 EXYNOS_DRM_DEGREE_0,
Tao Baod7db5942015-01-28 10:07:51 -0800106 EXYNOS_DRM_DEGREE_90,
107 EXYNOS_DRM_DEGREE_180,
108 EXYNOS_DRM_DEGREE_270,
Ben Cheng655a7c02013-10-16 16:09:24 -0700109};
110enum drm_exynos_planer {
Tao Baod7db5942015-01-28 10:07:51 -0800111 EXYNOS_DRM_PLANAR_Y,
112 EXYNOS_DRM_PLANAR_CB,
113 EXYNOS_DRM_PLANAR_CR,
Tao Baod7db5942015-01-28 10:07:51 -0800114 EXYNOS_DRM_PLANAR_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700115};
Christopher Ferris82d75042015-01-26 10:57:07 -0800116struct drm_exynos_ipp_prop_list {
Tao Baod7db5942015-01-28 10:07:51 -0800117 __u32 version;
Tao Baod7db5942015-01-28 10:07:51 -0800118 __u32 ipp_id;
119 __u32 count;
120 __u32 writeback;
121 __u32 flip;
Tao Baod7db5942015-01-28 10:07:51 -0800122 __u32 degree;
123 __u32 csc;
124 __u32 crop;
125 __u32 scale;
Tao Baod7db5942015-01-28 10:07:51 -0800126 __u32 refresh_min;
127 __u32 refresh_max;
128 __u32 reserved;
129 struct drm_exynos_sz crop_min;
Tao Baod7db5942015-01-28 10:07:51 -0800130 struct drm_exynos_sz crop_max;
131 struct drm_exynos_sz scale_min;
132 struct drm_exynos_sz scale_max;
Ben Cheng655a7c02013-10-16 16:09:24 -0700133};
134struct drm_exynos_ipp_config {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700135 __u32 ops_id;
136 __u32 flip;
137 __u32 degree;
Tao Baod7db5942015-01-28 10:07:51 -0800138 __u32 fmt;
139 struct drm_exynos_sz sz;
140 struct drm_exynos_pos pos;
Ben Cheng655a7c02013-10-16 16:09:24 -0700141};
142enum drm_exynos_ipp_cmd {
Tao Baod7db5942015-01-28 10:07:51 -0800143 IPP_CMD_NONE,
144 IPP_CMD_M2M,
145 IPP_CMD_WB,
Tao Baod7db5942015-01-28 10:07:51 -0800146 IPP_CMD_OUTPUT,
147 IPP_CMD_MAX,
Christopher Ferris82d75042015-01-26 10:57:07 -0800148};
Ben Cheng655a7c02013-10-16 16:09:24 -0700149struct drm_exynos_ipp_property {
Tao Baod7db5942015-01-28 10:07:51 -0800150 struct drm_exynos_ipp_config config[EXYNOS_DRM_OPS_MAX];
Christopher Ferris106b3a82016-08-24 12:15:38 -0700151 __u32 cmd;
Tao Baod7db5942015-01-28 10:07:51 -0800152 __u32 ipp_id;
153 __u32 prop_id;
Tao Baod7db5942015-01-28 10:07:51 -0800154 __u32 refresh_rate;
Ben Cheng655a7c02013-10-16 16:09:24 -0700155};
Christopher Ferris82d75042015-01-26 10:57:07 -0800156enum drm_exynos_ipp_buf_type {
Tao Baod7db5942015-01-28 10:07:51 -0800157 IPP_BUF_ENQUEUE,
Tao Baod7db5942015-01-28 10:07:51 -0800158 IPP_BUF_DEQUEUE,
Ben Cheng655a7c02013-10-16 16:09:24 -0700159};
Christopher Ferris82d75042015-01-26 10:57:07 -0800160struct drm_exynos_ipp_queue_buf {
Christopher Ferris106b3a82016-08-24 12:15:38 -0700161 __u32 ops_id;
162 __u32 buf_type;
Tao Baod7db5942015-01-28 10:07:51 -0800163 __u32 prop_id;
164 __u32 buf_id;
165 __u32 handle[EXYNOS_DRM_PLANAR_MAX];
Tao Baod7db5942015-01-28 10:07:51 -0800166 __u32 reserved;
167 __u64 user_data;
Christopher Ferris82d75042015-01-26 10:57:07 -0800168};
Ben Cheng655a7c02013-10-16 16:09:24 -0700169enum drm_exynos_ipp_ctrl {
Tao Baod7db5942015-01-28 10:07:51 -0800170 IPP_CTRL_PLAY,
171 IPP_CTRL_STOP,
172 IPP_CTRL_PAUSE,
173 IPP_CTRL_RESUME,
Tao Baod7db5942015-01-28 10:07:51 -0800174 IPP_CTRL_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700175};
Christopher Ferris82d75042015-01-26 10:57:07 -0800176struct drm_exynos_ipp_cmd_ctrl {
Tao Baod7db5942015-01-28 10:07:51 -0800177 __u32 prop_id;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700178 __u32 ctrl;
Tao Baod7db5942015-01-28 10:07:51 -0800179};
Christopher Ferris82d75042015-01-26 10:57:07 -0800180#define DRM_EXYNOS_GEM_CREATE 0x00
Christopher Ferris106b3a82016-08-24 12:15:38 -0700181#define DRM_EXYNOS_GEM_MAP 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -0700182#define DRM_EXYNOS_GEM_GET 0x04
183#define DRM_EXYNOS_VIDI_CONNECTION 0x07
Ben Cheng655a7c02013-10-16 16:09:24 -0700184#define DRM_EXYNOS_G2D_GET_VER 0x20
185#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21
186#define DRM_EXYNOS_G2D_EXEC 0x22
187#define DRM_EXYNOS_IPP_GET_PROPERTY 0x30
Ben Cheng655a7c02013-10-16 16:09:24 -0700188#define DRM_EXYNOS_IPP_SET_PROPERTY 0x31
189#define DRM_EXYNOS_IPP_QUEUE_BUF 0x32
190#define DRM_EXYNOS_IPP_CMD_CTRL 0x33
Tao Baod7db5942015-01-28 10:07:51 -0800191#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 -0700192#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 -0800193#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
194#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 -0700195#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 -0800196#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist)
197#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec)
198#define DRM_IOCTL_EXYNOS_IPP_GET_PROPERTY DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_PROPERTY, struct drm_exynos_ipp_prop_list)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700199#define DRM_IOCTL_EXYNOS_IPP_SET_PROPERTY DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_SET_PROPERTY, struct drm_exynos_ipp_property)
Tao Baod7db5942015-01-28 10:07:51 -0800200#define DRM_IOCTL_EXYNOS_IPP_QUEUE_BUF DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_QUEUE_BUF, struct drm_exynos_ipp_queue_buf)
201#define DRM_IOCTL_EXYNOS_IPP_CMD_CTRL DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_CMD_CTRL, struct drm_exynos_ipp_cmd_ctrl)
Christopher Ferris82d75042015-01-26 10:57:07 -0800202#define DRM_EXYNOS_G2D_EVENT 0x80000000
Christopher Ferris106b3a82016-08-24 12:15:38 -0700203#define DRM_EXYNOS_IPP_EVENT 0x80000001
Ben Cheng655a7c02013-10-16 16:09:24 -0700204struct drm_exynos_g2d_event {
Tao Baod7db5942015-01-28 10:07:51 -0800205 struct drm_event base;
206 __u64 user_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700207 __u32 tv_sec;
Tao Baod7db5942015-01-28 10:07:51 -0800208 __u32 tv_usec;
209 __u32 cmdlist_no;
210 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700211};
Ben Cheng655a7c02013-10-16 16:09:24 -0700212struct drm_exynos_ipp_event {
Tao Baod7db5942015-01-28 10:07:51 -0800213 struct drm_event base;
214 __u64 user_data;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700215 __u32 tv_sec;
Tao Baod7db5942015-01-28 10:07:51 -0800216 __u32 tv_usec;
217 __u32 prop_id;
218 __u32 reserved;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700219 __u32 buf_id[EXYNOS_DRM_OPS_MAX];
Ben Cheng655a7c02013-10-16 16:09:24 -0700220};
Christopher Ferris106b3a82016-08-24 12:15:38 -0700221#ifdef __cplusplus
222#endif
Ben Cheng655a7c02013-10-16 16:09:24 -0700223#endif