Lines Matching refs:pApm

26 #define SETSOURCEXY(x,y)	do { int off = ((((y) & 0xFFFF) * pApm->CurrentLayout.displayWidth + ((x) & 0x3FFF)) * 3); SETSOURCEOFF(((off & 0xFFF000) << 4) | (off & 0xFFF)); break;} while(1)
27 #define SETDESTXY(x,y) do { int off = ((((y) & 0xFFFF) * pApm->CurrentLayout.displayWidth + ((x) & 0x3FFF)) * 3); SETDESTOFF(((off & 0xFFF000) << 4) | (off & 0xFFF)); break;} while(1)
30 #define UPDATEDEST(x,y) (void)(curr32[0x54 / 4] = ((((y) & 0xFFFF) * pApm->CurrentLayout.displayWidth + ((x) & 0xFFFF)) * 3))
101 A(WaitForFifo)(ApmPtr pApm, int slots)
103 if (!pApm->UsePCIRetry) {
129 A(WaitForFifo)(pApm, 3 + pApm->apmClip);
131 pApm->CurrentLayout.Setup_DEC);
133 A(WaitForFifo)(pApm, 2 + pApm->apmClip);
136 pApm->color = ((color & 0xFF0000) << 8) | ((color & 0xFF0000) >> 16) |
142 if (pApm->apmClip) {
144 pApm->apmClip = FALSE;
158 A(WaitForFifo)(pApm, 5);
160 A(WaitForFifo)(pApm, 4);
162 SETOFFSET(3*(pApm->CurrentLayout.displayWidth - w));
164 switch ((((y * pApm->CurrentLayout.displayWidth + x)* 3) / 8) % 3) {
166 SETFOREGROUNDCOLOR(pApm->color);
169 SETFOREGROUNDCOLOR((pApm->color << 8) | (pApm->color >> 16));
172 SETFOREGROUNDCOLOR(pApm->color >> 8);
178 A(WaitForFifo)(pApm, 3);
180 A(WaitForFifo)(pApm, 2);
187 SETDEC(DEC_START | DEC_OP_RECT | DEC_DEST_UPD_TRCORNER | pApm->CurrentLayout.Setup_DEC);
201 if (pApm->apmLock) {
209 pApm->apmLock = FALSE;
212 pApm->blitxdir = xdir;
213 pApm->blitydir = ydir;
215 pApm->apmTransparency = (transparency_color != -1);
218 A(WaitForFifo)(pApm, 2 + (transparency_color != -1));
220 (pApm->apmTransparency ? DEC_SOURCE_TRANSPARENCY : 0) | pApm->CurrentLayout.Setup_DEC |
224 A(WaitForFifo)(pApm, 1 + (transparency_color != -1));
239 u32 c = pApm->apmTransparency ? DEC_SOURCE_TRANSPARENCY : 0;
242 int i = y1 / pApm->CurrentLayout.Scanlines;
245 if (i && pApm->pixelStride) {
247 A(WaitForFifo)(pApm, 1);
252 pApm->apmClip = TRUE;
253 A(WaitForFifo)(pApm, 3);
257 w = (pApm->pixelStride * 8) / pApm->CurrentLayout.bitsPerPixel;
261 A(WaitForFifo)(pApm, 1 + pApm->apmClip);
263 if (pApm->apmClip)
265 pApm->apmClip = FALSE;
267 if (pApm->apmClip) {
268 A(WaitForFifo)(pApm, 1);
270 pApm->apmClip = FALSE;
275 if (pApm->pixelStride) {
276 x1 += (((y1 % pApm->CurrentLayout.Scanlines) - pApm->RushY[i - 1]) * pApm->pixelStride * 8) / pApm->CurrentLayout.bitsPerPixel;
277 y1 = pApm->RushY[i - 1];
280 y1 -= i * pApm->CurrentLayout.Scanlines;
282 if (pApm->blitxdir < 0)
299 if (pApm->blitydir < 0)
303 pApm->CurrentLayout.Setup_DEC;
312 pApm->CurrentLayout.Setup_DEC;
320 A(WaitForFifo)(pApm, 5);
322 A(WaitForFifo)(pApm, 4);
324 if (pApm->blitxdir == pApm->blitydir)
325 SETOFFSET(3 * (pApm->CurrentLayout.displayWidth - w));
327 SETOFFSET(3 * (pApm->CurrentLayout.displayWidth + w));
330 A(WaitForFifo)(pApm, 4);
332 A(WaitForFifo)(pApm, 3);
336 if (i && pApm->pixelStride) {
337 register unsigned int off = sx + sy * pApm->CurrentLayout.displayWidth;
345 UPDATEDEST(dx + (w + 1)*pApm->blitxdir, dy);
362 A(WaitForFifo)(pApm, 3 + pApm->apmClip);
367 pApm->apmTransparency = TRUE;
373 pApm->apmTransparency = FALSE;
405 wc = pApm->ScratchMemSize * 8;
419 A(WaitForFifo)(pApm, 3);
424 else if (pApm->apmClip) {
425 A(WaitForFifo)(pApm, 1);
428 pApm->apmClip = FALSE;
432 A(WaitForFifo)(pApm, 2);
433 if (pApm->apmTransparency)
436 DEC_SOURCE_CONTIG | DEC_SOURCE_TRANSPARENCY | pApm->CurrentLayout.Setup_DEC);
440 DEC_SOURCE_CONTIG | pApm->CurrentLayout.Setup_DEC);
442 A(WaitForFifo)(pApm, 1);
445 DEC_SOURCE_CONTIG | pApm->CurrentLayout.Setup_DEC;
446 if (pApm->apmTransparency)
460 if (pApm->ScratchMemPtr + nc * wrd * 4 < pApm->ScratchMemEnd) {
461 #define d ((memType)dstPtr - (memType)pApm->FbBase)
462 A(WaitForFifo)(pApm, 1);
463 dstPtr = (CARD32 *)pApm->ScratchMemPtr;
464 switch(pApm->CurrentLayout.bitsPerPixel) {
481 (*pApm->AccelInfoRec->Sync)(pScrn);
482 dstPtr = (CARD32 *)pApm->ScratchMemOffset;
483 SETSOURCEOFF(pApm->ScratchMem);
485 pApm->ScratchMemPtr = ((memType)(dstPtr + wrd * nc) + 4)
494 A(WaitForFifo)(pApm, 1);
510 if (pApm->ScratchMemPtr + nc * wrd * 4 < pApm->ScratchMemEnd) {
511 #define d ((memType)dstPtr - (memType)pApm->FbBase)
512 A(WaitForFifo)(pApm, 1);
513 dstPtr = (CARD32 *)pApm->ScratchMemPtr;
514 switch(pApm->CurrentLayout.bitsPerPixel) {
531 (*pApm->AccelInfoRec->Sync)(pScrn);
532 dstPtr = (CARD32 *)pApm->ScratchMemOffset;
533 SETSOURCEOFF(pApm->ScratchMem);
535 pApm->ScratchMemPtr = ((memType)(dstPtr + wrd * nc * 4) + 4) & ~7;
559 A(WaitForFifo)(pApm, 1);
580 if (pApm->ScratchMemPtr + h * wrd * 4 < pApm->ScratchMemEnd) {
581 #define d ((memType)dstPtr - (memType)pApm->FbBase)
582 A(WaitForFifo)(pApm, 1);
583 dstPtr = (CARD32 *)pApm->ScratchMemPtr;
584 switch(pApm->CurrentLayout.bitsPerPixel) {
601 (*pApm->AccelInfoRec->Sync)(pScrn);
602 dstPtr = (CARD32 *)pApm->ScratchMemOffset;
603 SETSOURCEOFF(pApm->ScratchMem);
605 pApm->ScratchMemPtr = ((memType)(dstPtr + wrd * h) + 4) & ~7;
613 A(WaitForFifo)(pApm, 1);
626 if (pApm->ScratchMemPtr + h * wrd * 4 < pApm->ScratchMemEnd) {
627 #define d ((memType)dstPtr - (memType)pApm->FbBase)
628 A(WaitForFifo)(pApm, 1);
629 dstPtr = (CARD32 *)pApm->ScratchMemPtr;
630 switch(pApm->CurrentLayout.bitsPerPixel) {
647 (*pApm->AccelInfoRec->Sync)(pScrn);
648 dstPtr = (CARD32 *)pApm->ScratchMemOffset;
649 SETSOURCEOFF(pApm->ScratchMem);
651 pApm->ScratchMemPtr = ((memType)(dstPtr + wrd * h) + 4) & ~7;
675 A(WaitForFifo)(pApm, 1);
683 pApm->apmClip = apmClip;
726 pApm->apmTransparency = (pApm->Chipset >= AT3D) && (bg == -1);
727 pApm->Bg8x8 = bg;
728 pApm->Fg8x8 = fg;
729 pApm->rop = apmROP[rop];
730 A(WaitForFifo)(pApm, 3 + pApm->apmClip);
736 if (pApm->Chipset >= AT3D)
740 if (pApm->apmClip) {
742 pApm->apmClip = FALSE;
755 A(WaitForFifo)(pApm, 6);
756 if (pApm->Chipset == AT24 && pApm->Bg8x8 != -1) {
757 SETROP(pApm->rop);
758 SETFOREGROUNDCOLOR(pApm->Bg8x8);
760 SETDEC(pApm->CurrentLayout.Setup_DEC | ((h == 1) ? DEC_OP_STRIP : DEC_OP_RECT) |
765 SETDEC(pApm->CurrentLayout.Setup_DEC | ((h == 1) ? DEC_OP_STRIP : DEC_OP_RECT) |
768 A(WaitForFifo)(pApm, 6);
769 SETROP((pApm->rop & 0xF0) | 0x0A);
770 SETFOREGROUNDCOLOR(pApm->Fg8x8);
774 SETDEC(pApm->CurrentLayout.Setup_DEC | ((h == 1) ? DEC_OP_STRIP : DEC_OP_RECT) |
776 (pApm->apmTransparency ? DEC_SOURCE_TRANSPARENCY : 0) |
781 SETDEC(pApm->CurrentLayout.Setup_DEC | ((h == 1) ? DEC_OP_STRIP : DEC_OP_RECT) |
783 (pApm->apmTransparency ? DEC_SOURCE_TRANSPARENCY : 0) |
799 pApm->apmTransparency = TRUE;
800 A(WaitForFifo)(pApm, 3);
802 A(WaitForFifo)(pApm, 4);
805 DEC_DEST_UPD_TRCORNER | pApm->CurrentLayout.Setup_DEC);
813 pApm->apmTransparency = FALSE;
814 A(WaitForFifo)(pApm, 3);
816 A(WaitForFifo)(pApm, 4);
819 DEC_QUICKSTART_ONDIMX | pApm->CurrentLayout.Setup_DEC);
840 pApm->CurrentLayout.Setup_DEC;
842 if (pApm->apmTransparency)
845 A(WaitForFifo)(pApm, 7);
847 A(WaitForFifo)(pApm, 6);
853 pApm->apmClip = TRUE;
875 pApm->apmTransparency = TRUE;
876 A(WaitForFifo)(pApm, 3);
878 A(WaitForFifo)(pApm, 4);
880 DEC_SOURCE_TRANSPARENCY | DEC_QUICKSTART_ONDIMX | pApm->CurrentLayout.Setup_DEC);
886 pApm->apmTransparency = FALSE;
887 A(WaitForFifo)(pApm, 2);
889 A(WaitForFifo)(pApm, 3);
891 DEC_QUICKSTART_ONDIMX | pApm->CurrentLayout.Setup_DEC);
910 DEC_START | pApm->CurrentLayout.Setup_DEC;
912 if (pApm->apmTransparency)
915 if (pApm->Chipset >= AT24)
916 A(WaitForFifo)(pApm, 7);
918 A(WaitForFifo)(pApm, 3);
920 if (pApm->Chipset >= AT24)
921 A(WaitForFifo)(pApm, 6);
923 A(WaitForFifo)(pApm, 3);
929 pApm->apmClip = TRUE;
930 if (pApm->Chipset < AT24)
931 A(WaitForFifo)(pApm, 4);
952 DEC_QUICKSTART_ONDIMX | DEC_DEST_UPD_TRCORNER | pApm->CurrentLayout.Setup_DEC;
955 DEC_START | DEC_DEST_UPD_TRCORNER | pApm->CurrentLayout.Setup_DEC;
958 if (pApm->apmTransparency)
961 if (srcy >= pApm->CurrentLayout.Scanlines) {
968 pCache = &pApm->apmCache[srcy / pApm->CurrentLayout.Scanlines - 1];
969 if (w != pCache->apmStippleCache.w * pApm->CurrentLayout.bitsPerPixel) {
970 A(WaitForFifo)(pApm, 3);
974 pApm->apmClip = TRUE;
975 w = pCache->apmStippleCache.w * pApm->CurrentLayout.bitsPerPixel;
983 else if (pApm->apmClip) {
984 A(WaitForFifo)(pApm, 1);
986 pApm->apmClip = FALSE;
989 srcy = pCache->apmStippleCache.y % pApm->CurrentLayout.Scanlines;
990 dist = srcx + srcy * pApm->CurrentLayout.displayWidth;
996 A(WaitForFifo)(pApm, 3);
1000 pApm->apmClip = TRUE;
1004 else if (pApm->apmClip) {
1005 A(WaitForFifo)(pApm, 1);
1007 pApm->apmClip = FALSE;
1010 A(WaitForFifo)(pApm, 4);
1032 pApm->CurrentLayout.Setup_DEC;
1034 u32 c = DEC_START | DEC_OP_VECT_ENDP | DEC_DEST_UPD_LASTPIX | pApm->CurrentLayout.Setup_DEC;
1040 A(WaitForFifo)(pApm, 5);
1078 if (pApm->apmClip)
1080 pApm->apmClip = FALSE;
1081 A(WaitForFifo)(pApm, 1);
1093 pApm->CurrentLayout.Setup_DEC;
1095 u32 c = DEC_START | DEC_OP_VECT_ENDP | DEC_DEST_UPD_LASTPIX | pApm->CurrentLayout.Setup_DEC;
1101 A(WaitForFifo)(pApm, 1);
1103 A(WaitForFifo)(pApm, 4);
1140 if (pApm->apmClip)
1142 pApm->apmClip = FALSE;
1143 A(WaitForFifo)(pApm, 1);
1154 A(WaitForFifo)(pApm, 3);
1158 pApm->apmClip = TRUE;
1162 A(SyncBlt)(ApmPtr pApm)
1164 int again = (pApm->Chipset == AP6422);
1180 unsigned char *dst = ((unsigned char *)pApm->FbBase) + x * Bpp + y * pApm->CurrentLayout.bytesPerScanline;
1190 (*pApm->AccelInfoRec->Sync)(pScrn);
1211 dst += pApm->CurrentLayout.bytesPerScanline;
1223 dst += pApm->CurrentLayout.bytesPerScanline;
1235 dst += pApm->CurrentLayout.bytesPerScanline;
1249 dst += pApm->CurrentLayout.bytesPerScanline;
1279 mask = (pApm->CurrentLayout.bitsPerPixel / 8) - 1;
1304 A(SyncBlt)(pApm);
1305 *(CARD32*)pApm->BltMap = *(CARD32*)src;
1315 if (pApm->Chipset == AP6422) /* See remark in Sync6422 */
1320 *(CARD32*)pApm->BltMap = 0x00000000;
1328 A(SyncBlt)(pApm);
1329 *(CARD32*)pApm->BltMap = *(CARD32*)src;
1333 A(SyncBlt)(pApm);
1334 *((CARD32*)pApm->BltMap) = *((CARD32*)src) >> shift;
1337 pApm->apmClip = FALSE;
1338 A(WaitForFifo)(pApm, 1);
1404 pApm->apmTransparency = TRUE;
1405 A(WaitForFifo)(pApm, 2 + pApm->apmClip);
1407 A(WaitForFifo)(pApm, 3 + pApm->apmClip);
1408 SETDEC(pApm->CurrentLayout.Setup_DEC | DEC_OP_BLT |
1416 pApm->apmTransparency = FALSE;
1417 A(WaitForFifo)(pApm, 1 + pApm->apmClip);
1419 A(WaitForFifo)(pApm, 2 + pApm->apmClip);
1420 SETDEC(pApm->CurrentLayout.Setup_DEC | DEC_OP_BLT |
1424 if (pApm->apmClip) {
1426 pApm->apmClip = FALSE;
1439 A(WaitForFifo)(pApm, 5);
1441 A(WaitForFifo)(pApm, 4);
1448 SETDEC(pApm->CurrentLayout.Setup_DEC | DEC_OP_BLT |
1449 DEC_DEST_XY | (pApm->apmTransparency * DEC_SOURCE_TRANSPARENCY) |
1474 if (pApm->apmClip) {
1476 pApm->apmClip = FALSE;
1509 if (pApm->apmClip) {
1511 pApm->apmClip = FALSE;