2 * Copyright (C) 2011 glevand <geoffrey.levand@mail.ru>
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer,
10 * without modification, immediately at the beginning of the file.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 #include "xf86_OSproc.h"
36 #include "xf86Cursor.h"
40 #include <sys/types.h>
43 #include <sys/ioctl.h>
48 #include "ps3gpu_ctl.h"
51 #include "ps3gpu_accel.h"
54 XFER_MODE_VIDEO_TO_VIDEO
,
55 XFER_MODE_GART_TO_VIDEO
,
56 XFER_MODE_VIDEO_TO_GART
,
57 XFER_MODE_GART_TO_GART
61 Ps3GpuFifoPut(ScrnInfoPtr pScrn
, CARD32 data
)
63 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
64 CARD32
*fifoBase
= (CARD32
*) gPtr
->fifoBase
;
66 fifoBase
[gPtr
->fifoCurrentSlot
++] = data
;
70 Ps3GpuFifoKick(ScrnInfoPtr pScrn
)
72 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
73 volatile CARD32
*controlBase
= (CARD32
*) gPtr
->controlBase
;
75 if (gPtr
->fifoCurrentSlot
== gPtr
->fifoPutSlot
)
78 controlBase
[0x10] = gPtr
->fifoGpuAddress
+ (gPtr
->fifoCurrentSlot
<< 2);
80 gPtr
->fifoPutSlot
= gPtr
->fifoCurrentSlot
;
84 Ps3GpuFifoWait(ScrnInfoPtr pScrn
, int slots
)
86 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
87 volatile CARD32
*controlBase
= (CARD32
*) gPtr
->controlBase
;
90 if ((gPtr
->fifoFreeSlots
- 1) >= slots
)
93 Ps3GpuFifoPut(pScrn
, 0x20000000 | gPtr
->fifoGpuAddress
);
95 controlBase
[0x10] = gPtr
->fifoGpuAddress
;
98 if (controlBase
[0x10] == controlBase
[0x11])
102 if (controlBase
[0x10] != controlBase
[0x11])
103 FatalError("Failed to flush GPU FIFO\n");
105 gPtr
->fifoPutSlot
= 0;
106 gPtr
->fifoCurrentSlot
= 0;
107 gPtr
->fifoFreeSlots
= gPtr
->fifoMaxSlots
- gPtr
->fifoCurrentSlot
;
111 Ps3GpuFifoReserveSpace(ScrnInfoPtr pScrn
, int slots
)
113 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
115 Ps3GpuFifoWait(pScrn
, slots
);
117 gPtr
->fifoFreeSlots
-= slots
;
121 Ps3GpuContextInit(ScrnInfoPtr pScrn
)
123 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
125 Ps3GpuFifoReserveSpace(pScrn
, 2);
126 Ps3GpuFifoPut(pScrn
, 0x00040000);
127 Ps3GpuFifoPut(pScrn
, 0x31337000);
129 Ps3GpuFifoReserveSpace(pScrn
, 2);
130 Ps3GpuFifoPut(pScrn
, 0x00042000);
131 Ps3GpuFifoPut(pScrn
, 0x31337303);
133 Ps3GpuFifoReserveSpace(pScrn
, 4);
134 Ps3GpuFifoPut(pScrn
, 0x000c2180);
135 Ps3GpuFifoPut(pScrn
, 0x66604200);
136 Ps3GpuFifoPut(pScrn
, 0xfeed0001);
137 Ps3GpuFifoPut(pScrn
, 0xfeed0000);
139 Ps3GpuFifoReserveSpace(pScrn
, 2);
140 Ps3GpuFifoPut(pScrn
, 0x00046000);
141 Ps3GpuFifoPut(pScrn
, 0x313371c3);
143 Ps3GpuFifoReserveSpace(pScrn
, 4);
144 Ps3GpuFifoPut(pScrn
, 0x000c6180);
145 Ps3GpuFifoPut(pScrn
, 0x66604200);
146 Ps3GpuFifoPut(pScrn
, 0xfeed0000);
147 Ps3GpuFifoPut(pScrn
, 0xfeed0000);
149 Ps3GpuFifoReserveSpace(pScrn
, 2);
150 Ps3GpuFifoPut(pScrn
, 0x0004a000);
151 Ps3GpuFifoPut(pScrn
, 0x31337808);
153 Ps3GpuFifoReserveSpace(pScrn
, 9);
154 Ps3GpuFifoPut(pScrn
, 0x0020a180);
155 Ps3GpuFifoPut(pScrn
, 0x66604200);
156 Ps3GpuFifoPut(pScrn
, 0x00000000);
157 Ps3GpuFifoPut(pScrn
, 0x00000000);
158 Ps3GpuFifoPut(pScrn
, 0x00000000);
159 Ps3GpuFifoPut(pScrn
, 0x00000000);
160 Ps3GpuFifoPut(pScrn
, 0x00000000);
161 Ps3GpuFifoPut(pScrn
, 0x00000000);
162 Ps3GpuFifoPut(pScrn
, 0x313371c3);
164 Ps3GpuFifoReserveSpace(pScrn
, 3);
165 Ps3GpuFifoPut(pScrn
, 0x0008a2fc);
166 Ps3GpuFifoPut(pScrn
, 0x00000003);
167 Ps3GpuFifoPut(pScrn
, 0x00000004);
169 Ps3GpuFifoReserveSpace(pScrn
, 2);
170 Ps3GpuFifoPut(pScrn
, 0x00048000);
171 Ps3GpuFifoPut(pScrn
, 0x31337a73);
173 Ps3GpuFifoReserveSpace(pScrn
, 3);
174 Ps3GpuFifoPut(pScrn
, 0x00088180);
175 Ps3GpuFifoPut(pScrn
, 0x66604200);
176 Ps3GpuFifoPut(pScrn
, 0xfeed0000);
178 Ps3GpuFifoReserveSpace(pScrn
, 2);
179 Ps3GpuFifoPut(pScrn
, 0x0004c000);
180 Ps3GpuFifoPut(pScrn
, 0x3137af00);
182 Ps3GpuFifoReserveSpace(pScrn
, 2);
183 Ps3GpuFifoPut(pScrn
, 0x0004c180);
184 Ps3GpuFifoPut(pScrn
, 0x66604200);
186 Ps3GpuFifoKick(pScrn
);
192 Ps3GpuTransferData(ScrnInfoPtr pScrn
, int mode
,
193 CARD32 dst_offset
, INT32 dst_pitch
, CARD32 src_offset
, INT32 src_pitch
,
194 CARD32 row_length
, CARD32 row_count
)
196 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
200 if (row_length
== 0 || row_count
== 0)
204 case XFER_MODE_VIDEO_TO_VIDEO
:
208 case XFER_MODE_GART_TO_VIDEO
:
212 case XFER_MODE_VIDEO_TO_GART
:
216 case XFER_MODE_GART_TO_GART
:
224 Ps3GpuFifoReserveSpace(pScrn
, 3);
225 Ps3GpuFifoPut(pScrn
, 0x00082184);
226 Ps3GpuFifoPut(pScrn
, src
);
227 Ps3GpuFifoPut(pScrn
, dst
);
234 Ps3GpuFifoReserveSpace(pScrn
, 9);
235 Ps3GpuFifoPut(pScrn
, 0x0020230c);
236 Ps3GpuFifoPut(pScrn
, src_offset
);
237 Ps3GpuFifoPut(pScrn
, dst_offset
);
238 Ps3GpuFifoPut(pScrn
, src_pitch
);
239 Ps3GpuFifoPut(pScrn
, dst_pitch
);
240 Ps3GpuFifoPut(pScrn
, row_length
);
241 Ps3GpuFifoPut(pScrn
, h
);
242 Ps3GpuFifoPut(pScrn
, 0x00000101);
243 Ps3GpuFifoPut(pScrn
, 0x00000000);
245 src_offset
+= h
* src_pitch
;
246 dst_offset
+= h
* dst_pitch
;
250 Ps3GpuFifoKick(pScrn
);
256 Ps3GpuUploadInline(PixmapPtr pDst
, int x
, int y
, int w
, int h
,
257 char *src
, int src_pitch
)
259 ScrnInfoPtr pScrn
= xf86Screens
[pDst
->drawable
.pScreen
->myNum
];
260 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
261 int cpp
= pDst
->drawable
.bitsPerPixel
>> 3;
262 int row_length
= w
* cpp
;
270 Ps3GpuUploadDma(PixmapPtr pDst
, int x
, int y
, int w
, int h
,
271 char *src
, int src_pitch
)
273 ScrnInfoPtr pScrn
= xf86Screens
[pDst
->drawable
.pScreen
->myNum
];
274 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
275 int cpp
= pDst
->drawable
.bitsPerPixel
>> 3;
276 int dst_pitch
= exaGetPixmapPitch(pDst
);
277 int dst_offset
= exaGetPixmapOffset(pDst
) + y
* dst_pitch
+ x
* cpp
;
278 int row_length
= w
* cpp
;
279 int max_row_count
= gPtr
->gartSize
/ row_length
;
286 if (row_count
> max_row_count
)
287 row_count
= max_row_count
;
289 dst
= (char *) gPtr
->gartBase
;
291 if (src_pitch
== row_length
) {
292 memcpy(dst
, src
, src_pitch
* row_count
);
293 src
+= src_pitch
* row_count
;
295 for (i
= 0; i
< row_count
; i
++) {
296 memcpy(dst
, src
, row_length
);
302 Ps3GpuTransferData(pScrn
, XFER_MODE_GART_TO_VIDEO
,
303 gPtr
->fbGpuAddress
+ dst_offset
, dst_pitch
,
304 gPtr
->gartGpuAddress
, row_length
,
305 row_length
, row_count
);
307 exaWaitSync(pDst
->drawable
.pScreen
);
309 dst_offset
+= row_count
* dst_pitch
;
317 Ps3GpuDownloadDma(PixmapPtr pSrc
, int x
, int y
, int w
, int h
,
318 char *dst
, int dst_pitch
)
320 ScrnInfoPtr pScrn
= xf86Screens
[pSrc
->drawable
.pScreen
->myNum
];
321 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
322 int cpp
= pSrc
->drawable
.bitsPerPixel
>> 3;
323 int src_pitch
= exaGetPixmapPitch(pSrc
);
324 int src_offset
= exaGetPixmapOffset(pSrc
) + y
* src_pitch
+ x
* cpp
;
325 int row_length
= w
* cpp
;
326 int max_row_count
= gPtr
->gartSize
/ row_length
;
333 if (row_count
> max_row_count
)
334 row_count
= max_row_count
;
336 Ps3GpuTransferData(pScrn
, XFER_MODE_VIDEO_TO_GART
,
337 gPtr
->gartGpuAddress
, row_length
,
338 gPtr
->fbGpuAddress
+ src_offset
, src_pitch
,
339 row_length
, row_count
);
341 exaWaitSync(pSrc
->drawable
.pScreen
);
343 src
= (char *) gPtr
->gartBase
;
345 if (dst_pitch
== row_length
) {
346 memcpy(dst
, src
, dst_pitch
* row_count
);
347 dst
+= dst_pitch
* row_count
;
349 for (i
= 0; i
< row_count
; i
++) {
350 memcpy(dst
, src
, row_length
);
356 src_offset
+= row_count
* src_pitch
;
364 Ps3GpuPrepareSolid(PixmapPtr pPixmap
, int alu
, Pixel planemask
, Pixel fg
)
372 Ps3GpuSolid(PixmapPtr pPixmap
, int x1
, int y1
, int x2
, int y2
)
378 Ps3GpuDoneSolid(PixmapPtr pPixmap
)
384 Ps3GpuPrepareCopy(PixmapPtr pSrcPixmap
, PixmapPtr pDstPixmap
,
385 int dx
, int dy
, int alu
, Pixel planemask
)
387 ScrnInfoPtr pScrn
= xf86Screens
[pSrcPixmap
->drawable
.pScreen
->myNum
];
388 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
390 DPRINTF(pScrn
, "%s:%d: sbpp=%d dbpp=%d dx=%d dy=%d alu=%d\n",
391 __func__
, __LINE__
, pSrcPixmap
->drawable
.bitsPerPixel
,
392 pDstPixmap
->drawable
.bitsPerPixel
, dx
, dy
, alu
);
394 if (pSrcPixmap
->drawable
.bitsPerPixel
!=
395 pDstPixmap
->drawable
.bitsPerPixel
)
398 if (dx
< 0 || dy
< 0)
401 planemask
|= ~0 << pDstPixmap
->drawable
.bitsPerPixel
;
403 if (planemask
!= ~0 || alu
!= GXcopy
)
408 gPtr
->pCopySrcPixmap
= pSrcPixmap
;
414 Ps3GpuCopy(PixmapPtr pDstPixmap
, int srcX
, int srcY
, int dstX
, int dstY
,
415 int width
, int height
)
417 ScrnInfoPtr pScrn
= xf86Screens
[pDstPixmap
->drawable
.pScreen
->myNum
];
418 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
419 int cpp
= pDstPixmap
->drawable
.bitsPerPixel
>> 3;
420 int src_pitch
= exaGetPixmapPitch(gPtr
->pCopySrcPixmap
);
421 int src_offset
= exaGetPixmapOffset(gPtr
->pCopySrcPixmap
) +
422 srcY
* src_pitch
+ srcX
* cpp
;
423 int dst_pitch
= exaGetPixmapPitch(pDstPixmap
);
424 int dst_offset
= exaGetPixmapOffset(pDstPixmap
) +
425 dstY
* dst_pitch
+ dstX
* cpp
;
427 DPRINTF(pScrn
, "%s:%d: srcX=%d srcY=%d dstX=%d dstY=%d width=%d height=%d\n",
428 __func__
, __LINE__
, srcX
, srcY
, dstX
, dstY
, width
, height
);
430 Ps3GpuTransferData(pScrn
, XFER_MODE_VIDEO_TO_VIDEO
,
431 gPtr
->fbGpuAddress
+ dst_offset
, dst_pitch
,
432 gPtr
->fbGpuAddress
+ src_offset
, src_pitch
,
433 width
* cpp
, height
);
437 Ps3GpuDoneCopy(PixmapPtr pDstPixmap
)
439 ScrnInfoPtr pScrn
= xf86Screens
[pDstPixmap
->drawable
.pScreen
->myNum
];
440 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
442 gPtr
->pCopySrcPixmap
= NULL
;
446 Ps3GpuUploadToScreen(PixmapPtr pDst
, int x
, int y
, int w
, int h
,
447 char *src
, int src_pitch
)
449 ScrnInfoPtr pScrn
= xf86Screens
[pDst
->drawable
.pScreen
->myNum
];
452 if (Ps3GpuUploadInline(pDst
, x
, y
, w
, h
, src
, src_pitch
))
455 if (Ps3GpuUploadDma(pDst
, x
, y
, w
, h
, src
, src_pitch
))
463 Ps3GpuDownloadFromScreen(PixmapPtr pSrc
, int x
, int y
, int w
, int h
,
464 char *dst
, int dst_pitch
)
466 ScrnInfoPtr pScrn
= xf86Screens
[pSrc
->drawable
.pScreen
->myNum
];
469 if (Ps3GpuDownloadDma(pSrc
, x
, y
, w
, h
, dst
, dst_pitch
))
477 Ps3GpuCheckComposite(int op
, PicturePtr pSrcPicture
, PicturePtr pMaskPicture
,
478 PicturePtr pDstPicture
)
486 Ps3GpuPrepareComposite(int op
, PicturePtr pSrcPicture
,
487 PicturePtr pMaskPicture
, PicturePtr pDstPicture
, PixmapPtr pSrc
,
488 PixmapPtr pMask
, PixmapPtr pDst
)
496 Ps3GpuComposite(PixmapPtr pDst
, int srcX
, int srcY
, int maskX
, int maskY
,
497 int dstX
, int dstY
, int width
, int height
)
503 Ps3GpuDoneComposite(PixmapPtr pDst
)
509 Ps3GpuMarkSync(ScreenPtr screen
)
515 Ps3GpuWaitMarker(ScreenPtr pScreen
, int marker
)
517 ScrnInfoPtr pScrn
= xf86Screens
[pScreen
->myNum
];
518 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
519 volatile CARD32
*controlBase
= (CARD32
*) gPtr
->controlBase
;
522 Ps3GpuFifoKick(pScrn
);
525 if (controlBase
[0x10] == controlBase
[0x11])
529 if (controlBase
[0x10] != controlBase
[0x11])
530 FatalError("Failed to flush GPU FIFO\n");
534 Ps3GpuAccelInit(ScreenPtr pScreen
)
536 ScrnInfoPtr pScrn
= xf86Screens
[pScreen
->myNum
];
537 Ps3GpuPtr gPtr
= PS3GPUPTR(pScrn
);
538 struct ps3gpu_ctl_memory_allocate memoryAllocate
;
539 struct ps3gpu_ctl_setup_control setupControl
;
540 ExaDriverPtr exaDriver
;
543 gPtr
->controlBase
= (pointer
) mmap(NULL
, gPtr
->gpuControlSize
,
544 PROT_READ
| PROT_WRITE
, MAP_SHARED
, gPtr
->fd
,
545 gPtr
->gpuControlHandle
);
546 if (gPtr
->controlBase
== (pointer
*) MAP_FAILED
) {
547 xf86DrvMsg(pScrn
->scrnIndex
, X_ERROR
,
548 "Failed to map GPU control\n");
552 gPtr
->fifoSize
= 64 * 1024;
554 memoryAllocate
.context_id
= gPtr
->gpuContextId
;
555 memoryAllocate
.type
= PS3GPU_CTL_MEMORY_TYPE_GART
;
556 memoryAllocate
.size
= gPtr
->fifoSize
;
557 memoryAllocate
.align
= 12;
559 err
= ioctl(gPtr
->fd
, PS3GPU_CTL_MEMORY_ALLOCATE
,
562 xf86DrvMsg(pScrn
->scrnIndex
, X_ERROR
,
563 "Failed to allocate FIFO memory\n");
567 gPtr
->fifoHandle
= memoryAllocate
.handle
;
568 gPtr
->fifoGpuAddress
= memoryAllocate
.gpu_addr
;
570 gPtr
->fifoBase
= (pointer
) mmap(NULL
, gPtr
->fifoSize
,
571 PROT_READ
| PROT_WRITE
, MAP_SHARED
, gPtr
->fd
,
573 if (gPtr
->fifoBase
== (pointer
*) MAP_FAILED
) {
574 xf86DrvMsg(pScrn
->scrnIndex
, X_ERROR
,
575 "Failed to map FIFO memory\n");
579 setupControl
.context_id
= gPtr
->gpuContextId
;
580 setupControl
.put
= gPtr
->fifoHandle
;
581 setupControl
.get
= gPtr
->fifoHandle
;
582 setupControl
.ref
= 0xffffffff;
584 err
= ioctl(gPtr
->fd
, PS3GPU_CTL_SETUP_CONTROL
, &setupControl
);
586 xf86DrvMsg(pScrn
->scrnIndex
, X_ERROR
,
587 "Failed to setup GPU control\n");
591 gPtr
->fifoMaxSlots
= (gPtr
->fifoSize
- 1032) >> 2;
592 gPtr
->fifoPutSlot
= 0;
593 gPtr
->fifoCurrentSlot
= 0;
594 gPtr
->fifoFreeSlots
= gPtr
->fifoMaxSlots
- gPtr
->fifoCurrentSlot
;
596 gPtr
->gartSize
= 1 * 1024 * 1024;
598 memoryAllocate
.context_id
= gPtr
->gpuContextId
;
599 memoryAllocate
.type
= PS3GPU_CTL_MEMORY_TYPE_GART
;
600 memoryAllocate
.size
= gPtr
->gartSize
;
601 memoryAllocate
.align
= 12;
603 err
= ioctl(gPtr
->fd
, PS3GPU_CTL_MEMORY_ALLOCATE
,
606 xf86DrvMsg(pScrn
->scrnIndex
, X_ERROR
,
607 "Failed to allocate GART memory\n");
611 gPtr
->gartHandle
= memoryAllocate
.handle
;
612 gPtr
->gartGpuAddress
= memoryAllocate
.gpu_addr
;
614 gPtr
->gartBase
= (pointer
) mmap(NULL
, gPtr
->gartSize
,
615 PROT_READ
| PROT_WRITE
, MAP_SHARED
, gPtr
->fd
,
617 if (gPtr
->gartBase
== (pointer
*) MAP_FAILED
) {
618 xf86DrvMsg(pScrn
->scrnIndex
, X_ERROR
,
619 "Failed to map GART memory\n");
623 if (!Ps3GpuContextInit(pScrn
))
626 exaDriver
= exaDriverAlloc();
630 gPtr
->exaDriver
= exaDriver
;
632 exaDriver
->exa_major
= EXA_VERSION_MAJOR
;
633 exaDriver
->exa_minor
= EXA_VERSION_MINOR
;
635 exaDriver
->memoryBase
= (CARD8
*) gPtr
->fbBase
;
636 exaDriver
->offScreenBase
= pScrn
->displayWidth
* pScrn
->virtualY
*
637 (pScrn
->bitsPerPixel
>> 3);
638 exaDriver
->offScreenBase
= (exaDriver
->offScreenBase
+ 0x3f) & ~0x3f;
639 exaDriver
->memorySize
= gPtr
->fbSize
;
641 exaDriver
->pixmapOffsetAlign
= 256;
642 exaDriver
->pixmapPitchAlign
= 64;
643 exaDriver
->maxX
= 2048;
644 exaDriver
->maxY
= 2048;
646 exaDriver
->flags
= EXA_OFFSCREEN_PIXMAPS
;
648 exaDriver
->PrepareSolid
= Ps3GpuPrepareSolid
;
649 exaDriver
->Solid
= Ps3GpuSolid
;
650 exaDriver
->DoneSolid
= Ps3GpuDoneSolid
;
651 exaDriver
->PrepareCopy
= Ps3GpuPrepareCopy
;
652 exaDriver
->Copy
= Ps3GpuCopy
;
653 exaDriver
->DoneCopy
= Ps3GpuDoneCopy
;
654 exaDriver
->UploadToScreen
= Ps3GpuUploadToScreen
;
655 exaDriver
->DownloadFromScreen
= Ps3GpuDownloadFromScreen
;
656 exaDriver
->CheckComposite
= Ps3GpuCheckComposite
;
657 exaDriver
->PrepareComposite
= Ps3GpuPrepareComposite
;
658 exaDriver
->Composite
= Ps3GpuComposite
;
659 exaDriver
->DoneComposite
= Ps3GpuDoneComposite
;
660 exaDriver
->MarkSync
= Ps3GpuMarkSync
;
661 exaDriver
->WaitMarker
= Ps3GpuWaitMarker
;
663 gPtr
->exaDriver
= exaDriver
;
665 return (exaDriverInit(pScreen
, exaDriver
));