VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/7.0/xorg/xf86drmCompat.h@ 18709

Last change on this file since 18709 was 17236, checked in by vboxsync, 16 years ago

Additions/x11/x11include: blast! Reverted r43555 and r43556

  • Property svn:eol-style set to native
File size: 8.6 KB
Line 
1/* xf86drmCompat.h -- OS-independent header for old device specific DRM user-level
2 * library interface
3 *
4 * Copyright 2000 VA Linux Systems, Inc., Fremont, California.
5 * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
6 * All Rights Reserved.
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice (including the next
16 * paragraph) shall be included in all copies or substantial portions of the
17 * Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 * DEALINGS IN THE SOFTWARE.
26 *
27 * Authors:
28 * Gareth Hughes <[email protected]>
29 * Kevin E. Martin <[email protected]>
30 * Keith Whitwell <[email protected]>
31 *
32 * Backwards compatability modules broken out by:
33 * Jens Owen <[email protected]>
34 *
35 * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/xf86drmCompat.h,v 1.1 2002/10/30 12:52:23 alanh Exp $
36 *
37 */
38
39#ifndef _XF86DRI_COMPAT_H_
40#define _XF86DRI_COMPAT_H_
41
42/* WARNING: Do not change, or add, anything to this file. It is only provided
43 * for binary backwards compatability with the old driver specific DRM
44 * extensions used before XFree86 4.3.
45 */
46
47#ifndef __user
48#define __user
49#endif
50
51/* I810 */
52
53typedef struct {
54 unsigned int start;
55 unsigned int end;
56 unsigned int size;
57 unsigned int mmio_offset;
58 unsigned int buffers_offset;
59 int sarea_off;
60
61 unsigned int front_offset;
62 unsigned int back_offset;
63 unsigned int depth_offset;
64 unsigned int overlay_offset;
65 unsigned int overlay_physical;
66 unsigned int w;
67 unsigned int h;
68 unsigned int pitch;
69 unsigned int pitch_bits;
70} drmCompatI810Init;
71
72extern Bool drmI810CleanupDma(int driSubFD);
73extern Bool drmI810InitDma(int driSubFD, drmCompatI810Init *info );
74
75/* Mga */
76
77typedef struct {
78 unsigned long sarea_priv_offset;
79 int chipset;
80 int sgram;
81 unsigned int maccess;
82 unsigned int fb_cpp;
83 unsigned int front_offset, front_pitch;
84 unsigned int back_offset, back_pitch;
85 unsigned int depth_cpp;
86 unsigned int depth_offset, depth_pitch;
87 unsigned int texture_offset[2];
88 unsigned int texture_size[2];
89 unsigned long fb_offset;
90 unsigned long mmio_offset;
91 unsigned long status_offset;
92 unsigned long warp_offset;
93 unsigned long primary_offset;
94 unsigned long buffers_offset;
95} drmCompatMGAInit;
96
97extern int drmMGAInitDMA( int fd, drmCompatMGAInit *info );
98extern int drmMGACleanupDMA( int fd );
99extern int drmMGAFlushDMA( int fd, drmLockFlags flags );
100extern int drmMGAEngineReset( int fd );
101extern int drmMGAFullScreen( int fd, int enable );
102extern int drmMGASwapBuffers( int fd );
103extern int drmMGAClear( int fd, unsigned int flags,
104 unsigned int clear_color, unsigned int clear_depth,
105 unsigned int color_mask, unsigned int depth_mask );
106extern int drmMGAFlushVertexBuffer( int fd, int indx, int used, int discard );
107extern int drmMGAFlushIndices( int fd, int indx,
108 int start, int end, int discard );
109extern int drmMGATextureLoad( int fd, int indx,
110 unsigned int dstorg, unsigned int length );
111extern int drmMGAAgpBlit( int fd, unsigned int planemask,
112 unsigned int src, int src_pitch,
113 unsigned int dst, int dst_pitch,
114 int delta_sx, int delta_sy,
115 int delta_dx, int delta_dy,
116 int height, int ydir );
117
118/* R128 */
119
120typedef struct {
121 unsigned long sarea_priv_offset;
122 int is_pci;
123 int cce_mode;
124 int cce_secure;
125 int ring_size;
126 int usec_timeout;
127 unsigned int fb_bpp;
128 unsigned int front_offset, front_pitch;
129 unsigned int back_offset, back_pitch;
130 unsigned int depth_bpp;
131 unsigned int depth_offset, depth_pitch;
132 unsigned int span_offset;
133 unsigned long fb_offset;
134 unsigned long mmio_offset;
135 unsigned long ring_offset;
136 unsigned long ring_rptr_offset;
137 unsigned long buffers_offset;
138 unsigned long agp_textures_offset;
139} drmCompatR128Init;
140
141extern int drmR128InitCCE( int fd, drmCompatR128Init *info );
142extern int drmR128CleanupCCE( int fd );
143extern int drmR128StartCCE( int fd );
144extern int drmR128StopCCE( int fd );
145extern int drmR128ResetCCE( int fd );
146extern int drmR128WaitForIdleCCE( int fd );
147extern int drmR128EngineReset( int fd );
148extern int drmR128FullScreen( int fd, int enable );
149extern int drmR128SwapBuffers( int fd );
150extern int drmR128Clear( int fd, unsigned int flags,
151 unsigned int clear_color, unsigned int clear_depth,
152 unsigned int color_mask, unsigned int depth_mask );
153extern int drmR128FlushVertexBuffer( int fd, int prim, int indx,
154 int count, int discard );
155extern int drmR128FlushIndices( int fd, int prim, int indx,
156 int start, int end, int discard );
157extern int drmR128TextureBlit( int fd, int indx,
158 int offset, int pitch, int format,
159 int x, int y, int width, int height );
160extern int drmR128WriteDepthSpan( int fd, int n, int x, int y,
161 const unsigned int depth[],
162 const unsigned char mask[] );
163extern int drmR128WriteDepthPixels( int fd, int n,
164 const int x[], const int y[],
165 const unsigned int depth[],
166 const unsigned char mask[] );
167extern int drmR128ReadDepthSpan( int fd, int n, int x, int y );
168extern int drmR128ReadDepthPixels( int fd, int n,
169 const int x[], const int y[] );
170extern int drmR128PolygonStipple( int fd, unsigned int *mask );
171extern int drmR128FlushIndirectBuffer( int fd, int indx,
172 int start, int end, int discard );
173
174/* Radeon */
175
176typedef struct {
177 unsigned long sarea_priv_offset;
178 int is_pci;
179 int cp_mode;
180 int agp_size;
181 int ring_size;
182 int usec_timeout;
183
184 unsigned int fb_bpp;
185 unsigned int front_offset, front_pitch;
186 unsigned int back_offset, back_pitch;
187 unsigned int depth_bpp;
188 unsigned int depth_offset, depth_pitch;
189
190 unsigned long fb_offset;
191 unsigned long mmio_offset;
192 unsigned long ring_offset;
193 unsigned long ring_rptr_offset;
194 unsigned long buffers_offset;
195 unsigned long agp_textures_offset;
196} drmCompatRadeonInit;
197
198typedef struct {
199 unsigned int x;
200 unsigned int y;
201 unsigned int width;
202 unsigned int height;
203 void *data;
204} drmCompatRadeonTexImage;
205
206extern int drmRadeonInitCP( int fd, drmCompatRadeonInit *info );
207extern int drmRadeonCleanupCP( int fd );
208extern int drmRadeonStartCP( int fd );
209extern int drmRadeonStopCP( int fd );
210extern int drmRadeonResetCP( int fd );
211extern int drmRadeonWaitForIdleCP( int fd );
212extern int drmRadeonEngineReset( int fd );
213extern int drmRadeonFullScreen( int fd, int enable );
214extern int drmRadeonSwapBuffers( int fd );
215extern int drmRadeonClear( int fd, unsigned int flags,
216 unsigned int clear_color, unsigned int clear_depth,
217 unsigned int color_mask, unsigned int stencil,
218 void *boxes, int nbox );
219extern int drmRadeonFlushVertexBuffer( int fd, int prim, int indx,
220 int count, int discard );
221extern int drmRadeonFlushIndices( int fd, int prim, int indx,
222 int start, int end, int discard );
223extern int drmRadeonLoadTexture( int fd, int offset, int pitch, int format,
224 int width, int height,
225 drmCompatRadeonTexImage *image );
226extern int drmRadeonPolygonStipple( int fd, unsigned int *mask );
227extern int drmRadeonFlushIndirectBuffer( int fd, int indx,
228 int start, int end, int discard );
229
230/* SiS */
231extern Bool drmSiSAgpInit(int driSubFD, int offset, int size);
232
233/* I830 */
234typedef struct {
235 unsigned int start;
236 unsigned int end;
237 unsigned int size;
238 unsigned int mmio_offset;
239 unsigned int buffers_offset;
240 int sarea_off;
241 unsigned int front_offset;
242 unsigned int back_offset;
243 unsigned int depth_offset;
244 unsigned int w;
245 unsigned int h;
246 unsigned int pitch;
247 unsigned int pitch_bits;
248 unsigned int cpp;
249} drmCompatI830Init;
250
251extern Bool drmI830CleanupDma(int driSubFD);
252extern Bool drmI830InitDma(int driSubFD, drmCompatI830Init *info );
253
254#endif
255
256/* WARNING: Do not change, or add, anything to this file. It is only provided
257 * for binary backwards compatability with the old driver specific DRM
258 * extensions used before XFree86 4.3.
259 */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette