Lines Matching refs:pI810
205 I810Ptr pI810 = I810PTR(scrn);
208 if (xf86ReturnOptValBool(pI810->Options, OPTION_NO_DDC, FALSE)) {
235 I810Ptr pI810;
251 pI810 = I810PTR(scrn);
253 pI810->pEnt = xf86GetEntityInfo(scrn->entityList[0]);
254 if (pI810->pEnt == NULL || pI810->pEnt->location.type != BUS_PCI)
258 I810ProbeDDC(scrn, pI810->pEnt->index);
270 pI810->PciInfo = xf86GetPciInfoForEntity(pI810->pEnt->index);
315 pI810->cpp = scrn->bitsPerPixel / 8;
319 if (!(pI810->Options = malloc(sizeof(I810Options))))
321 memcpy(pI810->Options, I810Options, sizeof(I810Options));
322 xf86ProcessOptions(scrn->scrnIndex, scrn->options, pI810->Options);
325 if (xf86ReturnOptValBool(pI810->Options, OPTION_DAC_6BIT, FALSE))
328 if (xf86ReturnOptValBool(pI810->Options, OPTION_SHOW_CACHE, FALSE))
329 pI810->showCache = TRUE;
331 pI810->showCache = FALSE;
334 if (xf86ReturnOptValBool(pI810->Options, OPTION_DAC_6BIT, FALSE) &&
338 ptr = xf86TokenToOptinfo(pI810->Options, OPTION_DAC_6BIT);
342 if (xf86ReturnOptValBool(pI810->Options, OPTION_NOACCEL, FALSE))
343 pI810->noAccel = TRUE;
345 if (!pI810->noAccel && !xf86LoadSubModule(scrn, "xaa"))
346 pI810->noAccel = TRUE;
349 pI810->directRenderingDisabled =
350 !xf86ReturnOptValBool(pI810->Options, OPTION_DRI, TRUE);
352 if (!pI810->directRenderingDisabled) {
356 pI810->directRenderingDisabled=TRUE;
365 I810DoDDC(scrn, pI810->pEnt->index);
369 pI810->LinearAddr = pI810->PciInfo->regions[0].base_addr;
371 (unsigned long)pI810->LinearAddr);
373 pI810->MMIOAddr = pI810->PciInfo->regions[1].base_addr;
375 (unsigned long)pI810->MMIOAddr);
392 pci_device_cfg_read_u32(pI810->PciInfo, & whtcfg_pamr_drp, WHTCFG_PAMR_DRP);
397 pI810->LmFreqSel = 133;
399 pI810->LmFreqSel = 100;
409 if (pI810->directRenderingDisabled || mem < 131072) /* < 128 MB */
418 if (pI810->pEnt->device->videoRam) {
419 scrn->videoRam = pI810->pEnt->device->videoRam;
451 pI810->FbMapSize = 0x1000000;
452 pI810->DepthOffset = 0x1000000;
453 pI810->BackOffset = 0x1800000;
455 pI810->FbMapSize = 0x3000000;
456 pI810->DepthOffset = 0x3000000;
457 pI810->BackOffset = 0x3800000;
473 pI810->MaxClock = 0;
474 if (pI810->pEnt->device->dacSpeeds[0]) {
477 pI810->MaxClock = pI810->pEnt->device->dacSpeeds[DAC_BPP8];
480 pI810->MaxClock = pI810->pEnt->device->dacSpeeds[DAC_BPP16];
483 pI810->MaxClock = pI810->pEnt->device->dacSpeeds[DAC_BPP24];
486 pI810->MaxClock = pI810->pEnt->device->dacSpeeds[DAC_BPP32];
489 if (!pI810->MaxClock)
490 pI810->MaxClock = pI810->pEnt->device->dacSpeeds[0];
494 pI810->MaxClock = 203000;
497 pI810->MaxClock = 163000;
500 pI810->MaxClock = 136000;
503 pI810->MaxClock = 86000;
510 clockRanges->maxClock = pI810->MaxClock;
552 if (!xf86ReturnOptValBool(pI810->Options, OPTION_SW_CURSOR, FALSE)) {
560 (pI810->Options, OPTION_COLOR_KEY, &(pI810->colorKey))) {
562 "video overlay key set to 0x%x\n", pI810->colorKey);
564 pI810->colorKey = (1 << scrn->offset.red) |
570 pI810->allowPageFlip=FALSE;
571 enable = xf86ReturnOptValBool(pI810->Options, OPTION_PAGEFLIP, FALSE);
574 if (!pI810->directRenderingDisabled) {
575 pI810->allowPageFlip = enable;
576 if (pI810->allowPageFlip == TRUE)
579 pI810->allowPageFlip = 0;
591 if (xf86GetOptValInteger(pI810->Options, OPTION_XVMC_SURFACES,
592 &(pI810->numSurfaces))) {
594 pI810->numSurfaces);
595 if (pI810->numSurfaces > 7) {
598 pI810->numSurfaces = 7;
600 if (pI810->numSurfaces < 6) {
603 pI810->numSurfaces = 6;
608 pI810->numSurfaces = 0;
613 if (xf86ReturnOptValBool(pI810->Options, OPTION_DRI, FALSE)) {
624 I810Ptr pI810 = I810PTR(scrn);
625 struct pci_device *const device = pI810->PciInfo;
629 pI810->MMIOAddr,
632 (void **) &pI810->MMIOBase);
646 I810Ptr pI810 = I810PTR(scrn);
647 struct pci_device *const device = pI810->PciInfo;
654 pI810->LinearAddr,
655 pI810->FbMapSize,
657 (void **) &pI810->FbBase);
666 pI810->LpRing->virtual_start = pI810->FbBase + pI810->LpRing->mem.Start;
674 I810Ptr pI810 = I810PTR(scrn);
676 pci_device_unmap_range (pI810->PciInfo, pI810->MMIOBase, I810_REG_SIZE);
677 pI810->MMIOBase = NULL;
683 I810Ptr pI810 = I810PTR(scrn);
685 pci_device_unmap_range (pI810->PciInfo, pI810->FbBase, pI810->FbMapSize);
686 pI810->FbBase = NULL;
696 I810Ptr pI810 = I810PTR(scrn);
733 I810Ptr pI810;
737 pI810 = I810PTR(scrn);
794 I810Ptr pI810;
798 pI810 = I810PTR(scrn);
799 DoSave(scrn, &hwp->SavedReg, &pI810->SavedReg, TRUE);
874 I810Ptr pI810;
880 pI810 = I810PTR(scrn);
1031 pI810->LpRing->head = 0;
1032 pI810->LpRing->tail = 0;
1065 I810Ptr pI810 = I810PTR(scrn);
1072 itemp |= pI810->LpRing->mem.Start;
1077 itemp |= ((pI810->LpRing->mem.Size - 4096) | RING_NO_REPORT | RING_VALID);
1085 I810Ptr pI810;
1088 pI810 = I810PTR(scrn);
1090 DoRestore(scrn, &hwp->SavedReg, &pI810->SavedReg, TRUE);
1109 I810Ptr pI810 = I810PTR(scrn);
1110 I810RegPtr i810Reg = &pI810->ModeReg;
1164 I810Ptr pI810 = I810PTR(scrn);
1165 I810RegPtr i810Reg = &pI810->ModeReg;
1204 if (xf86ReturnOptValBool(pI810->Options, OPTION_DAC_6BIT, FALSE))
1287 i810Reg->LprbStart = pI810->LpRing->mem.Start;
1290 i810Reg->LprbLen = ((pI810->LpRing->mem.Size - 4096) |
1302 I810Ptr pI810;
1305 pI810 = I810PTR(scrn);
1318 if (pI810->directRenderingEnabled) {
1320 pI810->LockHeld = 1;
1324 DoRestore(scrn, &hwp->ModeReg, &pI810->ModeReg, FALSE);
1327 if (pI810->directRenderingEnabled) {
1329 pI810->LockHeld = 0;
1449 I810Ptr pI810 = I810PTR(scrn);
1452 if (pI810->DoneFrontAlloc)
1455 memset(&(pI810->FbMemBox), 0, sizeof(BoxRec));
1457 pI810->FbMemBox.x1 = 0;
1458 pI810->FbMemBox.x2 = scrn->displayWidth;
1459 pI810->FbMemBox.y1 = 0;
1460 pI810->FbMemBox.y2 = scrn->virtualY;
1462 xf86GetOptValInteger(pI810->Options, OPTION_CACHE_LINES, &cache_lines);
1491 pI810->FbMemBox.y2 += cache_lines;
1501 if (!I810AllocLow(&(pI810->FrontBuffer),
1502 &(pI810->SysMem),
1503 ALIGN((pI810->FbMemBox.x2 * pI810->FbMemBox.y2 * pI810->cpp), 4096))) {
1509 memset(pI810->LpRing, 0, sizeof(I810RingBuffer));
1510 if (I810AllocLow(&(pI810->LpRing->mem), &(pI810->SysMem), 16 * 4096)) {
1511 pI810->LpRing->tail_mask = pI810->LpRing->mem.Size - 1;
1512 pI810->LpRing->virtual_start = pI810->FbBase + pI810->LpRing->mem.Start;
1513 pI810->LpRing->head = 0;
1514 pI810->LpRing->tail = 0;
1515 pI810->LpRing->space = 0;
1522 if (I810AllocLow(&pI810->Scratch, &(pI810->SysMem), 64 * 1024) ||
1523 I810AllocLow(&pI810->Scratch, &(pI810->SysMem), 16 * 1024)) {
1531 pI810->DoneFrontAlloc = TRUE;
1540 I810Ptr pI810;
1544 pI810 = I810PTR(scrn);
1547 pI810->LpRing = calloc(sizeof(I810RingBuffer),1);
1548 if (!pI810->LpRing) {
1565 I810RegPtr i810Reg = &pI810->ModeReg;
1583 * pI810->directRenderingDisabled is set once in PreInit. Reinitialise
1584 * pI810->directRenderingEnabled based on it each generation.
1586 pI810->directRenderingEnabled = !pI810->directRenderingDisabled;
1588 if (pI810->directRenderingEnabled==TRUE)
1589 pI810->directRenderingEnabled = I810DRIScreenInit(screen);
1592 pI810->directRenderingEnabled = FALSE;
1602 scrn->memPhysBase = (unsigned long)pI810->LinearAddr;
1605 vgaHWSetMmioFuncs(hwp, pI810->MMIOBase, 0);
1617 if (!fbScreenInit(screen, pI810->FbBase + scrn->fbOffset,
1643 if (pI810->LpRing->mem.Start == 0 && pI810->directRenderingEnabled) {
1644 pI810->directRenderingEnabled = FALSE;
1648 if (!pI810->directRenderingEnabled) {
1649 pI810->DoneFrontAlloc = FALSE;
1661 if (!xf86InitFBManager(screen, &(pI810->FbMemBox))) {
1667 if (pI810->LpRing->mem.Size != 0) {
1670 if (!pI810->noAccel && !I810AccelInit(screen)) {
1683 if (!xf86ReturnOptValBool(pI810->Options, OPTION_SW_CURSOR, FALSE)) {
1718 if (pI810->directRenderingEnabled) {
1722 pI810->directRenderingEnabled = I810DRIFinishScreenInit(screen);
1725 if ((pI810->directRenderingEnabled) && (pI810->numSurfaces)) {
1732 if (pI810->directRenderingEnabled) {
1739 pI810->CloseScreen = screen->CloseScreen;
1753 I810Ptr pI810 = I810PTR(scrn);
1768 if (pI810->directRenderingEnabled) {
1772 pI810->LockHeld = 1;
1775 if (pI810->AccelInfoRec != NULL) {
1778 pI810->AccelInfoRec->NeedToSync = FALSE;
1783 if (pI810->directRenderingEnabled) {
1792 pI810->LockHeld = 0;
1803 I810Ptr pI810 = I810PTR(scrn);
1808 if (pI810->showCache) {
1809 int lastline = pI810->FbMapSize /
1833 pI810->CursorOffset = (Base & 0x3) * 4;
1857 I810Ptr pI810 = I810PTR(scrn);
1870 if (pI810->directRenderingEnabled) {
1874 pI810->LockHeld = 0;
1889 I810Ptr pI810 = I810PTR(scrn);
1895 if (pI810->directRenderingEnabled) {
1899 pI810->LockHeld = 1;
1904 if (pI810->AccelInfoRec != NULL) {
1907 pI810->AccelInfoRec->NeedToSync = FALSE;
1927 I810Ptr pI810 = I810PTR(scrn);
1929 XAAInfoRecPtr infoPtr = pI810->AccelInfoRec;
1934 if (pI810->AccelInfoRec != NULL) {
1937 pI810->AccelInfoRec->NeedToSync = FALSE;
1944 if (pI810->directRenderingEnabled) {
1946 pI810->directRenderingEnabled = FALSE;
1959 if (pI810->ScanlineColorExpandBuffers) {
1960 free(pI810->ScanlineColorExpandBuffers);
1961 pI810->ScanlineColorExpandBuffers = NULL;
1969 pI810->AccelInfoRec = NULL;
1973 if (pI810->CursorInfoRec) {
1974 xf86DestroyCursorInfoRec(pI810->CursorInfoRec);
1975 pI810->CursorInfoRec = NULL;
1980 pI810->SysMem = pI810->SavedSysMem;
1981 pI810->DcacheMem = pI810->SavedDcacheMem;
1982 pI810->DoneFrontAlloc = FALSE;
1989 free(pI810->LpRing);
1990 pI810->LpRing = NULL;
1993 screen->CloseScreen = pI810->CloseScreen;
2030 I810Ptr pI810;
2035 pI810 = I810PTR(scrn);