6 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
8 * Stanislav Vorobiov <s.vorobiov@samsung.com>
10 * Permission is hereby granted, free of charge, to any person obtaining a
11 * copy of this software and associated documentation files (the "Software"),
12 * to deal in the Software without restriction, including without limitation
13 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 * and/or sell copies of the Software, and to permit persons to whom the
15 * Software is furnished to do so, subject to the following conditions:
17 * The above copyright notice and this permission notice (including the next
18 * paragraph) shall be included in all copies or substantial portions of the
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
25 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
26 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 * OTHER DEALINGS IN THE SOFTWARE.
34 * Bump this whenever driver interface changes.
36 #define DRM_VIGS_DRIVER_VERSION 14
39 * Surface access flags.
41 #define DRM_VIGS_SAF_READ 1
42 #define DRM_VIGS_SAF_WRITE 2
43 #define DRM_VIGS_SAF_MASK 3
46 * Number of DP framebuffers.
48 #define DRM_VIGS_NUM_DP_FB_BUF 4
53 #define DRM_VIGS_DP_FB_Y 2
54 #define DRM_VIGS_DP_FB_C 3
56 struct drm_vigs_get_protocol_version
61 struct drm_vigs_create_surface
73 struct drm_vigs_create_execbuffer
79 struct drm_vigs_gem_map
83 unsigned long address;
86 struct drm_vigs_gem_wait
91 struct drm_vigs_surface_info
108 struct drm_vigs_surface_set_gpu_dirty
113 struct drm_vigs_surface_start_access
115 unsigned long address;
119 struct drm_vigs_surface_end_access
121 unsigned long address;
125 struct drm_vigs_surface_convert
134 struct drm_vigs_create_fence
141 struct drm_vigs_fence_wait
146 struct drm_vigs_fence_signaled
152 struct drm_vigs_fence_unref
157 struct drm_vigs_plane_set_zpos
163 struct drm_vigs_plane_set_transform
171 struct drm_vigs_dp_create_surface
175 uint32_t dp_mem_flag;
185 struct drm_vigs_dp_open_surface
189 uint32_t dp_mem_flag;
193 #define DRM_VIGS_GET_PROTOCOL_VERSION 0x00
194 #define DRM_VIGS_CREATE_SURFACE 0x01
195 #define DRM_VIGS_CREATE_EXECBUFFER 0x02
196 #define DRM_VIGS_GEM_MAP 0x03
197 #define DRM_VIGS_GEM_WAIT 0x04
198 #define DRM_VIGS_SURFACE_INFO 0x05
199 #define DRM_VIGS_EXEC 0x06
200 #define DRM_VIGS_SURFACE_SET_GPU_DIRTY 0x07
201 #define DRM_VIGS_SURFACE_START_ACCESS 0x08
202 #define DRM_VIGS_SURFACE_END_ACCESS 0x09
203 #define DRM_VIGS_CREATE_FENCE 0x0A
204 #define DRM_VIGS_FENCE_WAIT 0x0B
205 #define DRM_VIGS_FENCE_SIGNALED 0x0C
206 #define DRM_VIGS_FENCE_UNREF 0x0D
207 #define DRM_VIGS_PLANE_SET_ZPOS 0x0E
208 #define DRM_VIGS_PLANE_SET_TRANSFORM 0x0F
210 #define DRM_VIGS_DP_CREATE_SURFACE 0x20
211 #define DRM_VIGS_DP_OPEN_SURFACE 0x21
213 #define DRM_VIGS_SURFACE_CONVERT 0x22
215 #define DRM_IOCTL_VIGS_GET_PROTOCOL_VERSION DRM_IOR(DRM_COMMAND_BASE + \
216 DRM_VIGS_GET_PROTOCOL_VERSION, struct drm_vigs_get_protocol_version)
217 #define DRM_IOCTL_VIGS_CREATE_SURFACE DRM_IOWR(DRM_COMMAND_BASE + \
218 DRM_VIGS_CREATE_SURFACE, struct drm_vigs_create_surface)
219 #define DRM_IOCTL_VIGS_CREATE_EXECBUFFER DRM_IOWR(DRM_COMMAND_BASE + \
220 DRM_VIGS_CREATE_EXECBUFFER, struct drm_vigs_create_execbuffer)
221 #define DRM_IOCTL_VIGS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + \
222 DRM_VIGS_GEM_MAP, struct drm_vigs_gem_map)
223 #define DRM_IOCTL_VIGS_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + \
224 DRM_VIGS_GEM_WAIT, struct drm_vigs_gem_wait)
225 #define DRM_IOCTL_VIGS_SURFACE_INFO DRM_IOWR(DRM_COMMAND_BASE + \
226 DRM_VIGS_SURFACE_INFO, struct drm_vigs_surface_info)
227 #define DRM_IOCTL_VIGS_EXEC DRM_IOW(DRM_COMMAND_BASE + \
228 DRM_VIGS_EXEC, struct drm_vigs_exec)
229 #define DRM_IOCTL_VIGS_SURFACE_SET_GPU_DIRTY DRM_IOW(DRM_COMMAND_BASE + \
230 DRM_VIGS_SURFACE_SET_GPU_DIRTY, struct drm_vigs_surface_set_gpu_dirty)
231 #define DRM_IOCTL_VIGS_SURFACE_START_ACCESS DRM_IOW(DRM_COMMAND_BASE + \
232 DRM_VIGS_SURFACE_START_ACCESS, struct drm_vigs_surface_start_access)
233 #define DRM_IOCTL_VIGS_SURFACE_END_ACCESS DRM_IOW(DRM_COMMAND_BASE + \
234 DRM_VIGS_SURFACE_END_ACCESS, struct drm_vigs_surface_end_access)
235 #define DRM_IOCTL_VIGS_SURFACE_CONVERT DRM_IOW(DRM_COMMAND_BASE + \
236 DRM_VIGS_SURFACE_CONVERT, struct drm_vigs_surface_convert)
237 #define DRM_IOCTL_VIGS_CREATE_FENCE DRM_IOWR(DRM_COMMAND_BASE + \
238 DRM_VIGS_CREATE_FENCE, struct drm_vigs_create_fence)
239 #define DRM_IOCTL_VIGS_FENCE_WAIT DRM_IOW(DRM_COMMAND_BASE + \
240 DRM_VIGS_FENCE_WAIT, struct drm_vigs_fence_wait)
241 #define DRM_IOCTL_VIGS_FENCE_SIGNALED DRM_IOWR(DRM_COMMAND_BASE + \
242 DRM_VIGS_FENCE_SIGNALED, struct drm_vigs_fence_signaled)
243 #define DRM_IOCTL_VIGS_FENCE_UNREF DRM_IOW(DRM_COMMAND_BASE + \
244 DRM_VIGS_FENCE_UNREF, struct drm_vigs_fence_unref)
245 #define DRM_IOCTL_VIGS_PLANE_SET_ZPOS DRM_IOW(DRM_COMMAND_BASE + \
246 DRM_VIGS_PLANE_SET_ZPOS, struct drm_vigs_plane_set_zpos)
247 #define DRM_IOCTL_VIGS_PLANE_SET_TRANSFORM DRM_IOW(DRM_COMMAND_BASE + \
248 DRM_VIGS_PLANE_SET_TRANSFORM, struct drm_vigs_plane_set_transform)
250 #define DRM_IOCTL_VIGS_DP_CREATE_SURFACE DRM_IOWR(DRM_COMMAND_BASE + \
251 DRM_VIGS_DP_CREATE_SURFACE, struct drm_vigs_dp_create_surface)
252 #define DRM_IOCTL_VIGS_DP_OPEN_SURFACE DRM_IOWR(DRM_COMMAND_BASE + \
253 DRM_VIGS_DP_OPEN_SURFACE, struct drm_vigs_dp_open_surface)