VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/xf86drmCompat.h@ 97956

最後變更 在這個檔案從97956是 69098,由 vboxsync 提交於 7 年 前

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • 屬性 svn:eol-style 設為 native
檔案大小: 8.6 KB
 
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/* I810 */
48
49typedef struct {
50 unsigned int start;
51 unsigned int end;
52 unsigned int size;
53 unsigned int mmio_offset;
54 unsigned int buffers_offset;
55 int sarea_off;
56
57 unsigned int front_offset;
58 unsigned int back_offset;
59 unsigned int depth_offset;
60 unsigned int overlay_offset;
61 unsigned int overlay_physical;
62 unsigned int w;
63 unsigned int h;
64 unsigned int pitch;
65 unsigned int pitch_bits;
66} drmCompatI810Init;
67
68extern Bool drmI810CleanupDma(int driSubFD);
69extern Bool drmI810InitDma(int driSubFD, drmCompatI810Init *info );
70
71/* Mga */
72
73typedef struct {
74 unsigned long sarea_priv_offset;
75 int chipset;
76 int sgram;
77 unsigned int maccess;
78 unsigned int fb_cpp;
79 unsigned int front_offset, front_pitch;
80 unsigned int back_offset, back_pitch;
81 unsigned int depth_cpp;
82 unsigned int depth_offset, depth_pitch;
83 unsigned int texture_offset[2];
84 unsigned int texture_size[2];
85 unsigned long fb_offset;
86 unsigned long mmio_offset;
87 unsigned long status_offset;
88 unsigned long warp_offset;
89 unsigned long primary_offset;
90 unsigned long buffers_offset;
91} drmCompatMGAInit;
92
93extern int drmMGAInitDMA( int fd, drmCompatMGAInit *info );
94extern int drmMGACleanupDMA( int fd );
95extern int drmMGAFlushDMA( int fd, drmLockFlags flags );
96extern int drmMGAEngineReset( int fd );
97extern int drmMGAFullScreen( int fd, int enable );
98extern int drmMGASwapBuffers( int fd );
99extern int drmMGAClear( int fd, unsigned int flags,
100 unsigned int clear_color, unsigned int clear_depth,
101 unsigned int color_mask, unsigned int depth_mask );
102extern int drmMGAFlushVertexBuffer( int fd, int indx, int used, int discard );
103extern int drmMGAFlushIndices( int fd, int indx,
104 int start, int end, int discard );
105extern int drmMGATextureLoad( int fd, int indx,
106 unsigned int dstorg, unsigned int length );
107extern int drmMGAAgpBlit( int fd, unsigned int planemask,
108 unsigned int src, int src_pitch,
109 unsigned int dst, int dst_pitch,
110 int delta_sx, int delta_sy,
111 int delta_dx, int delta_dy,
112 int height, int ydir );
113
114/* R128 */
115
116typedef struct {
117 unsigned long sarea_priv_offset;
118 int is_pci;
119 int cce_mode;
120 int cce_secure;
121 int ring_size;
122 int usec_timeout;
123 unsigned int fb_bpp;
124 unsigned int front_offset, front_pitch;
125 unsigned int back_offset, back_pitch;
126 unsigned int depth_bpp;
127 unsigned int depth_offset, depth_pitch;
128 unsigned int span_offset;
129 unsigned long fb_offset;
130 unsigned long mmio_offset;
131 unsigned long ring_offset;
132 unsigned long ring_rptr_offset;
133 unsigned long buffers_offset;
134 unsigned long agp_textures_offset;
135} drmCompatR128Init;
136
137extern int drmR128InitCCE( int fd, drmCompatR128Init *info );
138extern int drmR128CleanupCCE( int fd );
139extern int drmR128StartCCE( int fd );
140extern int drmR128StopCCE( int fd );
141extern int drmR128ResetCCE( int fd );
142extern int drmR128WaitForIdleCCE( int fd );
143extern int drmR128EngineReset( int fd );
144extern int drmR128FullScreen( int fd, int enable );
145extern int drmR128SwapBuffers( int fd );
146extern int drmR128Clear( int fd, unsigned int flags,
147 unsigned int clear_color, unsigned int clear_depth,
148 unsigned int color_mask, unsigned int depth_mask );
149extern int drmR128FlushVertexBuffer( int fd, int prim, int indx,
150 int count, int discard );
151extern int drmR128FlushIndices( int fd, int prim, int indx,
152 int start, int end, int discard );
153extern int drmR128TextureBlit( int fd, int indx,
154 int offset, int pitch, int format,
155 int x, int y, int width, int height );
156extern int drmR128WriteDepthSpan( int fd, int n, int x, int y,
157 const unsigned int depth[],
158 const unsigned char mask[] );
159extern int drmR128WriteDepthPixels( int fd, int n,
160 const int x[], const int y[],
161 const unsigned int depth[],
162 const unsigned char mask[] );
163extern int drmR128ReadDepthSpan( int fd, int n, int x, int y );
164extern int drmR128ReadDepthPixels( int fd, int n,
165 const int x[], const int y[] );
166extern int drmR128PolygonStipple( int fd, unsigned int *mask );
167extern int drmR128FlushIndirectBuffer( int fd, int indx,
168 int start, int end, int discard );
169
170/* Radeon */
171
172typedef struct {
173 unsigned long sarea_priv_offset;
174 int is_pci;
175 int cp_mode;
176 int agp_size;
177 int ring_size;
178 int usec_timeout;
179
180 unsigned int fb_bpp;
181 unsigned int front_offset, front_pitch;
182 unsigned int back_offset, back_pitch;
183 unsigned int depth_bpp;
184 unsigned int depth_offset, depth_pitch;
185
186 unsigned long fb_offset;
187 unsigned long mmio_offset;
188 unsigned long ring_offset;
189 unsigned long ring_rptr_offset;
190 unsigned long buffers_offset;
191 unsigned long agp_textures_offset;
192} drmCompatRadeonInit;
193
194typedef struct {
195 unsigned int x;
196 unsigned int y;
197 unsigned int width;
198 unsigned int height;
199 void *data;
200} drmCompatRadeonTexImage;
201
202extern int drmRadeonInitCP( int fd, drmCompatRadeonInit *info );
203extern int drmRadeonCleanupCP( int fd );
204extern int drmRadeonStartCP( int fd );
205extern int drmRadeonStopCP( int fd );
206extern int drmRadeonResetCP( int fd );
207extern int drmRadeonWaitForIdleCP( int fd );
208extern int drmRadeonEngineReset( int fd );
209extern int drmRadeonFullScreen( int fd, int enable );
210extern int drmRadeonSwapBuffers( int fd );
211extern int drmRadeonClear( int fd, unsigned int flags,
212 unsigned int clear_color, unsigned int clear_depth,
213 unsigned int color_mask, unsigned int stencil,
214 void *boxes, int nbox );
215extern int drmRadeonFlushVertexBuffer( int fd, int prim, int indx,
216 int count, int discard );
217extern int drmRadeonFlushIndices( int fd, int prim, int indx,
218 int start, int end, int discard );
219extern int drmRadeonLoadTexture( int fd, int offset, int pitch, int format,
220 int width, int height,
221 drmCompatRadeonTexImage *image );
222extern int drmRadeonPolygonStipple( int fd, unsigned int *mask );
223extern int drmRadeonFlushIndirectBuffer( int fd, int indx,
224 int start, int end, int discard );
225
226/* SiS */
227extern Bool drmSiSAgpInit(int driSubFD, int offset, int size);
228
229/* I830 */
230typedef struct {
231 unsigned int start;
232 unsigned int end;
233 unsigned int size;
234 unsigned int mmio_offset;
235 unsigned int buffers_offset;
236 int sarea_off;
237 unsigned int front_offset;
238 unsigned int back_offset;
239 unsigned int depth_offset;
240 unsigned int w;
241 unsigned int h;
242 unsigned int pitch;
243 unsigned int pitch_bits;
244 unsigned int cpp;
245} drmCompatI830Init;
246
247extern Bool drmI830CleanupDma(int driSubFD);
248extern Bool drmI830InitDma(int driSubFD, drmCompatI830Init *info );
249
250#endif
251
252/* WARNING: Do not change, or add, anything to this file. It is only provided
253 * for binary backwards compatability with the old driver specific DRM
254 * extensions used before XFree86 4.3.
255 */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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