static Bool I810_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode) { int index = pScrn->pScreen->myNum; I810Ptr pI810 = I810PTR(pScrn); MARKER(); if (!pMode) { /* restore the original mode */ DPRINTF(PFX, "Restoring original mode (from DGA mode)\n"); if (pI810->DGAactive) { pScrn->currentMode = I810SavedDGAModes[index]; pScrn->SwitchMode(index, pScrn->currentMode, 0); pScrn->AdjustFrame(index, 0, 0, 0); pI810->DGAactive = FALSE; } } else { if (!pI810->DGAactive) { DPRINTF(PFX, "Setting DGA mode\n"); I810SavedDGAModes[index] = pScrn->currentMode; pI810->DGAactive = TRUE; } pScrn->SwitchMode(index, pMode->mode, 0); } return TRUE; }
void I810DRISwapContext(ScreenPtr pScreen, DRISyncType syncType, DRIContextType oldContextType, void *oldContext, DRIContextType newContextType, void *newContext) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); I810Ptr pI810 = I810PTR(pScrn); if (syncType == DRI_3D_SYNC && oldContextType == DRI_2D_CONTEXT && newContextType == DRI_2D_CONTEXT) { if (I810_DEBUG & DEBUG_VERBOSE_DRI) ErrorF("I810DRISwapContext (in)\n"); if (!pScrn->vtSema) return; pI810->LockHeld = 1; I810RefreshRing(pScrn); } else if (syncType == DRI_2D_SYNC && oldContextType == DRI_NO_CONTEXT && newContextType == DRI_2D_CONTEXT) { pI810->LockHeld = 0; if (I810_DEBUG & DEBUG_VERBOSE_DRI) ErrorF("I810DRISwapContext (out)\n"); } else if (I810_DEBUG & DEBUG_VERBOSE_DRI) ErrorF("I810DRISwapContext (other)\n"); }
void I810XvMCDestroyContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext) { I810Ptr pI810 = I810PTR(pScrn); drmDestroyContext(pI810->drmSubFD,pI810->xvmcContext); pI810->xvmcContext = 0; }
static void I810SubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrn, int pattx, int patty, int x, int y, int w, int h) { I810Ptr pI810 = I810PTR(pScrn); int addr = pI810->bufferOffset + (y * pScrn->displayWidth + x) * pI810->cpp; if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) ErrorF("I810Subsequent8x8PatternColorExpand\n"); { BEGIN_LP_RING(12); OUT_RING(pI810->BR[0] | ((y << 5) & BR00_PAT_VERT_ALIGN)); OUT_RING(pI810->BR[13]); OUT_RING((h << 16) | (w * pI810->cpp)); OUT_RING(addr); OUT_RING(pI810->BR[13] & 0xFFFF); /* src pitch */ OUT_RING(addr); /* src addr */ OUT_RING(0); /* transparency color */ OUT_RING(pI810->BR[18]); /* bg */ OUT_RING(pI810->BR[19]); /* fg */ OUT_RING(pattx); /* pattern data */ OUT_RING(patty); OUT_RING(0); ADVANCE_LP_RING(); } }
static void I810SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno) { I810Ptr pI810 = I810PTR(pScrn); pI810->BR[12] = (pI810->AccelInfoRec->ScanlineColorExpandBuffers[0] - pI810->FbBase); if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) ErrorF("I810SubsequentColorExpandScanline %d (addr %x)\n", bufno, pI810->BR[12]); { BEGIN_LP_RING(8); OUT_RING(pI810->BR[0]); OUT_RING(pI810->BR[13]); OUT_RING(pI810->BR[14]); OUT_RING(pI810->BR[9]); OUT_RING(pI810->BR[11]); OUT_RING(pI810->BR[12]); /* srcaddr */ OUT_RING(pI810->BR[18]); OUT_RING(pI810->BR[19]); ADVANCE_LP_RING(); } /* Advance to next scanline. */ pI810->BR[9] += pScrn->displayWidth * pI810->cpp; I810GetNextScanlineColorExpandBuffer(pScrn); }
Bool I810BindGARTMemory(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); if (xf86AgpGARTSupported() && !pI810->directRenderingEnabled && !pI810->GttBound) { if (!xf86AcquireGART(pScrn->scrnIndex)) return FALSE; if (pI810->VramKey != -1 && !xf86BindGARTMemory(pScrn->scrnIndex, pI810->VramKey, pI810->VramOffset)) return FALSE; if (pI810->DcacheKey != -1 && !xf86BindGARTMemory(pScrn->scrnIndex, pI810->DcacheKey, pI810->DcacheOffset)) return FALSE; if (pI810->HwcursKey != -1 && !xf86BindGARTMemory(pScrn->scrnIndex, pI810->HwcursKey, pI810->HwcursOffset)) return FALSE; if (pI810->ARGBHwcursKey != -1 && !xf86BindGARTMemory(pScrn->scrnIndex, pI810->ARGBHwcursKey, pI810->ARGBHwcursOffset)) return FALSE; pI810->GttBound = 1; } return TRUE; }
Bool I810UnbindGARTMemory(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); if (xf86AgpGARTSupported() && !pI810->directRenderingEnabled && pI810->GttBound) { if (pI810->VramKey != -1 && !xf86UnbindGARTMemory(pScrn->scrnIndex, pI810->VramKey)) return FALSE; if (pI810->DcacheKey != -1 && !xf86UnbindGARTMemory(pScrn->scrnIndex, pI810->DcacheKey)) return FALSE; if (pI810->HwcursKey != -1 && !xf86UnbindGARTMemory(pScrn->scrnIndex, pI810->HwcursKey)) return FALSE; if (pI810->ARGBHwcursKey != -1 && !xf86UnbindGARTMemory(pScrn->scrnIndex, pI810->ARGBHwcursKey)) return FALSE; if (!xf86ReleaseGART(pScrn->scrnIndex)) return FALSE; pI810->GttBound = 0; } return TRUE; }
void I810Sync(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); if (I810_DEBUG & (DEBUG_VERBOSE_ACCEL | DEBUG_VERBOSE_SYNC)) ErrorF("I810Sync\n"); #ifdef XF86DRI /* VT switching tries to do this. */ if (!pI810->LockHeld && pI810->directRenderingEnabled) { return; } #endif /* Send a flush instruction and then wait till the ring is empty. * This is stronger than waiting for the blitter to finish as it also * flushes the internal graphics caches. */ { BEGIN_LP_RING(2); OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE); OUT_RING(0); /* pad to quadword */ ADVANCE_LP_RING(); } I810WaitLpRing(pScrn, pI810->LpRing.mem.Size - 8, 0); pI810->LpRing.space = pI810->LpRing.mem.Size - 8; pI810->nextColorExpandBuf = 0; }
/* This should be done *before* XAA syncs or fires its buffer. * Otherwise will have to fire it again??? */ static void I810DRIRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox) { I810Ptr pI810 = I810PTR(pScrn); int i; I810SAREAPtr pSAREAPriv = DRIGetSAREAPrivate(pScrn->pScreen); unsigned int br13; int cpp=2; /* Don't want to do this when no 3d is active and pages are * right-way-round */ if (!pSAREAPriv->pf_active && pSAREAPriv->pf_current_page == 0) return; br13 = (pI810->auxPitch) | (0xcc << 16); for (i = 0 ; i < num ; i++, pbox++) { unsigned int w = min(pbox->y2, pScrn->virtualY-1) - max(pbox->y1, 0) + 1; unsigned int h = min(pbox->x2, pScrn->virtualX-1) - max(pbox->x1, 0) + 1; unsigned int dst = max(pbox->x1, 0)*cpp + (max(pbox->y1, 0)*pI810->auxPitch); BEGIN_LP_RING(6); OUT_RING(BR00_BITBLT_CLIENT | BR00_OP_SRC_COPY_BLT | 0x4); OUT_RING(br13); OUT_RING( (h<<16) | (w*cpp) ); OUT_RING(pI810->BackBuffer.Start + dst); OUT_RING(br13 & 0xffff); OUT_RING(dst); ADVANCE_LP_RING(); } }
/* Emit on gaining VT? */ void I810EmitInvarientState(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); BEGIN_LP_RING(10); OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE); OUT_RING(GFX_CMD_CONTEXT_SEL | CS_UPDATE_USE | CS_USE_CTX0); OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE); OUT_RING(0); OUT_RING(GFX_OP_COLOR_CHROMA_KEY); OUT_RING(CC1_UPDATE_KILL_WRITE | CC1_DISABLE_KILL_WRITE | CC1_UPDATE_COLOR_IDX | CC1_UPDATE_CHROMA_LOW | CC1_UPDATE_CHROMA_HI | 0); OUT_RING(0); OUT_RING(0); /* OUT_RING( CMD_OP_Z_BUFFER_INFO ); */ /* OUT_RING( pI810->DepthBuffer.Start | pI810->auxPitchBits); */ ADVANCE_LP_RING(); }
static int I810_GetViewport(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); return pI810->DGAViewportStatus; }
static void I810EnablePageFlip(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); I810Ptr pI810 = I810PTR(pScrn); I810SAREAPtr pSAREAPriv = DRIGetSAREAPrivate(pScreen); int cpp=2; pSAREAPriv->pf_enabled = pI810->allowPageFlip; pSAREAPriv->pf_active = 0; if (pI810->allowPageFlip) { unsigned int br13 = pI810->auxPitch | (0xcc << 16); BEGIN_LP_RING(6); OUT_RING(BR00_BITBLT_CLIENT | BR00_OP_SRC_COPY_BLT | 0x4); OUT_RING(br13); OUT_RING((pScrn->virtualY << 16) | (pScrn->virtualX*cpp)); OUT_RING(pI810->BackBuffer.Start); OUT_RING(br13 & 0xFFFF); OUT_RING(0); ADVANCE_LP_RING(); pSAREAPriv->pf_active = 1; } }
void I810SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2, int w, int h) { I810Ptr pI810 = I810PTR(pScrn); int src, dst; int w_back = w; if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) ErrorF( "I810SubsequentScreenToScreenCopy %d,%d - %d,%d %dx%d\n", x1,y1,x2,y2,w,h); /* * This works around a bug in the i810 drawing engine. * This was developed empirically so it may not catch all * cases. */ if ( !(pI810->BR[13] & BR13_RIGHT_TO_LEFT) && (y2 - y1) < 3 && (y2 - y1) >= 0 && (x2 - x1) <= (w + 4) && (w > 4)) w = 4; do { if (pI810->BR[13] & BR13_PITCH_SIGN_BIT) { src = (y1 + h - 1) * pScrn->displayWidth * pI810->cpp; dst = (y2 + h - 1) * pScrn->displayWidth * pI810->cpp; } else { src = y1 * pScrn->displayWidth * pI810->cpp; dst = y2 * pScrn->displayWidth * pI810->cpp; } if (pI810->BR[13] & BR13_RIGHT_TO_LEFT) { src += (x1 + w - 1) * pI810->cpp + pI810->cpp - 1; dst += (x2 + w - 1) * pI810->cpp + pI810->cpp - 1; } else { src += x1 * pI810->cpp; dst += x2 * pI810->cpp; } /* SRC_COPY_BLT, p169 */ { BEGIN_LP_RING(6); OUT_RING( BR00_BITBLT_CLIENT | BR00_OP_SRC_COPY_BLT | 0x4 ); OUT_RING( pI810->BR[13]); OUT_RING( (h << 16) | (w * pI810->cpp)); OUT_RING( pI810->bufferOffset + dst); OUT_RING( pI810->BR[13] & 0xFFFF); OUT_RING( pI810->bufferOffset + src); ADVANCE_LP_RING(); } w_back -= w; if (w_back <= 0) break; x2 += w; x1 += w; w = w_back; } while (1); }
static void I810DRITransitionTo3d(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); I810Ptr pI810 = I810PTR(pScrn); I810EnablePageFlip(pScreen); pI810->have3DWindows = 1; }
Bool I810InitDma(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); I810RingBuffer *ring = pI810->LpRing; I810DRIPtr pI810DRI = (I810DRIPtr) pI810->pDRIInfo->devPrivate; drmI810Init info; memset(&info, 0, sizeof(drmI810Init)); info.ring_start = ring->mem.Start; info.ring_end = ring->mem.End; info.ring_size = ring->mem.Size; info.mmio_offset = (unsigned int)pI810DRI->regs; info.buffers_offset = (unsigned int)pI810->buffer_map; info.sarea_priv_offset = sizeof(XF86DRISAREARec); info.front_offset = 0; info.back_offset = pI810->BackBuffer.Start; info.depth_offset = pI810->DepthBuffer.Start; info.overlay_offset = pI810->OverlayStart; info.overlay_physical = pI810->OverlayPhysical; info.w = pScrn->virtualX; info.h = pScrn->virtualY; info.pitch = pI810->auxPitch; info.pitch_bits = pI810->auxPitchBits; /* We require DRM v1.2 or greater. Since DRM v1.2 broke compatibility * we created a new v1.4 that supports a new init function. Eventually the * old init function will go away. If you change the drm interface, make a * new init type too so that we can detect the new client. */ switch(i810_drm_version) { case ((1<<16) | 0): case ((1<<16) | 1): case ((1<<16) | 2): case ((1<<16) | 3): /* Use OLD drm < 1.4 init */ info.func = I810_INIT_DMA; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Init PRE v1.4 interface.\n"); break; default: case ((1<<16) | 4): /* DRM version 1.3 or greater init */ info.func = I810_INIT_DMA_1_4; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Init v1.4 interface.\n"); break; } if (drmCommandWrite(pI810->drmSubFD, DRM_I810_INIT, &info, sizeof(drmI810Init))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] I810 Dma Initialization failed.\n"); return FALSE; } return TRUE; }
static void I810_Sync(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); if (pI810->AccelInfoRec) { (*pI810->AccelInfoRec->Sync) (pScrn); } }
static void I810DRISetNeedSync(ScrnInfoPtr pScrn) { #ifdef HAVE_XAA_H I810Ptr pI810 = I810PTR(pScrn); if (pI810->AccelInfoRec) pI810->AccelInfoRec->NeedToSync = TRUE; #endif }
void I810EmitFlush(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); BEGIN_LP_RING(2); OUT_RING(INST_PARSER_CLIENT | INST_OP_FLUSH | INST_FLUSH_MAP_CACHE); OUT_RING(0); ADVANCE_LP_RING(); }
static void I810_FillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h, unsigned long color) { I810Ptr pI810 = I810PTR(pScrn); if (pI810->AccelInfoRec) { (*pI810->AccelInfoRec->SetupForSolidFill) (pScrn, color, GXcopy, ~0); (*pI810->AccelInfoRec->SubsequentSolidFillRect) (pScrn, x, y, w, h); SET_SYNC_FLAG(pI810->AccelInfoRec); } }
int I810XvMCCreateContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext, int *num_priv, long **priv ) { I810Ptr pI810 = I810PTR(pScrn); DRIInfoPtr pDRIInfo = pI810->pDRIInfo; I810XvMCCreateContextRec *contextRec; if(!pI810->directRenderingEnabled) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "I810XvMCCreateContext: Cannot use XvMC without DRI!\n"); return BadAlloc; } /* Context Already in use! */ if(pI810->xvmcContext) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "I810XvMCCreateContext: 2 XvMC Contexts Attempted, not supported.\n"); return BadAlloc; } *priv = calloc(1,sizeof(I810XvMCCreateContextRec)); contextRec = (I810XvMCCreateContextRec *)*priv; if(!*priv) { *num_priv = 0; return BadAlloc; } *num_priv = sizeof(I810XvMCCreateContextRec) >> 2; if(drmCreateContext(pI810->drmSubFD, &(contextRec->drmcontext) ) < 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "I810XvMCCreateContext: Unable to create DRMContext!\n"); free(*priv); return BadAlloc; } drmAuthMagic(pI810->drmSubFD, pContext->flags); pI810->xvmcContext = contextRec->drmcontext; contextRec->fbBase = pScrn->memPhysBase; /* Overlay Regs are at 1024 offset into the Cursor Space */ contextRec->OverlayOffset = pI810->CursorStart; contextRec->OverlaySize = 4096; contextRec->SurfacesOffset = pI810->MC.Start; contextRec->SurfacesSize = pI810->MC.Size; strncpy (contextRec->busIdString, pDRIInfo->busIdString, 9); return Success; }
void I810XvMCDestroySurface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf) { I810Ptr pI810 = I810PTR(pScrn); int i; for(i=0; i<I810_MAX_SURFACES; i++) { if(pI810->surfaceAllocation[i] == pSurf->surface_id) { pI810->surfaceAllocation[i] = 0; return; } } return; }
void I810XvMCDestroySubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSubp) { I810Ptr pI810 = I810PTR(pScrn); int i; for(i=pI810->numSurfaces; i<I810_MAX_SURFACES + I810_MAX_SUBPICTURES; i++) { if(pI810->surfaceAllocation[i] == pSubp->subpicture_id) { pI810->surfaceAllocation[i] = 0; return; } } return; }
void I810RefreshRing(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); pI810->LpRing.head = INREG(LP_RING + RING_HEAD) & HEAD_ADDR; pI810->LpRing.tail = INREG(LP_RING + RING_TAIL); pI810->LpRing.space = pI810->LpRing.head - (pI810->LpRing.tail + 8); if (pI810->LpRing.space < 0) pI810->LpRing.space += pI810->LpRing.mem.Size; pI810->AccelInfoRec->NeedToSync = TRUE; }
void I810DRICloseScreen(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); I810Ptr pI810 = I810PTR(pScrn); if (pI810->pDRIInfo) { I810DRIPtr pI810DRI = (I810DRIPtr) pI810->pDRIInfo->devPrivate; if (pI810DRI) { if (pI810DRI->irq) { drmCtlUninstHandler(pI810->drmSubFD); pI810DRI->irq = 0; } free(pI810->pDRIInfo->devPrivate); pI810->pDRIInfo->devPrivate = NULL; } I810CleanupDma(pScrn); DRICloseScreen(pScreen); DRIDestroyInfoRec(pI810->pDRIInfo); pI810->pDRIInfo = NULL; } if (pI810->dcacheHandle!=DRM_AGP_NO_HANDLE) drmAgpFree(pI810->drmSubFD, pI810->dcacheHandle); if (pI810->backHandle!=DRM_AGP_NO_HANDLE) drmAgpFree(pI810->drmSubFD, pI810->backHandle); if (pI810->zHandle!=DRM_AGP_NO_HANDLE) drmAgpFree(pI810->drmSubFD, pI810->zHandle); if (pI810->cursorHandle!=DRM_AGP_NO_HANDLE) drmAgpFree(pI810->drmSubFD, pI810->cursorHandle); if (pI810->xvmcHandle!=DRM_AGP_NO_HANDLE) drmAgpFree(pI810->drmSubFD, pI810->xvmcHandle); if (pI810->sysmemHandle!=DRM_AGP_NO_HANDLE) drmAgpFree(pI810->drmSubFD, pI810->sysmemHandle); if (pI810->agpAcquired == TRUE) drmAgpRelease(pI810->drmSubFD); pI810->backHandle = DRM_AGP_NO_HANDLE; pI810->zHandle = DRM_AGP_NO_HANDLE; pI810->cursorHandle = DRM_AGP_NO_HANDLE; pI810->xvmcHandle = DRM_AGP_NO_HANDLE; pI810->sysmemHandle = DRM_AGP_NO_HANDLE; pI810->agpAcquired = FALSE; pI810->dcacheHandle = DRM_AGP_NO_HANDLE; }
static void I810_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags) { I810Ptr pI810 = I810PTR(pScrn); vgaHWPtr hwp = VGAHWPTR(pScrn); pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, x, y)); /* wait for retrace */ while ((hwp->readST01(hwp) & 0x08)) ; while (!(hwp->readST01(hwp) & 0x08)) ; pI810->DGAViewportStatus = 0; }
static Bool I810_OpenFramebuffer(ScrnInfoPtr pScrn, char **name, unsigned char **mem, int *size, int *offset, int *flags) { I810Ptr pI810 = I810PTR(pScrn); *name = NULL; /* no special device */ *mem = (unsigned char *)pI810->LinearAddr; *size = pI810->FbMapSize; *offset = 0; *flags = DGA_NEED_ROOT; return TRUE; }
static void I810DRITransitionTo2d(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); I810Ptr pI810 = I810PTR(pScrn); I810SAREAPtr pSAREAPriv = DRIGetSAREAPrivate(pScreen); /* Try flipping back to the front page if necessary */ if (pSAREAPriv->pf_current_page == 1) drmCommandNone(pI810->drmSubFD, DRM_I810_FLIP); /* Shut down shadowing if we've made it back to the front page */ if (pSAREAPriv->pf_current_page == 0) { I810DisablePageFlip(pScreen); } pI810->have3DWindows = 0; }
void I810RefreshRing(ScrnInfoPtr pScrn) { I810Ptr pI810 = I810PTR(pScrn); pI810->LpRing->head = INREG(LP_RING + RING_HEAD) & HEAD_ADDR; pI810->LpRing->tail = INREG(LP_RING + RING_TAIL); pI810->LpRing->space = pI810->LpRing->head - (pI810->LpRing->tail + 8); if (pI810->LpRing->space < 0) pI810->LpRing->space += pI810->LpRing->mem.Size; #if HAVE_XAA_H if (pI810->AccelInfoRec) pI810->AccelInfoRec->NeedToSync = TRUE; #endif }
void I810SetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop, unsigned int planemask) { I810Ptr pI810 = I810PTR(pScrn); if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) ErrorF("I810SetupForFillRectSolid color: %x rop: %x mask: %x\n", color, rop, planemask); /* Color blit, p166 */ pI810->BR[13] = (BR13_SOLID_PATTERN | (i810PatternRop[rop] << 16) | (pScrn->displayWidth * pI810->cpp)); pI810->BR[16] = color; }
static void I810_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags) { I810Ptr pI810 = I810PTR(pScrn); vgaHWPtr hwp = VGAHWPTR(pScrn); MARKER(); pScrn->AdjustFrame(pScrn->pScreen->myNum, x, y, flags); /* wait for retrace */ while ((hwp->readST01(hwp) & 0x08)) ; while (!(hwp->readST01(hwp) & 0x08)) ; pI810->DGAViewportStatus = 0; }