diff options
3 files changed, 596 insertions, 2 deletions
diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/dri.h b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/dri.h new file mode 100644 index 0000000..2d080c9 --- /dev/null +++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/dri.h | |||
@@ -0,0 +1,477 @@ | |||
1 | /**************************************************************************** | ||
2 | * | ||
3 | * Copyright (c) 2005 - 2012 by Vivante Corp. All rights reserved. | ||
4 | * | ||
5 | * The material in this file is confidential and contains trade secrets | ||
6 | * of Vivante Corporation. This is proprietary information owned by | ||
7 | * Vivante Corporation. No part of this work may be disclosed, | ||
8 | * reproduced, copied, transmitted, or used in any way for any purpose, | ||
9 | * without the express written permission of Vivante Corporation. | ||
10 | * | ||
11 | *****************************************************************************/ | ||
12 | |||
13 | |||
14 | /************************************************************************** | ||
15 | |||
16 | Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. | ||
17 | All Rights Reserved. | ||
18 | |||
19 | Permission is hereby granted, free of charge, to any person obtaining a | ||
20 | copy of this software and associated documentation files (the | ||
21 | "Software"), to deal in the Software without restriction, including | ||
22 | without limitation the rights to use, copy, modify, merge, publish, | ||
23 | distribute, sub license, and/or sell copies of the Software, and to | ||
24 | permit persons to whom the Software is furnished to do so, subject to | ||
25 | the following conditions: | ||
26 | |||
27 | The above copyright notice and this permission notice (including the | ||
28 | next paragraph) shall be included in all copies or substantial portions | ||
29 | of the Software. | ||
30 | |||
31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
32 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
33 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | ||
34 | IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR | ||
35 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
36 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
37 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
38 | |||
39 | **************************************************************************/ | ||
40 | |||
41 | /* | ||
42 | * Authors: | ||
43 | * Jens Owen <jens@tungstengraphics.com> | ||
44 | * | ||
45 | */ | ||
46 | |||
47 | /* Prototypes for DRI functions */ | ||
48 | |||
49 | #ifndef _DRI_H_ | ||
50 | |||
51 | #include <pciaccess.h> | ||
52 | |||
53 | #include "scrnintstr.h" | ||
54 | #include "xf86dri.h" | ||
55 | |||
56 | typedef int DRISyncType; | ||
57 | |||
58 | #define DRI_NO_SYNC 0 | ||
59 | #define DRI_2D_SYNC 1 | ||
60 | #define DRI_3D_SYNC 2 | ||
61 | |||
62 | typedef int DRIContextType; | ||
63 | |||
64 | typedef struct _DRIContextPrivRec DRIContextPrivRec, *DRIContextPrivPtr; | ||
65 | |||
66 | typedef enum _DRIContextFlags | ||
67 | { | ||
68 | DRI_CONTEXT_2DONLY = 0x01, | ||
69 | DRI_CONTEXT_PRESERVED = 0x02, | ||
70 | DRI_CONTEXT_RESERVED = 0x04 /* DRI Only -- no kernel equivalent */ | ||
71 | } DRIContextFlags; | ||
72 | |||
73 | #define DRI_NO_CONTEXT 0 | ||
74 | #define DRI_2D_CONTEXT 1 | ||
75 | #define DRI_3D_CONTEXT 2 | ||
76 | |||
77 | typedef int DRISwapMethod; | ||
78 | |||
79 | #define DRI_HIDE_X_CONTEXT 0 | ||
80 | #define DRI_SERVER_SWAP 1 | ||
81 | #define DRI_KERNEL_SWAP 2 | ||
82 | |||
83 | typedef int DRIWindowRequests; | ||
84 | |||
85 | #define DRI_NO_WINDOWS 0 | ||
86 | #define DRI_3D_WINDOWS_ONLY 1 | ||
87 | #define DRI_ALL_WINDOWS 2 | ||
88 | |||
89 | |||
90 | typedef void (*ClipNotifyPtr)( WindowPtr, int, int ); | ||
91 | typedef void (*AdjustFramePtr)(int scrnIndex, int x, int y, int flags); | ||
92 | |||
93 | |||
94 | /* | ||
95 | * These functions can be wrapped by the DRI. Each of these have | ||
96 | * generic default funcs (initialized in DRICreateInfoRec) and can be | ||
97 | * overridden by the driver in its [driver]DRIScreenInit function. | ||
98 | */ | ||
99 | typedef struct { | ||
100 | ScreenWakeupHandlerProcPtr WakeupHandler; | ||
101 | ScreenBlockHandlerProcPtr BlockHandler; | ||
102 | WindowExposuresProcPtr WindowExposures; | ||
103 | CopyWindowProcPtr CopyWindow; | ||
104 | ValidateTreeProcPtr ValidateTree; | ||
105 | PostValidateTreeProcPtr PostValidateTree; | ||
106 | ClipNotifyProcPtr ClipNotify; | ||
107 | AdjustFramePtr AdjustFrame; | ||
108 | } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; | ||
109 | |||
110 | |||
111 | /* | ||
112 | * Prior to Xorg 6.8.99.8, the DRIInfoRec structure was implicitly versioned | ||
113 | * by the XF86DRI_*_VERSION defines in xf86dristr.h. These numbers were also | ||
114 | * being used to version the XFree86-DRI protocol. Bugs #3066 and #3163 | ||
115 | * showed that this was inadequate. The DRIInfoRec structure is now versioned | ||
116 | * by the DRIINFO_*_VERSION defines in this file. - ajax, 2005-05-18. | ||
117 | * | ||
118 | * Revision history: | ||
119 | * 4.1.0 and earlier: DRIQueryVersion returns XF86DRI_*_VERSION. | ||
120 | * 4.2.0: DRIQueryVersion begins returning DRIINFO_*_VERSION. | ||
121 | * 5.0.0: frameBufferPhysicalAddress changed from CARD32 to pointer. | ||
122 | */ | ||
123 | |||
124 | #define DRIINFO_MAJOR_VERSION 5 | ||
125 | #define DRIINFO_MINOR_VERSION 4 | ||
126 | #define DRIINFO_PATCH_VERSION 0 | ||
127 | |||
128 | typedef unsigned long long (*DRITexOffsetStartProcPtr)(PixmapPtr pPix); | ||
129 | typedef void (*DRITexOffsetFinishProcPtr)(PixmapPtr pPix); | ||
130 | |||
131 | typedef struct { | ||
132 | /* driver call back functions | ||
133 | * | ||
134 | * New fields should be added at the end for backwards compatibility. | ||
135 | * Bump the DRIINFO patch number to indicate bugfixes. | ||
136 | * Bump the DRIINFO minor number to indicate new fields. | ||
137 | * Bump the DRIINFO major number to indicate binary-incompatible changes. | ||
138 | */ | ||
139 | Bool (*CreateContext)(ScreenPtr pScreen, | ||
140 | VisualPtr visual, | ||
141 | drm_context_t hHWContext, | ||
142 | void* pVisualConfigPriv, | ||
143 | DRIContextType context); | ||
144 | void (*DestroyContext)(ScreenPtr pScreen, | ||
145 | drm_context_t hHWContext, | ||
146 | DRIContextType context); | ||
147 | void (*SwapContext)(ScreenPtr pScreen, | ||
148 | DRISyncType syncType, | ||
149 | DRIContextType readContextType, | ||
150 | void* readContextStore, | ||
151 | DRIContextType writeContextType, | ||
152 | void* writeContextStore); | ||
153 | void (*InitBuffers)(WindowPtr pWin, | ||
154 | RegionPtr prgn, | ||
155 | CARD32 indx); | ||
156 | void (*MoveBuffers)(WindowPtr pWin, | ||
157 | DDXPointRec ptOldOrg, | ||
158 | RegionPtr prgnSrc, | ||
159 | CARD32 indx); | ||
160 | void (*TransitionTo3d)(ScreenPtr pScreen); | ||
161 | void (*TransitionTo2d)(ScreenPtr pScreen); | ||
162 | |||
163 | void (*SetDrawableIndex)(WindowPtr pWin, CARD32 indx); | ||
164 | Bool (*OpenFullScreen)(ScreenPtr pScreen); | ||
165 | Bool (*CloseFullScreen)(ScreenPtr pScreen); | ||
166 | |||
167 | /* wrapped functions */ | ||
168 | DRIWrappedFuncsRec wrap; | ||
169 | |||
170 | /* device info */ | ||
171 | char* drmDriverName; | ||
172 | char* clientDriverName; | ||
173 | char* busIdString; | ||
174 | int ddxDriverMajorVersion; | ||
175 | int ddxDriverMinorVersion; | ||
176 | int ddxDriverPatchVersion; | ||
177 | pointer frameBufferPhysicalAddress; | ||
178 | long frameBufferSize; | ||
179 | long frameBufferStride; | ||
180 | long SAREASize; | ||
181 | int maxDrawableTableEntry; | ||
182 | int ddxDrawableTableEntry; | ||
183 | long contextSize; | ||
184 | DRISwapMethod driverSwapMethod; | ||
185 | DRIWindowRequests bufferRequests; | ||
186 | int devPrivateSize; | ||
187 | void* devPrivate; | ||
188 | Bool createDummyCtx; | ||
189 | Bool createDummyCtxPriv; | ||
190 | |||
191 | /* New with DRI version 4.1.0 */ | ||
192 | void (*TransitionSingleToMulti3D)(ScreenPtr pScreen); | ||
193 | void (*TransitionMultiToSingle3D)(ScreenPtr pScreen); | ||
194 | |||
195 | /* New with DRI version 5.1.0 */ | ||
196 | void (*ClipNotify)(ScreenPtr pScreen, WindowPtr *ppWin, int num); | ||
197 | |||
198 | /* New with DRI version 5.2.0 */ | ||
199 | Bool allocSarea; | ||
200 | Bool keepFDOpen; | ||
201 | |||
202 | /* New with DRI version 5.3.0 */ | ||
203 | DRITexOffsetStartProcPtr texOffsetStart; | ||
204 | DRITexOffsetFinishProcPtr texOffsetFinish; | ||
205 | |||
206 | /* New with DRI version 5.4.0 */ | ||
207 | int dontMapFrameBuffer; | ||
208 | drm_handle_t hFrameBuffer; /* Handle to framebuffer, either | ||
209 | * mapped by DDX driver or DRI */ | ||
210 | |||
211 | } DRIInfoRec, *DRIInfoPtr; | ||
212 | |||
213 | |||
214 | #define DRM_CAS_VIV(lock,old,new,__ret) \ | ||
215 | do { \ | ||
216 | __asm__ __volatile__ ( \ | ||
217 | "1: ldrex %0, [%1]\n" \ | ||
218 | " teq %0, %2\n" \ | ||
219 | " strexeq %0, %3, [%1]\n" \ | ||
220 | : "=&r" (__ret) \ | ||
221 | : "r" (lock), "r" (old), "r" (new) \ | ||
222 | : "cc"); \ | ||
223 | } while (0) | ||
224 | |||
225 | #define DRM_LIGHT_LOCK_VIV(fd,lock,context) \ | ||
226 | do { \ | ||
227 | DRM_CAS_RESULT(__ret); \ | ||
228 | DRM_CAS_VIV(lock,context,DRM_LOCK_HELD|context,__ret); \ | ||
229 | if (__ret) drmGetLock(fd,context,0); \ | ||
230 | } while(0) | ||
231 | |||
232 | /* This one counts fast locks -- for benchmarking only. */ | ||
233 | #define DRM_LIGHT_LOCK_COUNT_VIV(fd,lock,context,count) \ | ||
234 | do { \ | ||
235 | DRM_CAS_RESULT(__ret); \ | ||
236 | DRM_CAS_VIV(lock,context,DRM_LOCK_HELD|context,__ret); \ | ||
237 | if (__ret) drmGetLock(fd,context,0); \ | ||
238 | else ++count; \ | ||
239 | } while(0) | ||
240 | |||
241 | #define DRM_LOCK_VIV(fd,lock,context,flags) \ | ||
242 | do { \ | ||
243 | if (flags) drmGetLock(fd,context,flags); \ | ||
244 | else DRM_LIGHT_LOCK_VIV(fd,lock,context); \ | ||
245 | } while(0) | ||
246 | |||
247 | #define DRM_UNLOCK_VIV(fd,lock,context) \ | ||
248 | do { \ | ||
249 | DRM_CAS_RESULT(__ret); \ | ||
250 | DRM_CAS_VIV(lock,DRM_LOCK_HELD|context,context,__ret); \ | ||
251 | if (__ret) drmUnlock(fd,context); \ | ||
252 | } while(0) | ||
253 | |||
254 | #define DRM_SPINLOCK_VIV(spin,val) \ | ||
255 | do { \ | ||
256 | DRM_CAS_RESULT(__ret); \ | ||
257 | do { \ | ||
258 | DRM_CAS_VIV(spin,0,val,__ret); \ | ||
259 | if (__ret) while ((spin)->lock); \ | ||
260 | } while (__ret); \ | ||
261 | } while(0) | ||
262 | |||
263 | #define DRM_SPINLOCK_TAKE_VIV(spin,val) \ | ||
264 | do { \ | ||
265 | DRM_CAS_RESULT(__ret); \ | ||
266 | int cur; \ | ||
267 | do { \ | ||
268 | cur = (*spin).lock; \ | ||
269 | DRM_CAS_VIV(spin,cur,val,__ret); \ | ||
270 | } while (__ret); \ | ||
271 | } while(0) | ||
272 | |||
273 | #define DRM_SPINLOCK_COUNT_VIV(spin,val,count,__ret) \ | ||
274 | do { \ | ||
275 | int __i; \ | ||
276 | __ret = 1; \ | ||
277 | for (__i = 0; __ret && __i < count; __i++) { \ | ||
278 | DRM_CAS_VIV(spin,0,val,__ret); \ | ||
279 | if (__ret) for (;__i < count && (spin)->lock; __i++); \ | ||
280 | } \ | ||
281 | } while(0) | ||
282 | |||
283 | #define DRM_SPINUNLOCK_VIV(spin,val) \ | ||
284 | do { \ | ||
285 | DRM_CAS_RESULT(__ret); \ | ||
286 | if ((*spin).lock == val) { /* else server stole lock */ \ | ||
287 | do { \ | ||
288 | DRM_CAS_VIV(spin,val,0,__ret); \ | ||
289 | } while (__ret); \ | ||
290 | } \ | ||
291 | } while(0) | ||
292 | |||
293 | |||
294 | extern _X_EXPORT Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize, | ||
295 | const char *busID, | ||
296 | const char *drmDriverName); | ||
297 | |||
298 | extern _X_EXPORT Bool DRIScreenInit(ScreenPtr pScreen, | ||
299 | DRIInfoPtr pDRIInfo, | ||
300 | int *pDRMFD); | ||
301 | |||
302 | extern _X_EXPORT void DRICloseScreen(ScreenPtr pScreen); | ||
303 | |||
304 | extern _X_EXPORT Bool DRIExtensionInit(void); | ||
305 | |||
306 | extern _X_EXPORT void DRIReset(void); | ||
307 | |||
308 | extern _X_EXPORT Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, | ||
309 | Bool *isCapable); | ||
310 | |||
311 | extern _X_EXPORT Bool DRIOpenConnection(ScreenPtr pScreen, | ||
312 | drm_handle_t * hSAREA, | ||
313 | char **busIdString); | ||
314 | |||
315 | extern _X_EXPORT Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic); | ||
316 | |||
317 | extern _X_EXPORT Bool DRICloseConnection(ScreenPtr pScreen); | ||
318 | |||
319 | extern _X_EXPORT Bool DRIGetClientDriverName(ScreenPtr pScreen, | ||
320 | int* ddxDriverMajorVersion, | ||
321 | int* ddxDriverMinorVersion, | ||
322 | int* ddxDriverPatchVersion, | ||
323 | char** clientDriverName); | ||
324 | |||
325 | extern _X_EXPORT Bool DRICreateContext(ScreenPtr pScreen, | ||
326 | VisualPtr visual, | ||
327 | XID context, | ||
328 | drm_context_t * pHWContext); | ||
329 | |||
330 | extern _X_EXPORT Bool DRIDestroyContext(ScreenPtr pScreen, XID context); | ||
331 | |||
332 | extern _X_EXPORT Bool DRIContextPrivDelete(pointer pResource, XID id); | ||
333 | |||
334 | extern _X_EXPORT Bool DRICreateDrawable(ScreenPtr pScreen, | ||
335 | ClientPtr client, | ||
336 | DrawablePtr pDrawable, | ||
337 | drm_drawable_t * hHWDrawable); | ||
338 | |||
339 | extern _X_EXPORT Bool DRIDestroyDrawable(ScreenPtr pScreen, | ||
340 | ClientPtr client, | ||
341 | DrawablePtr pDrawable); | ||
342 | |||
343 | extern _X_EXPORT Bool DRIDrawablePrivDelete(pointer pResource, | ||
344 | XID id); | ||
345 | |||
346 | extern _X_EXPORT Bool DRIGetDrawableInfo(ScreenPtr pScreen, | ||
347 | DrawablePtr pDrawable, | ||
348 | unsigned int* indx, | ||
349 | unsigned int* stamp, | ||
350 | int* X, | ||
351 | int* Y, | ||
352 | int* W, | ||
353 | int* H, | ||
354 | int* numClipRects, | ||
355 | drm_clip_rect_t ** pClipRects, | ||
356 | int* backX, | ||
357 | int* backY, | ||
358 | int* numBackClipRects, | ||
359 | drm_clip_rect_t ** pBackClipRects); | ||
360 | |||
361 | extern _X_EXPORT Bool DRIGetDeviceInfo(ScreenPtr pScreen, | ||
362 | drm_handle_t * hFrameBuffer, | ||
363 | int* fbOrigin, | ||
364 | int* fbSize, | ||
365 | int* fbStride, | ||
366 | int* devPrivateSize, | ||
367 | void** pDevPrivate); | ||
368 | |||
369 | extern _X_EXPORT DRIInfoPtr DRICreateInfoRec(void); | ||
370 | |||
371 | extern _X_EXPORT void DRIDestroyInfoRec(DRIInfoPtr DRIInfo); | ||
372 | |||
373 | extern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen); | ||
374 | |||
375 | extern _X_EXPORT void DRIWakeupHandler(pointer wakeupData, | ||
376 | int result, | ||
377 | pointer pReadmask); | ||
378 | |||
379 | extern _X_EXPORT void DRIBlockHandler(pointer blockData, | ||
380 | OSTimePtr pTimeout, | ||
381 | pointer pReadmask); | ||
382 | |||
383 | extern _X_EXPORT void DRIDoWakeupHandler(int screenNum, | ||
384 | pointer wakeupData, | ||
385 | unsigned long result, | ||
386 | pointer pReadmask); | ||
387 | |||
388 | extern _X_EXPORT void DRIDoBlockHandler(int screenNum, | ||
389 | pointer blockData, | ||
390 | pointer pTimeout, | ||
391 | pointer pReadmask); | ||
392 | |||
393 | extern _X_EXPORT void DRISwapContext(int drmFD, | ||
394 | void *oldctx, | ||
395 | void *newctx); | ||
396 | |||
397 | extern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context); | ||
398 | |||
399 | extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin, | ||
400 | RegionPtr prgn, | ||
401 | RegionPtr bsreg); | ||
402 | |||
403 | extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin); | ||
404 | |||
405 | extern _X_EXPORT void DRICopyWindow(WindowPtr pWin, | ||
406 | DDXPointRec ptOldOrg, | ||
407 | RegionPtr prgnSrc); | ||
408 | |||
409 | extern _X_EXPORT int DRIValidateTree(WindowPtr pParent, | ||
410 | WindowPtr pChild, | ||
411 | VTKind kind); | ||
412 | |||
413 | extern _X_EXPORT void DRIPostValidateTree(WindowPtr pParent, | ||
414 | WindowPtr pChild, | ||
415 | VTKind kind); | ||
416 | |||
417 | extern _X_EXPORT void DRIClipNotify(WindowPtr pWin, | ||
418 | int dx, | ||
419 | int dy); | ||
420 | |||
421 | extern _X_EXPORT CARD32 DRIGetDrawableIndex(WindowPtr pWin); | ||
422 | |||
423 | extern _X_EXPORT void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg); | ||
424 | |||
425 | extern _X_EXPORT void DRILock(ScreenPtr pScreen, int flags); | ||
426 | |||
427 | extern _X_EXPORT void DRIUnlock(ScreenPtr pScreen); | ||
428 | |||
429 | extern _X_EXPORT DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen); | ||
430 | |||
431 | extern _X_EXPORT void *DRIGetSAREAPrivate(ScreenPtr pScreen); | ||
432 | |||
433 | extern _X_EXPORT unsigned int DRIGetDrawableStamp(ScreenPtr pScreen, | ||
434 | CARD32 drawable_index); | ||
435 | |||
436 | extern _X_EXPORT DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen, | ||
437 | drm_context_t * pHWContext, | ||
438 | DRIContextFlags flags); | ||
439 | |||
440 | extern _X_EXPORT DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen, | ||
441 | drm_context_t hHWContext, | ||
442 | DRIContextFlags flags); | ||
443 | |||
444 | extern _X_EXPORT Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv); | ||
445 | |||
446 | extern _X_EXPORT drm_context_t DRIGetContext(ScreenPtr pScreen); | ||
447 | |||
448 | extern _X_EXPORT void DRIQueryVersion(int *majorVersion, | ||
449 | int *minorVersion, | ||
450 | int *patchVersion); | ||
451 | |||
452 | extern _X_EXPORT void DRIAdjustFrame(int scrnIndex, int x, int y, int flags); | ||
453 | |||
454 | extern _X_EXPORT void DRIMoveBuffersHelper(ScreenPtr pScreen, | ||
455 | int dx, | ||
456 | int dy, | ||
457 | int *xdir, | ||
458 | int *ydir, | ||
459 | RegionPtr reg); | ||
460 | |||
461 | extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *PciInfo); | ||
462 | |||
463 | extern _X_EXPORT int drmInstallSIGIOHandler(int fd, void (*f)(int, void *, void *)); | ||
464 | extern _X_EXPORT int drmRemoveSIGIOHandler(int fd); | ||
465 | extern _X_EXPORT int DRIMasterFD(ScrnInfoPtr pScrn); | ||
466 | |||
467 | extern _X_EXPORT void *DRIMasterSareaPointer(ScrnInfoPtr pScrn); | ||
468 | |||
469 | extern _X_EXPORT drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn); | ||
470 | |||
471 | extern _X_EXPORT void DRIGetTexOffsetFuncs(ScreenPtr pScreen, | ||
472 | DRITexOffsetStartProcPtr *texOffsetStartFunc, | ||
473 | DRITexOffsetFinishProcPtr *texOffsetFinishFunc); | ||
474 | |||
475 | #define _DRI_H_ | ||
476 | |||
477 | #endif | ||
diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/sarea.h b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/sarea.h new file mode 100644 index 0000000..b05d436 --- /dev/null +++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/sarea.h | |||
@@ -0,0 +1,110 @@ | |||
1 | /**************************************************************************** | ||
2 | * | ||
3 | * Copyright (c) 2005 - 2012 by Vivante Corp. All rights reserved. | ||
4 | * | ||
5 | * The material in this file is confidential and contains trade secrets | ||
6 | * of Vivante Corporation. This is proprietary information owned by | ||
7 | * Vivante Corporation. No part of this work may be disclosed, | ||
8 | * reproduced, copied, transmitted, or used in any way for any purpose, | ||
9 | * without the express written permission of Vivante Corporation. | ||
10 | * | ||
11 | *****************************************************************************/ | ||
12 | |||
13 | |||
14 | /** | ||
15 | * \file sarea.h | ||
16 | * SAREA definitions. | ||
17 | * | ||
18 | * \author Kevin E. Martin <kevin@precisioninsight.com> | ||
19 | * \author Jens Owen <jens@tungstengraphics.com> | ||
20 | * \author Rickard E. (Rik) Faith <faith@valinux.com> | ||
21 | */ | ||
22 | |||
23 | /* | ||
24 | * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. | ||
25 | * Copyright 2000 VA Linux Systems, Inc. | ||
26 | * All Rights Reserved. | ||
27 | * | ||
28 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
29 | * copy of this software and associated documentation files (the | ||
30 | * "Software"), to deal in the Software without restriction, including | ||
31 | * without limitation the rights to use, copy, modify, merge, publish, | ||
32 | * distribute, sub license, and/or sell copies of the Software, and to | ||
33 | * permit persons to whom the Software is furnished to do so, subject to | ||
34 | * the following conditions: | ||
35 | * | ||
36 | * The above copyright notice and this permission notice (including the | ||
37 | * next paragraph) shall be included in all copies or substantial portions | ||
38 | * of the Software. | ||
39 | * | ||
40 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
41 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
42 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. | ||
43 | * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR | ||
44 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
45 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
46 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
47 | */ | ||
48 | |||
49 | |||
50 | #ifndef _SAREA_H_ | ||
51 | #define _SAREA_H_ | ||
52 | |||
53 | #include "xf86drm.h" | ||
54 | |||
55 | /* SAREA area needs to be at least a page */ | ||
56 | #if defined(__alpha__) | ||
57 | #define SAREA_MAX 0x2000 | ||
58 | #elif defined(__ia64__) | ||
59 | #define SAREA_MAX 0x10000 /* 64kB */ | ||
60 | #else | ||
61 | /* Intel 830M driver needs at least 8k SAREA */ | ||
62 | #define SAREA_MAX 0x2000 | ||
63 | #endif | ||
64 | |||
65 | #define SAREA_MAX_DRAWABLES 256 | ||
66 | |||
67 | #define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000 | ||
68 | |||
69 | /** | ||
70 | * SAREA per drawable information. | ||
71 | * | ||
72 | * \sa _XF86DRISAREA. | ||
73 | */ | ||
74 | typedef struct _XF86DRISAREADrawable { | ||
75 | unsigned int stamp; | ||
76 | unsigned int flags; | ||
77 | } XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr; | ||
78 | |||
79 | /** | ||
80 | * SAREA frame information. | ||
81 | * | ||
82 | * \sa _XF86DRISAREA. | ||
83 | */ | ||
84 | typedef struct _XF86DRISAREAFrame { | ||
85 | unsigned int x; | ||
86 | unsigned int y; | ||
87 | unsigned int width; | ||
88 | unsigned int height; | ||
89 | unsigned int fullscreen; | ||
90 | } XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr; | ||
91 | |||
92 | /** | ||
93 | * SAREA definition. | ||
94 | */ | ||
95 | typedef struct _XF86DRISAREA { | ||
96 | /** first thing is always the DRM locking structure */ | ||
97 | drmLock lock; | ||
98 | /** \todo Use readers/writer lock for drawable_lock */ | ||
99 | drmLock drawable_lock; | ||
100 | XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES]; | ||
101 | XF86DRISAREAFrameRec frame; | ||
102 | drm_context_t dummy_context; | ||
103 | } XF86DRISAREARec, *XF86DRISAREAPtr; | ||
104 | |||
105 | typedef struct _XF86DRILSAREA { | ||
106 | drmLock lock; | ||
107 | drmLock otherLocks[31]; | ||
108 | } XF86DRILSAREARec, *XF86DRILSAREAPtr; | ||
109 | |||
110 | #endif | ||
diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb index 2ecd9f4..259f53b 100644 --- a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb +++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb | |||
@@ -3,14 +3,16 @@ | |||
3 | 3 | ||
4 | require recipes-graphics/xorg-driver/xorg-driver-video.inc | 4 | require recipes-graphics/xorg-driver/xorg-driver-video.inc |
5 | 5 | ||
6 | PR = "${INC_PR}.2" | 6 | PR = "${INC_PR}.3" |
7 | 7 | ||
8 | DEPENDS += "virtual/libx11 virtual/libgal-x11 gpu-viv-bin-mx6q" | 8 | DEPENDS += "virtual/libx11 virtual/libgal-x11 gpu-viv-bin-mx6q" |
9 | 9 | ||
10 | LIC_FILES_CHKSUM = "file://src/vivante_fbdev/vivante.h;endline=19;md5=93a322f91ec495569dcbcfbb2a95454a" | 10 | LIC_FILES_CHKSUM = "file://src/vivante_fbdev/vivante.h;endline=19;md5=93a322f91ec495569dcbcfbb2a95454a" |
11 | 11 | ||
12 | SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz \ | 12 | SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz \ |
13 | file://Makefile.am-remove-prefixed-include-path.patch" | 13 | file://Makefile.am-remove-prefixed-include-path.patch \ |
14 | file://dri.h \ | ||
15 | file://sarea.h " | ||
14 | SRC_URI[md5sum] = "1948119717aa01bed1f630be9ee7a708" | 16 | SRC_URI[md5sum] = "1948119717aa01bed1f630be9ee7a708" |
15 | SRC_URI[sha256sum] = "5b3be4b426d2d2803554df9e4d8919d1f9d17659c3153c71c6529f43c37e6ed1" | 17 | SRC_URI[sha256sum] = "5b3be4b426d2d2803554df9e4d8919d1f9d17659c3153c71c6529f43c37e6ed1" |
16 | 18 | ||
@@ -20,6 +22,11 @@ LDFLAGS += "-lm -ldl -lX11 -lGAL-x11" | |||
20 | 22 | ||
21 | S = "${WORKDIR}/xserver-xorg-video-imx-viv-${PV}" | 23 | S = "${WORKDIR}/xserver-xorg-video-imx-viv-${PV}" |
22 | 24 | ||
25 | do_configure_prepend () { | ||
26 | cp ${WORKDIR}/dri.h ${S}/src | ||
27 | cp ${WORKDIR}/sarea.h ${S}/src | ||
28 | } | ||
29 | |||
23 | do_install_append () { | 30 | do_install_append () { |
24 | install -d ${D}${includedir} | 31 | install -d ${D}${includedir} |
25 | cp -axr ${S}/src/vivante_gal/vivante_priv.h ${D}${includedir} | 32 | cp -axr ${S}/src/vivante_gal/vivante_priv.h ${D}${includedir} |