1 /****************************************************************************
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 VIRTGPU_DRM_H
20 #define VIRTGPU_DRM_H
21 #include "drm.h"
22 #ifdef __cplusplus
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #endif
25 #define DRM_VIRTGPU_MAP 0x01
26 #define DRM_VIRTGPU_EXECBUFFER 0x02
27 #define DRM_VIRTGPU_GETPARAM 0x03
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define DRM_VIRTGPU_RESOURCE_CREATE 0x04
30 #define DRM_VIRTGPU_RESOURCE_INFO 0x05
31 #define DRM_VIRTGPU_TRANSFER_FROM_HOST 0x06
32 #define DRM_VIRTGPU_TRANSFER_TO_HOST 0x07
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define DRM_VIRTGPU_WAIT 0x08
35 #define DRM_VIRTGPU_GET_CAPS 0x09
36 struct drm_virtgpu_map {
37   __u64 offset;
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39   __u32 handle;
40   __u32 pad;
41 };
42 struct drm_virtgpu_execbuffer {
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44   __u32 flags;
45   __u32 size;
46   __u64 command;
47   __u64 bo_handles;
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49   __u32 num_bo_handles;
50   __u32 pad;
51 };
52 #define VIRTGPU_PARAM_3D_FEATURES 1
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 struct drm_virtgpu_getparam {
55   __u64 param;
56   __u64 value;
57 };
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 struct drm_virtgpu_resource_create {
60   __u32 target;
61   __u32 format;
62   __u32 bind;
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64   __u32 width;
65   __u32 height;
66   __u32 depth;
67   __u32 array_size;
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69   __u32 last_level;
70   __u32 nr_samples;
71   __u32 flags;
72   __u32 bo_handle;
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74   __u32 res_handle;
75   __u32 size;
76   __u32 stride;
77 };
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79 struct drm_virtgpu_resource_info {
80   __u32 bo_handle;
81   __u32 res_handle;
82   __u32 size;
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84   __u32 stride;
85 };
86 struct drm_virtgpu_3d_box {
87   __u32 x;
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89   __u32 y;
90   __u32 z;
91   __u32 w;
92   __u32 h;
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94   __u32 d;
95 };
96 struct drm_virtgpu_3d_transfer_to_host {
97   __u32 bo_handle;
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99   struct drm_virtgpu_3d_box box;
100   __u32 level;
101   __u32 offset;
102 };
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 struct drm_virtgpu_3d_transfer_from_host {
105   __u32 bo_handle;
106   struct drm_virtgpu_3d_box box;
107   __u32 level;
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109   __u32 offset;
110 };
111 #define VIRTGPU_WAIT_NOWAIT 1
112 struct drm_virtgpu_3d_wait {
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114   __u32 handle;
115   __u32 flags;
116 };
117 struct drm_virtgpu_get_caps {
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119   __u32 cap_set_id;
120   __u32 cap_set_ver;
121   __u64 addr;
122   __u32 size;
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124   __u32 pad;
125 };
126 #define DRM_IOCTL_VIRTGPU_MAP DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map)
127 #define DRM_IOCTL_VIRTGPU_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER, struct drm_virtgpu_execbuffer)
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129 #define DRM_IOCTL_VIRTGPU_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GETPARAM, struct drm_virtgpu_getparam)
130 #define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_CREATE, struct drm_virtgpu_resource_create)
131 #define DRM_IOCTL_VIRTGPU_RESOURCE_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_INFO, struct drm_virtgpu_resource_info)
132 #define DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_FROM_HOST, struct drm_virtgpu_3d_transfer_from_host)
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134 #define DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_TO_HOST, struct drm_virtgpu_3d_transfer_to_host)
135 #define DRM_IOCTL_VIRTGPU_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_WAIT, struct drm_virtgpu_3d_wait)
136 #define DRM_IOCTL_VIRTGPU_GET_CAPS DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GET_CAPS, struct drm_virtgpu_get_caps)
137 #ifdef __cplusplus
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 #endif
140 #endif
141