Lines Matching refs:pApm
48 struct ApmStippleCacheRec *pApm = (struct ApmStippleCacheRec *)to->devPrivate.ptr;
50 pApm->apmStippleCache.x = to->box.x1;
51 pApm->apmStippleCache.y += to->box.y1 - from->box.y1;
76 if ((pApm->apmCache[i].apmStippleCache.serialNumber == pPix->drawable.serialNumber)
77 && pApm->apmCache[i].apmStippleCached &&
78 (pApm->apmCache[i].apmStippleCache.fg == -1) &&
79 (pApm->apmCache[i].apmStippleCache.bg == -1)) {
80 pApm->apmCache[i].apmStippleCache.trans_color = -1;
81 return &pApm->apmCache[i].apmStippleCache;
83 if ((i = ++pApm->apmCachePtr) >= APM_CACHE_NUMBER)
84 i = pApm->apmCachePtr = 0;
85 pCache = &pApm->apmCache[i];
91 draw = xf86AllocateLinearOffscreenArea(pApm->pScreen, (W * h + 7) / 8,
92 (pApm->CurrentLayout.mask32 + 1) << 1,
105 pCache->apmStippleCache.y = draw->box.y1 + ((pCache - pApm->apmCache) + 1) * pApm->CurrentLayout.Scanlines;
124 dstPtr = ((CARD32 *)pApm->FbBase) + (draw->box.x1 +
125 draw->box.y1*pApm->CurrentLayout.bytesPerScanline) / 4;
206 void ApmAccelReserveSpace(ApmPtr pApm)
210 mem = xf86ScreenToScrn(pApm->pScreen)->videoRam << 10;
214 ScratchMemOffset = ((mem - pApm->OffscreenReserved) /
215 pApm->CurrentLayout.bytesPerScanline - 4) *
216 pApm->CurrentLayout.bytesPerScanline;
217 pApm->ScratchMemSize= mem - ScratchMemOffset - pApm->OffscreenReserved;
218 pApm->ScratchMemPtr = pApm->ScratchMemOffset
219 = (memType)pApm->FbBase + ScratchMemOffset;
220 pApm->ScratchMemEnd = (memType)pApm->FbBase + mem - pApm->OffscreenReserved;
235 pApm->AccelInfoRec = pXAAinfo = XAACreateInfoRec();
240 ScratchMemOffset = pApm->ScratchMemOffset - (memType)pApm->FbBase;
241 switch (pApm->CurrentLayout.bitsPerPixel) {
244 pApm->ScratchMemWidth =
245 (mem - ScratchMemOffset - pApm->OffscreenReserved) / 1;
246 pApm->ScratchMem =
252 pApm->ScratchMemWidth =
253 (mem - ScratchMemOffset - pApm->OffscreenReserved) / 2;
254 pApm->ScratchMem =
260 pApm->ScratchMemWidth =
261 (mem - ScratchMemOffset - pApm->OffscreenReserved) / 4;
262 pApm->ScratchMem =
267 pApm->OffscreenReserved = mem - ScratchMemOffset;
272 if (pApm->Chipset == AP6422)
284 for (i = 0; i < sizeof(pApm->regcurr) / 4; i++)
301 ApmSetupXAAInfo(pApm, pXAAinfo);
303 pApm->SetupForSolidFill = ApmSetupForSolidFill;
304 pApm->SubsequentSolidFillRect = ApmSubsequentSolidFillRect;
305 pApm->SetupForSolidFill24 = ApmSetupForSolidFill24;
306 pApm->SubsequentSolidFillRect24 = ApmSubsequentSolidFillRect24;
307 pApm->SetupForScreenToScreenCopy = ApmSetupForScreenToScreenCopy;
308 pApm->SubsequentScreenToScreenCopy = ApmSubsequentScreenToScreenCopy;
309 pApm->SetupForScreenToScreenCopy24 = ApmSetupForScreenToScreenCopy24;
310 pApm->SubsequentScreenToScreenCopy24= ApmSubsequentScreenToScreenCopy24;
317 if (!pApm->CreatePixmap) {
318 pApm->CreatePixmap = pScreen->CreatePixmap;
319 pApm->DestroyPixmap = pScreen->DestroyPixmap;
325 pXAAinfo->CachePixelGranularity = (pApm->CurrentLayout.mask32 + 1) << 1;
329 AvailFBArea.y2 = (pScrn->videoRam * 1024 - pApm->OffscreenReserved) /
334 bzero(pApm->apmCache, sizeof pApm->apmCache);
339 void ApmSetupXAAInfo(ApmPtr pApm, XAAInfoRecPtr pXAAinfo)
341 pApm->CurrentLayout.Setup_DEC = 0;
342 switch(pApm->CurrentLayout.bitsPerPixel)
345 pApm->CurrentLayout.Setup_DEC |= DEC_BITDEPTH_8;
348 pApm->CurrentLayout.Setup_DEC |= DEC_BITDEPTH_16;
352 pApm->CurrentLayout.Setup_DEC |= DEC_BITDEPTH_24 | DEC_SOURCE_LINEAR |
356 pApm->CurrentLayout.Setup_DEC |= DEC_BITDEPTH_32;
359 xf86DrvMsg(xf86ScreenToScrn(pApm->pScreen)->scrnIndex, X_WARNING,
361 pApm->CurrentLayout.bitsPerPixel);
365 switch(pApm->CurrentLayout.displayWidth)
368 pApm->CurrentLayout.Setup_DEC |= DEC_WIDTH_640;
371 pApm->CurrentLayout.Setup_DEC |= DEC_WIDTH_800;
374 pApm->CurrentLayout.Setup_DEC |= DEC_WIDTH_1024;
377 pApm->CurrentLayout.Setup_DEC |= DEC_WIDTH_1152;
380 pApm->CurrentLayout.Setup_DEC |= DEC_WIDTH_1280;
383 pApm->CurrentLayout.Setup_DEC |= DEC_WIDTH_1600;
386 xf86DrvMsg(xf86ScreenToScrn(pApm->pScreen)->scrnIndex, X_WARNING,
388 "for screen width = %d\n", pApm->CurrentLayout.displayWidth);
401 if (pApm->CurrentLayout.bitsPerPixel != 24) {
403 if (pApm->Chipset < AT24)
422 if ((pApm->Chipset == AT24 && pApm->ChipRev >= 4) ||
423 pApm->Chipset == AT3D) {
430 pXAAinfo->ColorExpandBase = pApm->BltMap;
431 pXAAinfo->ColorExpandRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
440 pXAAinfo->ImageWriteBase = pApm->BltMap;
441 pXAAinfo->ImageWriteRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
470 if (pApm->Chipset >= AT24) {
479 if (pApm->CurrentLayout.bitsPerPixel == 8) {
510 if (pApm->Chipset == AT3D && pApm->ChipRev >= 4) {
517 pXAAinfo->ColorExpandBase = pApm->BltMap;
526 pXAAinfo->ImageWriteBase = pApm->BltMap;