1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#ifndef _UAPI_EXYNOS_DRM_H_
17#define _UAPI_EXYNOS_DRM_H_
18
19#include "drm.h"
20
21#if defined(__cplusplus)
22extern "C" {
23#endif
24
25
26
27
28
29
30
31
32
33
34struct drm_exynos_gem_create {
35 __u64 size;
36 __u32 flags;
37 __u32 handle;
38};
39
40
41
42
43
44
45
46
47struct drm_exynos_gem_map {
48 __u32 handle;
49 __u32 reserved;
50 __u64 offset;
51};
52
53
54
55
56
57
58
59
60
61
62struct drm_exynos_gem_info {
63 __u32 handle;
64 __u32 flags;
65 __u64 size;
66};
67
68
69
70
71
72
73
74
75
76struct drm_exynos_vidi_connection {
77 __u32 connection;
78 __u32 extensions;
79 __u64 edid;
80};
81
82
83enum e_drm_exynos_gem_mem_type {
84
85 EXYNOS_BO_CONTIG = 0 << 0,
86
87 EXYNOS_BO_NONCONTIG = 1 << 0,
88
89 EXYNOS_BO_NONCACHABLE = 0 << 1,
90
91 EXYNOS_BO_CACHABLE = 1 << 1,
92
93 EXYNOS_BO_WC = 1 << 2,
94 EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE |
95 EXYNOS_BO_WC
96};
97
98struct drm_exynos_g2d_get_ver {
99 __u32 major;
100 __u32 minor;
101};
102
103struct drm_exynos_g2d_cmd {
104 __u32 offset;
105 __u32 data;
106};
107
108enum drm_exynos_g2d_buf_type {
109 G2D_BUF_USERPTR = 1 << 31,
110};
111
112enum drm_exynos_g2d_event_type {
113 G2D_EVENT_NOT,
114 G2D_EVENT_NONSTOP,
115 G2D_EVENT_STOP,
116};
117
118struct drm_exynos_g2d_userptr {
119 unsigned long userptr;
120 unsigned long size;
121};
122
123struct drm_exynos_g2d_set_cmdlist {
124 __u64 cmd;
125 __u64 cmd_buf;
126 __u32 cmd_nr;
127 __u32 cmd_buf_nr;
128
129
130 __u64 event_type;
131 __u64 user_data;
132};
133
134struct drm_exynos_g2d_exec {
135 __u64 async;
136};
137
138#define DRM_EXYNOS_GEM_CREATE 0x00
139#define DRM_EXYNOS_GEM_MAP 0x01
140
141#define DRM_EXYNOS_GEM_GET 0x04
142#define DRM_EXYNOS_VIDI_CONNECTION 0x07
143
144
145#define DRM_EXYNOS_G2D_GET_VER 0x20
146#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21
147#define DRM_EXYNOS_G2D_EXEC 0x22
148
149
150
151#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \
152 DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
153#define DRM_IOCTL_EXYNOS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + \
154 DRM_EXYNOS_GEM_MAP, struct drm_exynos_gem_map)
155#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \
156 DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
157
158#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION DRM_IOWR(DRM_COMMAND_BASE + \
159 DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection)
160
161#define DRM_IOCTL_EXYNOS_G2D_GET_VER DRM_IOWR(DRM_COMMAND_BASE + \
162 DRM_EXYNOS_G2D_GET_VER, struct drm_exynos_g2d_get_ver)
163#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + \
164 DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist)
165#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + \
166 DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec)
167
168
169#define DRM_EXYNOS_G2D_EVENT 0x80000000
170
171struct drm_exynos_g2d_event {
172 struct drm_event base;
173 __u64 user_data;
174 __u32 tv_sec;
175 __u32 tv_usec;
176 __u32 cmdlist_no;
177 __u32 reserved;
178};
179
180#if defined(__cplusplus)
181}
182#endif
183
184#endif
185