diff options
Diffstat (limited to 'include/drm/nouveau_drm.h')
-rw-r--r-- | include/drm/nouveau_drm.h | 94 |
1 files changed, 52 insertions, 42 deletions
diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h index 1372f533..91d2f314 100644 --- a/include/drm/nouveau_drm.h +++ b/include/drm/nouveau_drm.h | |||
@@ -27,6 +27,12 @@ | |||
27 | 27 | ||
28 | #define NOUVEAU_DRM_HEADER_PATCHLEVEL 16 | 28 | #define NOUVEAU_DRM_HEADER_PATCHLEVEL 16 |
29 | 29 | ||
30 | #include "drm.h" | ||
31 | |||
32 | #if defined(__cplusplus) | ||
33 | extern "C" { | ||
34 | #endif | ||
35 | |||
30 | /* reserved object handles when using deprecated object APIs - these | 36 | /* reserved object handles when using deprecated object APIs - these |
31 | * are here so that libdrm can allow interoperability with the new | 37 | * are here so that libdrm can allow interoperability with the new |
32 | * object APIs | 38 | * object APIs |
@@ -106,6 +112,7 @@ struct drm_nouveau_setparam { | |||
106 | #define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) | 112 | #define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) |
107 | #define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4) | 113 | #define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4) |
108 | 114 | ||
115 | #define NOUVEAU_GEM_TILE_COMP 0x00030000 /* nv50-only */ | ||
109 | #define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 | 116 | #define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 |
110 | #define NOUVEAU_GEM_TILE_16BPP 0x00000001 | 117 | #define NOUVEAU_GEM_TILE_16BPP 0x00000001 |
111 | #define NOUVEAU_GEM_TILE_32BPP 0x00000002 | 118 | #define NOUVEAU_GEM_TILE_32BPP 0x00000002 |
@@ -113,13 +120,13 @@ struct drm_nouveau_setparam { | |||
113 | #define NOUVEAU_GEM_TILE_NONCONTIG 0x00000008 | 120 | #define NOUVEAU_GEM_TILE_NONCONTIG 0x00000008 |
114 | 121 | ||
115 | struct drm_nouveau_gem_info { | 122 | struct drm_nouveau_gem_info { |
116 | uint32_t handle; | 123 | __u32 handle; |
117 | uint32_t domain; | 124 | __u32 domain; |
118 | uint64_t size; | 125 | __u64 size; |
119 | uint64_t offset; | 126 | __u64 offset; |
120 | uint64_t map_handle; | 127 | __u64 map_handle; |
121 | uint32_t tile_mode; | 128 | __u32 tile_mode; |
122 | uint32_t tile_flags; | 129 | __u32 tile_flags; |
123 | }; | 130 | }; |
124 | 131 | ||
125 | struct drm_nouveau_gem_set_tiling { | 132 | struct drm_nouveau_gem_set_tiling { |
@@ -130,23 +137,23 @@ struct drm_nouveau_gem_set_tiling { | |||
130 | 137 | ||
131 | struct drm_nouveau_gem_new { | 138 | struct drm_nouveau_gem_new { |
132 | struct drm_nouveau_gem_info info; | 139 | struct drm_nouveau_gem_info info; |
133 | uint32_t channel_hint; | 140 | __u32 channel_hint; |
134 | uint32_t align; | 141 | __u32 align; |
135 | }; | 142 | }; |
136 | 143 | ||
137 | #define NOUVEAU_GEM_MAX_BUFFERS 1024 | 144 | #define NOUVEAU_GEM_MAX_BUFFERS 1024 |
138 | struct drm_nouveau_gem_pushbuf_bo_presumed { | 145 | struct drm_nouveau_gem_pushbuf_bo_presumed { |
139 | uint32_t valid; | 146 | __u32 valid; |
140 | uint32_t domain; | 147 | __u32 domain; |
141 | uint64_t offset; | 148 | __u64 offset; |
142 | }; | 149 | }; |
143 | 150 | ||
144 | struct drm_nouveau_gem_pushbuf_bo { | 151 | struct drm_nouveau_gem_pushbuf_bo { |
145 | uint64_t user_priv; | 152 | __u64 user_priv; |
146 | uint32_t handle; | 153 | __u32 handle; |
147 | uint32_t read_domains; | 154 | __u32 read_domains; |
148 | uint32_t write_domains; | 155 | __u32 write_domains; |
149 | uint32_t valid_domains; | 156 | __u32 valid_domains; |
150 | struct drm_nouveau_gem_pushbuf_bo_presumed presumed; | 157 | struct drm_nouveau_gem_pushbuf_bo_presumed presumed; |
151 | }; | 158 | }; |
152 | 159 | ||
@@ -155,35 +162,35 @@ struct drm_nouveau_gem_pushbuf_bo { | |||
155 | #define NOUVEAU_GEM_RELOC_OR (1 << 2) | 162 | #define NOUVEAU_GEM_RELOC_OR (1 << 2) |
156 | #define NOUVEAU_GEM_MAX_RELOCS 1024 | 163 | #define NOUVEAU_GEM_MAX_RELOCS 1024 |
157 | struct drm_nouveau_gem_pushbuf_reloc { | 164 | struct drm_nouveau_gem_pushbuf_reloc { |
158 | uint32_t reloc_bo_index; | 165 | __u32 reloc_bo_index; |
159 | uint32_t reloc_bo_offset; | 166 | __u32 reloc_bo_offset; |
160 | uint32_t bo_index; | 167 | __u32 bo_index; |
161 | uint32_t flags; | 168 | __u32 flags; |
162 | uint32_t data; | 169 | __u32 data; |
163 | uint32_t vor; | 170 | __u32 vor; |
164 | uint32_t tor; | 171 | __u32 tor; |
165 | }; | 172 | }; |
166 | 173 | ||
167 | #define NOUVEAU_GEM_MAX_PUSH 512 | 174 | #define NOUVEAU_GEM_MAX_PUSH 512 |
168 | struct drm_nouveau_gem_pushbuf_push { | 175 | struct drm_nouveau_gem_pushbuf_push { |
169 | uint32_t bo_index; | 176 | __u32 bo_index; |
170 | uint32_t pad; | 177 | __u32 pad; |
171 | uint64_t offset; | 178 | __u64 offset; |
172 | uint64_t length; | 179 | __u64 length; |
173 | }; | 180 | }; |
174 | 181 | ||
175 | struct drm_nouveau_gem_pushbuf { | 182 | struct drm_nouveau_gem_pushbuf { |
176 | uint32_t channel; | 183 | __u32 channel; |
177 | uint32_t nr_buffers; | 184 | __u32 nr_buffers; |
178 | uint64_t buffers; | 185 | __u64 buffers; |
179 | uint32_t nr_relocs; | 186 | __u32 nr_relocs; |
180 | uint32_t nr_push; | 187 | __u32 nr_push; |
181 | uint64_t relocs; | 188 | __u64 relocs; |
182 | uint64_t push; | 189 | __u64 push; |
183 | uint32_t suffix0; | 190 | __u32 suffix0; |
184 | uint32_t suffix1; | 191 | __u32 suffix1; |
185 | uint64_t vram_available; | 192 | __u64 vram_available; |
186 | uint64_t gart_available; | 193 | __u64 gart_available; |
187 | }; | 194 | }; |
188 | 195 | ||
189 | #define NOUVEAU_GEM_PUSHBUF_2_FENCE_WAIT 0x00000001 | 196 | #define NOUVEAU_GEM_PUSHBUF_2_FENCE_WAIT 0x00000001 |
@@ -205,12 +212,12 @@ struct drm_nouveau_gem_pushbuf_2 { | |||
205 | #define NOUVEAU_GEM_CPU_PREP_NOBLOCK 0x00000002 | 212 | #define NOUVEAU_GEM_CPU_PREP_NOBLOCK 0x00000002 |
206 | #define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 | 213 | #define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 |
207 | struct drm_nouveau_gem_cpu_prep { | 214 | struct drm_nouveau_gem_cpu_prep { |
208 | uint32_t handle; | 215 | __u32 handle; |
209 | uint32_t flags; | 216 | __u32 flags; |
210 | }; | 217 | }; |
211 | 218 | ||
212 | struct drm_nouveau_gem_cpu_fini { | 219 | struct drm_nouveau_gem_cpu_fini { |
213 | uint32_t handle; | 220 | __u32 handle; |
214 | }; | 221 | }; |
215 | 222 | ||
216 | #define NOUVEAU_GEM_AS_SPARSE 0x00000001 | 223 | #define NOUVEAU_GEM_AS_SPARSE 0x00000001 |
@@ -287,4 +294,7 @@ struct drm_nouveau_gem_unmap { | |||
287 | #define DRM_NOUVEAU_GEM_MAP 0x56 | 294 | #define DRM_NOUVEAU_GEM_MAP 0x56 |
288 | #define DRM_NOUVEAU_GEM_UNMAP 0x57 | 295 | #define DRM_NOUVEAU_GEM_UNMAP 0x57 |
289 | 296 | ||
297 | #if defined(__cplusplus) | ||
298 | } | ||
299 | #endif | ||
290 | #endif /* __NOUVEAU_DRM_H__ */ | 300 | #endif /* __NOUVEAU_DRM_H__ */ |