1
2/**************************************************************************
3
4Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
5All Rights Reserved.
6
7Permission is hereby granted, free of charge, to any person obtaining a
8copy of this software and associated documentation files (the
9"Software"), to deal in the Software without restriction, including
10without limitation the rights to use, copy, modify, merge, publish,
11distribute, sub license, and/or sell copies of the Software, and to
12permit persons to whom the Software is furnished to do so, subject to
13the following conditions:
14
15The above copyright notice and this permission notice (including the
16next paragraph) shall be included in all copies or substantial portions
17of the Software.
18
19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
22IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
23ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
27**************************************************************************/
28
29#ifdef HAVE_CONFIG_H
30#include "config.h"
31#endif
32
33/*
34 * Authors:
35 *   Keith Whitwell <keith@tungstengraphics.com>
36 *
37 */
38
39#include "xf86.h"
40#include "xaarop.h"
41#include "i810.h"
42
43static void I810SetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
44					   int pattx, int patty,
45					   int fg, int bg, int rop,
46					   unsigned int planemask);
47static void I810SubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn,
48						 int pattx, int patty,
49						 int x, int y, int w, int h);
50
51static void I810SetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
52							   int fg, int bg,
53							   int rop,
54							   unsigned int mask);
55
56static void I810SubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr
57							     pScrn, int x,
58							     int y, int w,
59							     int h,
60							     int skipleft);
61
62static void I810SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno);
63
64/* The following function sets up the supported acceleration. Call it
65 * from the FbInit() function in the SVGA driver, or before ScreenInit
66 * in a monolithic server.
67 */
68Bool
69I810AccelInit(ScreenPtr pScreen)
70{
71   XAAInfoRecPtr infoPtr;
72   ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
73   I810Ptr pI810 = I810PTR(pScrn);
74
75   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
76      ErrorF("I810AccelInit\n");
77
78   pI810->AccelInfoRec = infoPtr = XAACreateInfoRec();
79   if (!infoPtr)
80      return FALSE;
81
82   pI810->bufferOffset = 0;
83   infoPtr->Flags = LINEAR_FRAMEBUFFER | OFFSCREEN_PIXMAPS;
84   infoPtr->Flags |= PIXMAP_CACHE;
85
86   /* Sync
87    */
88   infoPtr->Sync = I810Sync;
89
90   /* Solid filled rectangles
91    */
92   {
93      infoPtr->SolidFillFlags = NO_PLANEMASK;
94      infoPtr->SetupForSolidFill = I810SetupForSolidFill;
95      infoPtr->SubsequentSolidFillRect = I810SubsequentSolidFillRect;
96   }
97
98   /* Screen to screen copy
99    *   - the transparency op hangs the blit engine, disable for now.
100    */
101   {
102      infoPtr->ScreenToScreenCopyFlags = (0
103					  | NO_PLANEMASK
104					  | NO_TRANSPARENCY | 0);
105
106      infoPtr->SetupForScreenToScreenCopy = I810SetupForScreenToScreenCopy;
107      infoPtr->SubsequentScreenToScreenCopy =
108	    I810SubsequentScreenToScreenCopy;
109   }
110
111   /* 8x8 pattern fills
112    */
113   {
114      infoPtr->SetupForMono8x8PatternFill = I810SetupForMono8x8PatternFill;
115      infoPtr->SubsequentMono8x8PatternFillRect =
116	    I810SubsequentMono8x8PatternFillRect;
117
118      infoPtr->Mono8x8PatternFillFlags = (HARDWARE_PATTERN_PROGRAMMED_BITS |
119					  HARDWARE_PATTERN_SCREEN_ORIGIN |
120					  BIT_ORDER_IN_BYTE_MSBFIRST |
121					  NO_PLANEMASK | 0);
122   }
123
124   /* 8x8 color fills - not considered useful for XAA.
125    */
126
127   /* Scanline color expansion - Use the same scheme as the 3.3 driver.
128    *
129    */
130   if (pI810->Scratch.Size != 0) {
131      int i;
132      int width = ((pScrn->displayWidth + 31) & ~31) / 8;
133      int nr_buffers = pI810->Scratch.Size / width;
134      unsigned char *ptr = pI810->FbBase + pI810->Scratch.Start;
135
136      pI810->NumScanlineColorExpandBuffers = nr_buffers;
137      pI810->ScanlineColorExpandBuffers = (unsigned char **)
138	    xnfcalloc(nr_buffers, sizeof(unsigned char *));
139
140      for (i = 0; i < nr_buffers; i++, ptr += width)
141	 pI810->ScanlineColorExpandBuffers[i] = ptr;
142
143      infoPtr->ScanlineCPUToScreenColorExpandFillFlags = (NO_PLANEMASK |
144							  ROP_NEEDS_SOURCE |
145							  BIT_ORDER_IN_BYTE_MSBFIRST
146							  | 0);
147
148      infoPtr->ScanlineColorExpandBuffers = (unsigned char **)
149	    xnfcalloc(1, sizeof(unsigned char *));
150      infoPtr->NumScanlineColorExpandBuffers = 1;
151
152      infoPtr->ScanlineColorExpandBuffers[0] =
153	    pI810->ScanlineColorExpandBuffers[0];
154      pI810->nextColorExpandBuf = 0;
155
156      infoPtr->SetupForScanlineCPUToScreenColorExpandFill =
157	    I810SetupForScanlineCPUToScreenColorExpandFill;
158
159      infoPtr->SubsequentScanlineCPUToScreenColorExpandFill =
160	    I810SubsequentScanlineCPUToScreenColorExpandFill;
161
162      infoPtr->SubsequentColorExpandScanline =
163	    I810SubsequentColorExpandScanline;
164   }
165
166   /* Possible todo: Image writes w/ non-GXCOPY rop.
167    */
168
169   I810SelectBuffer(pScrn, I810_SELECT_FRONT);
170
171   return XAAInit(pScreen, infoPtr);
172}
173
174int
175I810WaitLpRing(ScrnInfoPtr pScrn, int n, int timeout_millis)
176{
177   I810Ptr pI810 = I810PTR(pScrn);
178   I810RingBuffer *ring = pI810->LpRing;
179   int iters = 0;
180   int start = 0;
181   int now = 0;
182   int last_head = 0;
183   int first = 0;
184
185   /* If your system hasn't moved the head pointer in 2 seconds, I'm going to
186    * call it crashed.
187    */
188   if (timeout_millis == 0)
189      timeout_millis = 2000;
190
191   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) {
192      ErrorF("I810WaitLpRing %d\n", n);
193      first = GetTimeInMillis();
194   }
195
196   while (ring->space < n) {
197      ring->head = INREG(LP_RING + RING_HEAD) & HEAD_ADDR;
198      ring->space = ring->head - (ring->tail + 8);
199
200      if (ring->space < 0)
201	 ring->space += ring->mem.Size;
202
203      iters++;
204      now = GetTimeInMillis();
205      if (start == 0 || now < start || ring->head != last_head) {
206	 if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
207	    if (now > start)
208	       ErrorF("space: %d wanted %d\n", ring->space, n);
209	 start = now;
210	 last_head = ring->head;
211      } else if (now - start > timeout_millis) {
212	 ErrorF("Error in I810WaitLpRing(), now is %d, start is %d\n", now,
213		start);
214	 I810PrintErrorState(pScrn);
215	 ErrorF("space: %d wanted %d\n", ring->space, n);
216#ifdef XF86DRI
217	 if (pI810->directRenderingEnabled) {
218	    DRIUnlock(screenInfo.screens[pScrn->scrnIndex]);
219	    DRICloseScreen(screenInfo.screens[pScrn->scrnIndex]);
220	 }
221#endif
222	 pI810->AccelInfoRec = NULL;	/* Stops recursive behavior */
223	 FatalError("lockup\n");
224      }
225
226      DELAY(10000);
227   }
228
229   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) {
230      now = GetTimeInMillis();
231      if (now - first) {
232	 ErrorF("Elapsed %d ms\n", now - first);
233	 ErrorF("space: %d wanted %d\n", ring->space, n);
234      }
235   }
236
237   return iters;
238}
239
240void
241I810Sync(ScrnInfoPtr pScrn)
242{
243   I810Ptr pI810 = I810PTR(pScrn);
244
245   if (I810_DEBUG & (DEBUG_VERBOSE_ACCEL | DEBUG_VERBOSE_SYNC))
246      ErrorF("I810Sync\n");
247
248#ifdef XF86DRI
249   /* VT switching tries to do this.
250    */
251   if (!pI810->LockHeld && pI810->directRenderingEnabled) {
252      return;
253   }
254#endif
255
256   /* Send a flush instruction and then wait till the ring is empty.
257    * This is stronger than waiting for the blitter to finish as it also
258    * flushes the internal graphics caches.
259    */
260   {
261      BEGIN_LP_RING(2);
262      OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE);
263      OUT_RING(0);			/* pad to quadword */
264      ADVANCE_LP_RING();
265   }
266
267   I810WaitLpRing(pScrn, pI810->LpRing->mem.Size - 8, 0);
268
269   pI810->LpRing->space = pI810->LpRing->mem.Size - 8;
270   pI810->nextColorExpandBuf = 0;
271}
272
273void
274I810SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop,
275		      unsigned int planemask)
276{
277   I810Ptr pI810 = I810PTR(pScrn);
278
279   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
280      ErrorF("I810SetupForFillRectSolid color: %x rop: %x mask: %x\n",
281	     color, rop, planemask);
282
283   /* Color blit, p166 */
284   pI810->BR[13] = (BR13_SOLID_PATTERN |
285		    (XAAGetPatternROP(rop) << 16) |
286		    (pScrn->displayWidth * pI810->cpp));
287   pI810->BR[16] = color;
288}
289
290void
291I810SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h)
292{
293   I810Ptr pI810 = I810PTR(pScrn);
294
295   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
296      ErrorF("I810SubsequentFillRectSolid %d,%d %dx%d\n", x, y, w, h);
297
298   {
299      BEGIN_LP_RING(6);
300
301      OUT_RING(BR00_BITBLT_CLIENT | BR00_OP_COLOR_BLT | 0x3);
302      OUT_RING(pI810->BR[13]);
303      OUT_RING((h << 16) | (w * pI810->cpp));
304      OUT_RING(pI810->bufferOffset +
305	       (y * pScrn->displayWidth + x) * pI810->cpp);
306
307      OUT_RING(pI810->BR[16]);
308      OUT_RING(0);			/* pad to quadword */
309
310      ADVANCE_LP_RING();
311   }
312}
313
314void
315I810SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir, int rop,
316			       unsigned int planemask, int transparency_color)
317{
318   I810Ptr pI810 = I810PTR(pScrn);
319
320   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
321      ErrorF("I810SetupForScreenToScreenCopy %d %d %x %x %d\n",
322	     xdir, ydir, rop, planemask, transparency_color);
323
324   pI810->BR[13] = (pScrn->displayWidth * pI810->cpp);
325
326   if (ydir == -1)
327      pI810->BR[13] = (-pI810->BR[13]) & 0xFFFF;
328   if (xdir == -1)
329      pI810->BR[13] |= BR13_RIGHT_TO_LEFT;
330
331   pI810->BR[13] |= XAAGetCopyROP(rop) << 16;
332
333   pI810->BR[18] = 0;
334}
335
336void
337I810SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1,
338				 int x2, int y2, int w, int h)
339{
340    I810Ptr pI810 = I810PTR(pScrn);
341    int src, dst;
342    int w_back = w;
343
344    if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
345	ErrorF( "I810SubsequentScreenToScreenCopy %d,%d - %d,%d %dx%d\n",
346		x1,y1,x2,y2,w,h);
347    /*
348     * This works around a bug in the i810 drawing engine.
349     * This was developed empirically so it may not catch all
350     * cases.
351     */
352#define I810_MWIDTH 8
353
354    if ( !(pI810->BR[13] & BR13_RIGHT_TO_LEFT) && (y2 - y1) < 3
355	 && (y2 - y1) >= 0 && (x2 - x1) <= (w + I810_MWIDTH)
356	 && (w > I810_MWIDTH))
357	w = I810_MWIDTH;
358    do {
359
360	if (pI810->BR[13] & BR13_PITCH_SIGN_BIT) {
361	    src = (y1 + h - 1) * pScrn->displayWidth * pI810->cpp;
362	    dst = (y2 + h - 1) * pScrn->displayWidth * pI810->cpp;
363	} else {
364	    src = y1 * pScrn->displayWidth * pI810->cpp;
365	    dst = y2 * pScrn->displayWidth * pI810->cpp;
366	}
367
368	if (pI810->BR[13] & BR13_RIGHT_TO_LEFT) {
369	    src += (x1 + w - 1) * pI810->cpp + pI810->cpp - 1;
370	    dst += (x2 + w - 1) * pI810->cpp + pI810->cpp - 1;
371	} else {
372	    src += x1 * pI810->cpp;
373	    dst += x2 * pI810->cpp;
374	}
375
376
377	/* SRC_COPY_BLT, p169 */
378	{
379	    BEGIN_LP_RING(6);
380	    OUT_RING( BR00_BITBLT_CLIENT | BR00_OP_SRC_COPY_BLT | 0x4 );
381	    OUT_RING( pI810->BR[13]);
382
383	    OUT_RING( (h << 16) | (w * pI810->cpp));
384	    OUT_RING( pI810->bufferOffset + dst);
385
386	    OUT_RING( pI810->BR[13] & 0xFFFF);
387	    OUT_RING( pI810->bufferOffset + src);
388	    ADVANCE_LP_RING();
389	}
390	w_back -= w;
391	if (w_back <= 0)
392	    break;
393	x2 += w;
394	x1 += w;
395	if (w_back > I810_MWIDTH)
396	    w = I810_MWIDTH;
397	else
398	    w = w_back;
399    }  while (1);
400}
401
402static void
403I810SetupForMono8x8PatternFill(ScrnInfoPtr pScrn, int pattx, int patty,
404			       int fg, int bg, int rop,
405			       unsigned int planemask)
406{
407   I810Ptr pI810 = I810PTR(pScrn);
408
409   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
410      ErrorF("I810SetupFor8x8PatternColorExpand\n");
411
412   /* FULL_MONO_PAT_BLT, p176 */
413   pI810->BR[0] = (BR00_BITBLT_CLIENT | BR00_OP_MONO_PAT_BLT | 0x9);
414   pI810->BR[18] = bg;
415   pI810->BR[19] = fg;
416   pI810->BR[13] = (pScrn->displayWidth * pI810->cpp);
417   pI810->BR[13] |= XAAGetPatternROP(rop) << 16;
418   if (bg == -1)
419      pI810->BR[13] |= BR13_MONO_PATN_TRANS;
420}
421
422static void
423I810SubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, int pattx, int patty,
424				     int x, int y, int w, int h)
425{
426   I810Ptr pI810 = I810PTR(pScrn);
427   int addr =
428	 pI810->bufferOffset + (y * pScrn->displayWidth + x) * pI810->cpp;
429
430   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
431      ErrorF("I810Subsequent8x8PatternColorExpand\n");
432
433   {
434      BEGIN_LP_RING(12);
435      OUT_RING(pI810->BR[0] | ((y << 5) & BR00_PAT_VERT_ALIGN));
436      OUT_RING(pI810->BR[13]);
437      OUT_RING((h << 16) | (w * pI810->cpp));
438      OUT_RING(addr);
439      OUT_RING(pI810->BR[13] & 0xFFFF);	/* src pitch */
440      OUT_RING(addr);			/* src addr */
441      OUT_RING(0);			/* transparency color */
442      OUT_RING(pI810->BR[18]);		/* bg */
443      OUT_RING(pI810->BR[19]);		/* fg */
444      OUT_RING(pattx);			/* pattern data */
445      OUT_RING(patty);
446      OUT_RING(0);
447      ADVANCE_LP_RING();
448   }
449}
450
451static void
452I810GetNextScanlineColorExpandBuffer(ScrnInfoPtr pScrn)
453{
454   I810Ptr pI810 = I810PTR(pScrn);
455   XAAInfoRecPtr infoPtr = pI810->AccelInfoRec;
456
457   if (pI810->nextColorExpandBuf == pI810->NumScanlineColorExpandBuffers)
458      I810Sync(pScrn);
459
460   infoPtr->ScanlineColorExpandBuffers[0] =
461	 pI810->ScanlineColorExpandBuffers[pI810->nextColorExpandBuf];
462
463   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
464      ErrorF("using color expand buffer %d\n", pI810->nextColorExpandBuf);
465
466   pI810->nextColorExpandBuf++;
467}
468
469static void
470I810SetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
471					       int fg, int bg, int rop,
472					       unsigned int planemask)
473{
474   I810Ptr pI810 = I810PTR(pScrn);
475
476   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
477      ErrorF("I810SetupForScanlineScreenToScreenColorExpand %d %d %x %x\n",
478	     fg, bg, rop, planemask);
479
480   pI810->BR[13] = (pScrn->displayWidth * pI810->cpp);
481   pI810->BR[13] |= XAAGetCopyROP(rop) << 16;
482   pI810->BR[13] |= (1 << 27);
483   if (bg == -1)
484      pI810->BR[13] |= BR13_MONO_TRANSPCY;
485
486   pI810->BR[18] = bg;
487   pI810->BR[19] = fg;
488
489   I810GetNextScanlineColorExpandBuffer(pScrn);
490}
491
492static void
493I810SubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
494						 int x, int y,
495						 int w, int h, int skipleft)
496{
497   I810Ptr pI810 = I810PTR(pScrn);
498
499   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
500      ErrorF("I810SubsequentScanlineCPUToScreenColorExpandFill "
501	     "%d,%d %dx%x %d\n", x, y, w, h, skipleft);
502
503   pI810->BR[0] = BR00_BITBLT_CLIENT | BR00_OP_MONO_SRC_COPY_BLT | 0x06;
504   pI810->BR[9] = (pI810->bufferOffset +
505		   (y * pScrn->displayWidth + x) * pI810->cpp);
506   pI810->BR[14] = ((1 << 16) | (w * pI810->cpp));
507   pI810->BR[11] = ((w + 31) / 32) - 1;
508}
509
510static void
511I810SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno)
512{
513   I810Ptr pI810 = I810PTR(pScrn);
514
515   pI810->BR[12] = (pI810->AccelInfoRec->ScanlineColorExpandBuffers[0] -
516		    pI810->FbBase);
517
518   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
519      ErrorF("I810SubsequentColorExpandScanline %d (addr %x)\n",
520	     bufno, pI810->BR[12]);
521
522   {
523      BEGIN_LP_RING(8);
524      OUT_RING(pI810->BR[0]);
525      OUT_RING(pI810->BR[13]);
526      OUT_RING(pI810->BR[14]);
527      OUT_RING(pI810->BR[9]);
528      OUT_RING(pI810->BR[11]);
529      OUT_RING(pI810->BR[12]);		/* srcaddr */
530      OUT_RING(pI810->BR[18]);
531      OUT_RING(pI810->BR[19]);
532      ADVANCE_LP_RING();
533   }
534
535   /* Advance to next scanline.
536    */
537   pI810->BR[9] += pScrn->displayWidth * pI810->cpp;
538   I810GetNextScanlineColorExpandBuffer(pScrn);
539}
540
541void
542I810EmitFlush(ScrnInfoPtr pScrn)
543{
544   I810Ptr pI810 = I810PTR(pScrn);
545
546   BEGIN_LP_RING(2);
547   OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE);
548   OUT_RING(0);
549   ADVANCE_LP_RING();
550}
551
552void
553I810SelectBuffer(ScrnInfoPtr pScrn, int buffer)
554{
555   I810Ptr pI810 = I810PTR(pScrn);
556
557   switch (buffer) {
558   case I810_SELECT_BACK:
559      pI810->bufferOffset = pI810->BackBuffer.Start;
560      break;
561   case I810_SELECT_DEPTH:
562      pI810->bufferOffset = pI810->DepthBuffer.Start;
563      break;
564   default:
565   case I810_SELECT_FRONT:
566      pI810->bufferOffset = pI810->FrontBuffer.Start;
567      break;
568   }
569
570   if (I810_DEBUG & DEBUG_VERBOSE_ACCEL)
571      ErrorF("I810SelectBuffer %d --> offset %x\n",
572	     buffer, pI810->bufferOffset);
573}
574
575void
576I810RefreshRing(ScrnInfoPtr pScrn)
577{
578   I810Ptr pI810 = I810PTR(pScrn);
579
580   pI810->LpRing->head = INREG(LP_RING + RING_HEAD) & HEAD_ADDR;
581   pI810->LpRing->tail = INREG(LP_RING + RING_TAIL);
582   pI810->LpRing->space = pI810->LpRing->head - (pI810->LpRing->tail + 8);
583   if (pI810->LpRing->space < 0)
584      pI810->LpRing->space += pI810->LpRing->mem.Size;
585
586   if (pI810->AccelInfoRec)
587      pI810->AccelInfoRec->NeedToSync = TRUE;
588}
589
590/* Emit on gaining VT?
591 */
592void
593I810EmitInvarientState(ScrnInfoPtr pScrn)
594{
595   I810Ptr pI810 = I810PTR(pScrn);
596
597   BEGIN_LP_RING(10);
598
599   OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE);
600   OUT_RING(GFX_CMD_CONTEXT_SEL | CS_UPDATE_USE | CS_USE_CTX0);
601   OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE);
602   OUT_RING(0);
603
604   OUT_RING(GFX_OP_COLOR_CHROMA_KEY);
605   OUT_RING(CC1_UPDATE_KILL_WRITE |
606	    CC1_DISABLE_KILL_WRITE |
607	    CC1_UPDATE_COLOR_IDX |
608	    CC1_UPDATE_CHROMA_LOW | CC1_UPDATE_CHROMA_HI | 0);
609   OUT_RING(0);
610   OUT_RING(0);
611
612/*     OUT_RING( CMD_OP_Z_BUFFER_INFO ); */
613/*     OUT_RING( pI810->DepthBuffer.Start | pI810->auxPitchBits); */
614
615   ADVANCE_LP_RING();
616}
617
618