Lines Matching defs:pTrident

511     TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
512 unsigned long vgaIOBase = pTrident->PIOBase + VGAHWPTR(pScrn)->IOBase;
525 outb(pTrident->PIOBase + 0x3C4, 0x0B);
526 inb(pTrident->PIOBase + 0x3C5);
529 if (pTrident->Chipset > PROVIDIA9685) {
530 outb(pTrident->PIOBase + 0x3C4, Protection);
531 protect = inb(pTrident->PIOBase + 0x3C5);
532 outb(pTrident->PIOBase + 0x3C5, 0x92);
534 outb(pTrident->PIOBase + 0x3C4, NewMode1);
535 temp = inb(pTrident->PIOBase + 0x3C5);
536 outb(pTrident->PIOBase + 0x3C5, 0x80);
540 pTrident->REGPCIReg = inb(vgaIOBase + 5);
541 outb(vgaIOBase + 5, pTrident->REGPCIReg | 0x01); /* Enable it */
544 if (pTrident->Chipset > PROVIDIA9685) {
557 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
574 if (pTrident->Chipset > PROVIDIA9685) {
582 pTrident->REGPCIReg = INB(vgaIOBase + 5);
583 OUTB(vgaIOBase + 5, pTrident->REGPCIReg & 0xFE);
586 if (pTrident->Chipset > PROVIDIA9685) {
587 outb(pTrident->PIOBase + 0x3C4, Protection);
588 outb(pTrident->PIOBase + 0x3C5, protect);
590 outb(pTrident->PIOBase + 0x3C4, NewMode1);
591 outb(pTrident->PIOBase + 0x3C5, temp);
618 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
696 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
735 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
781 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
782 switch (pTrident->Chipset) {
801 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
802 switch (pTrident->Chipset) {
821 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
822 switch (pTrident->Chipset) {
847 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
851 if (pTrident->vbeModes) {
853 vbesr.stateMode = VBECalcVbeModeIndex(pTrident->vbeModes,
859 VBEVesaSaveRestore(pTrident->pVbe,&vbesr,MODE_RESTORE);
872 if (pTrident->IsCyber && pTrident->lcdMode && pTrident->Int10) {
873 int i = pTrident->lcdMode;
876 if (pTrident->lcdActive) { /* LCD Active ?*/
884 pTrident->Int10->ax = 0x3;
885 pTrident->Int10->num = 0x10;
888 xf86ExecX86int10(pTrident->Int10);
944 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
954 switch (pTrident->Chipset) {
978 if (pTrident->MUX &&
1032 tridentReg = &pTrident->ModeReg;
1047 if (pTrident->TVChipset != 0)
1086 TRIDENTPtr pTrident;
1090 pTrident = TRIDENTPTR(pScrn);
1092 tridentReg = &pTrident->SavedReg;
1102 if (pTrident->TVChipset != 0)
1115 TRIDENTPtr pTrident;
1119 pTrident = TRIDENTPTR(pScrn);
1121 tridentReg = &pTrident->SavedReg;
1133 if (pTrident->TVChipset != 0)
1157 TRIDENTPtr pTrident;
1162 pTrident = TRIDENTPTR(pScrn);
1204 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
1212 if (pTrident->InitializeAccelerator)
1213 pTrident->InitializeAccelerator(pScrn);
1231 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
1235 if (!pTrident->NoAccel && !pTrident->useEXA)
1236 pTrident->AccelInfoRec->Sync(pScrn);
1239 if (!pTrident->NoAccel && pTrident->useEXA)
1240 pTrident->EXADriverPtr->WaitMarker(pScrn->pScreen, 0);
1274 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
1276 if (pTrident->lcdActive && (pTrident->lcdMode != 0xff)){
1277 if (((mode->HDisplay > LCD[pTrident->lcdMode].display_x)
1278 || (mode->VDisplay > LCD[pTrident->lcdMode].display_y))) {
1283 LCD[pTrident->lcdMode].display_x,
1284 LCD[pTrident->lcdMode].display_y);
1301 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
1348 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
1350 pScreen->BlockHandler = pTrident->BlockHandler;
1354 if(pTrident->VideoTimerCallback) {
1356 (*pTrident->VideoTimerCallback)(pScrn, currentTime.milliseconds);
1376 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
1393 pTrident->SaveClock1 = INB(0x3CC);
1394 if (pTrident->Chipset != TVGA8800CS) {
1396 (pTrident->Chipset != TVGA9000) &&
1397 (pTrident->Chipset != TVGA9000i) )
1400 OUTB(0x3C4, 0x0E); pTrident->SaveClock3 = INB(0x3C5);
1404 OUTB(0x3C4, 0x0D); pTrident->SaveClock2 = INB(0x3C5);
1408 OUTB(0x3C2, pTrident->SaveClock1);
1409 if (pTrident->Chipset != TVGA8800CS) {
1411 (pTrident->Chipset != TVGA9000) &&
1412 (pTrident->Chipset != TVGA9000i) )
1415 OUTW(0x3C4, (pTrident->SaveClock3 << 8) | 0x0E);
1419 OUTW(0x3C4, (pTrident->SaveClock2 << 8) | 0x0D);
1428 if (pTrident->Chipset != TVGA8800CS) {
1430 (pTrident->Chipset != TVGA9000) &&
1431 (pTrident->Chipset != TVGA9000i) )
1454 if ( (pTrident->Chipset == TVGA9000) ||
1455 (pTrident->Chipset == TVGA9000i) )
1566 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
1574 pTrident->IOBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
1575 pTrident->PciTag, pTrident->IOAddress, mapsize);
1578 void **result = (void **)&pTrident->IOBase;
1579 int err = pci_device_map_range(pTrident->PciInfo,
1580 pTrident->IOAddress,
1593 pTrident->IOBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO,
1594 pTrident->PciTag, pTrident->IOAddress, 0x1000);
1595 pTrident->IOBase += 0xF00;
1601 if (pTrident->IOBase == NULL)
1605 if (pTrident->FbMapSize != 0) {
1607 pTrident->FbBase = xf86MapPciMem(pScrn->scrnIndex,
1609 pTrident->PciTag,
1610 (unsigned long)pTrident->FbAddress,
1611 pTrident->FbMapSize);
1614 void **result = (void **)&pTrident->FbBase;
1615 int err = pci_device_map_range(pTrident->PciInfo,
1616 pTrident->FbAddress,
1617 pTrident->FbMapSize,
1628 if (pTrident->FbBase == NULL)
1633 pTrident->FbBase = hwp->Base;
1645 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
1654 pci_device_unmap_range(pTrident->PciInfo, (pointer)pTrident->IOBase, mapsize);
1657 xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pTrident->IOBase, mapsize);
1659 pTrident->IOBase -= 0xF00;
1660 xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pTrident->IOBase, 0x1000);
1663 pTrident->IOBase = NULL;
1666 if (pTrident->FbMapSize != 0) {
1668 pci_device_unmap_range(pTrident->PciInfo, (pointer)pTrident->FbBase, pTrident->FbMapSize);
1670 xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pTrident->FbBase,
1671 pTrident->FbMapSize);
1673 pTrident->FbBase = NULL;
1689 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
1694 if (pTrident->Chipset >= BLADEXP) {
1853 TRIDENTPtr pTrident;
1874 pTrident = TRIDENTPTR(pScrn);
1875 pTrident->pScrn = pScrn;
1881 pTrident->pEnt = xf86GetEntityInfo(pScrn->entityList[i]);
1883 if (pTrident->pEnt->resources) return FALSE;
1885 pTrident->Chipset = pTrident->pEnt->chipset;
1887 pTrident->pEnt->chipset);
1889 if (pTrident->pEnt->location.type == BUS_PCI) {
1890 pTrident->PciInfo = xf86GetPciInfoForEntity(pTrident->pEnt->index);
1892 pTrident->PciTag = PCI_DEV_TAG(pTrident->PciInfo);
1894 pTrident->Linear = TRUE;
1896 pTrident->Linear = FALSE;
1901 TRIDENTProbeDDC(pScrn, pTrident->pEnt->index);
1974 pTrident->PIOBase = hwp->PIOOffset;
1976 pTrident->PIOBase = 0;
1980 xf86SetOperatingState(resVga, pTrident->pEnt->index, ResUnusedOpr);
2031 if (!(pTrident->Options = malloc(sizeof(TRIDENTOptions))))
2033 memcpy(pTrident->Options, TRIDENTOptions, sizeof(TRIDENTOptions));
2034 xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pTrident->Options);
2042 if (xf86GetOptValInteger(pTrident->Options, OPTION_RGB_BITS,
2051 pTrident->useEXA = FALSE;
2052 if ((s = (char *)xf86GetOptValString(pTrident->Options,
2055 pTrident->useEXA = TRUE;
2059 pTrident->useEXA = FALSE;
2064 pTrident->useEXA ? "EXA" : "XAA");
2066 pTrident->HWCursor = TRUE;
2067 if (xf86ReturnOptValBool(pTrident->Options, OPTION_SW_CURSOR, FALSE)) {
2069 pTrident->HWCursor = FALSE;
2071 if (xf86ReturnOptValBool(pTrident->Options, OPTION_NOACCEL, FALSE)) {
2072 pTrident->NoAccel = TRUE;
2075 if (xf86ReturnOptValBool(pTrident->Options, OPTION_PCI_RETRY, FALSE)) {
2076 pTrident->UsePCIRetry = TRUE;
2079 pTrident->UsePCIBurst = TRUE;
2080 if (xf86ReturnOptValBool(pTrident->Options, OPTION_NOPCIBURST, FALSE)) {
2081 pTrident->UsePCIBurst = FALSE;
2085 if(xf86GetOptValInteger(pTrident->Options, OPTION_VIDEO_KEY,
2086 &(pTrident->videoKey))) {
2088 pTrident->videoKey);
2090 pTrident->videoKey = (1 << pScrn->offset.red) |
2095 if (xf86ReturnOptValBool(pTrident->Options, OPTION_NOMMIO, FALSE)) {
2096 pTrident->NoMMIO = TRUE;
2099 if (xf86ReturnOptValBool(pTrident->Options, OPTION_MMIO_ONLY, FALSE)) {
2100 if (pTrident->NoMMIO)
2104 pTrident->MMIOonly = TRUE;
2109 pTrident->dspOverride = 0;
2110 if ((s = xf86GetOptValString(pTrident->Options, OPTION_DISPLAY))) {
2112 pTrident->dspOverride = CRT_ACTIVE;
2115 pTrident->dspOverride = LCD_ACTIVE;
2118 pTrident->dspOverride = LCD_ACTIVE | CRT_ACTIVE;
2124 if ((s = xf86GetOptValString(pTrident->Options, OPTION_GB))) {
2150 pTrident->GammaBrightnessOn = TRUE;
2151 pTrident->gamma = gamma;
2152 pTrident->brightness = brightness;
2159 pTrident->FPDelay = 7; /* invalid value */
2160 if (xf86GetOptValInteger(pTrident->Options, OPTION_FP_DELAY,
2161 &pTrident->FPDelay)) {
2162 if (pTrident->FPDelay < -2 || pTrident->FPDelay > 5) {
2164 "(-2 < FPDelay < 5)\n",pTrident->FPDelay);
2165 pTrident->FPDelay = 7;
2168 pTrident->FPDelay);
2170 if (xf86ReturnOptValBool(pTrident->Options, OPTION_CYBER_SHADOW, FALSE)) {
2171 pTrident->CyberShadow = TRUE;
2174 if (xf86ReturnOptValBool(pTrident->Options, OPTION_CYBER_STRETCH, FALSE)) {
2175 pTrident->CyberStretch = TRUE;
2179 pTrident->MUXThreshold = 90000; /* 90MHz */
2180 if (xf86GetOptValInteger(pTrident->Options, OPTION_MUX_THRESHOLD,
2181 &pTrident->MUXThreshold)) {
2183 pTrident->MUXThreshold);
2185 pTrident->OverrideHsync = 0;
2186 if (xf86GetOptValInteger(pTrident->Options, OPTION_XV_HSYNC,
2187 &pTrident->OverrideHsync)) {
2189 pTrident->OverrideHsync);
2191 pTrident->OverrideVsync = 0;
2192 if (xf86GetOptValInteger(pTrident->Options, OPTION_XV_VSYNC,
2193 &pTrident->OverrideVsync)) {
2195 pTrident->OverrideVsync);
2197 pTrident->OverrideHsync = 0;
2198 if (xf86GetOptValInteger(pTrident->Options, OPTION_XV_HSYNC,
2199 &pTrident->OverrideHsync)) {
2201 pTrident->OverrideHsync);
2203 pTrident->OverrideVsync = 0;
2204 if (xf86GetOptValInteger(pTrident->Options, OPTION_XV_VSYNC,
2205 &pTrident->OverrideVsync)) {
2207 pTrident->OverrideVsync);
2209 pTrident->OverrideRskew = 0;
2210 if (xf86GetOptValInteger(pTrident->Options, OPTION_XV_RSKEW,
2211 &pTrident->OverrideRskew)) {
2213 pTrident->OverrideRskew);
2215 pTrident->OverrideBskew = 0;
2216 if (xf86GetOptValInteger(pTrident->Options, OPTION_XV_BSKEW,
2217 &pTrident->OverrideBskew)) {
2219 pTrident->OverrideBskew);
2221 if (xf86ReturnOptValBool(pTrident->Options, OPTION_SHADOW_FB, FALSE)) {
2226 pTrident->ShadowFB = TRUE;
2227 pTrident->NoAccel = TRUE;
2232 pTrident->Rotate = 0;
2233 if ((s = xf86GetOptValString(pTrident->Options, OPTION_ROTATE))) {
2240 pTrident->ShadowFB = TRUE;
2241 pTrident->NoAccel = TRUE;
2242 pTrident->HWCursor = FALSE;
2243 pTrident->Rotate = 1;
2247 pTrident->ShadowFB = TRUE;
2248 pTrident->NoAccel = TRUE;
2249 pTrident->HWCursor = FALSE;
2250 pTrident->Rotate = -1;
2262 pTrident->TVChipset = 0;
2263 if ((s = xf86GetOptValString(pTrident->Options, OPTION_TV_CHIPSET))) {
2265 pTrident->TVChipset = 1;
2268 pTrident->TVChipset = 2;
2275 pTrident->TVSignalMode=0;
2276 if (xf86GetOptValInteger(pTrident->Options, OPTION_TV_SIGNALMODE,
2277 &pTrident->TVSignalMode)) {
2278 ErrorF("TV SignalMode set to %d\n",pTrident->TVSignalMode);
2282 if (!UseMMIO) pTrident->NoAccel = TRUE;
2285 if (pTrident->pEnt->device->MemBase != 0) {
2290 pTrident->FbAddress = pTrident->pEnt->device->MemBase;
2294 pTrident->FbAddress = PCI_REGION_BASE(pTrident->PciInfo, 0, REGION_MEM) & 0xFFFFFFF0;
2296 pTrident->FbAddress = 0xA0000;
2300 (unsigned long)pTrident->FbAddress);
2304 if (pTrident->pEnt->device->IOBase != 0) {
2309 pTrident->IOAddress = pTrident->pEnt->device->IOBase;
2313 pTrident->IOAddress = PCI_REGION_BASE(pTrident->PciInfo, 1, REGION_MEM) & 0xFFFFC000;
2316 pTrident->IOAddress = 0xBF000;
2320 (unsigned long)pTrident->IOAddress);
2325 if (xf86RegisterResources(pTrident->pEnt->index, NULL, ResExclusive)) {
2340 pVbe = VBEInit(NULL,pTrident->pEnt->index);
2346 pTrident->vbeModes = VBEBuildVbeModeList(pVbe,vbeInfoBlockPtr);
2364 if (xf86GetOptValBool(pTrident->Options, OPTION_1400_DISPLAY, &tmp_bool)) {
2366 pTrident->displaySize = 1400;
2368 pTrident->displaySize = TRIDENTLcdDisplaySize(pMon);
2381 pTrident->EngineOperation = 0x00;
2382 pTrident->IsCyber = FALSE;
2383 pTrident->HasSGRAM = FALSE;
2384 pTrident->NewClockCode = FALSE;
2385 pTrident->MUX = FALSE;
2390 switch (pTrident->Chipset) {
2395 pTrident->NoMMIO = TRUE;
2396 pTrident->NoAccel = TRUE;
2397 pTrident->HWCursor = FALSE;
2400 if (pTrident->UsePCIRetry)
2402 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2403 pTrident->frequency = NTSC;
2408 pTrident->NoMMIO = TRUE;
2409 pTrident->NoAccel = TRUE;
2410 pTrident->HWCursor = FALSE;
2413 if (pTrident->UsePCIRetry)
2415 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2416 pTrident->frequency = NTSC;
2421 pTrident->NoMMIO = TRUE;
2422 pTrident->NoAccel = TRUE;
2423 pTrident->HWCursor = FALSE;
2426 if (pTrident->UsePCIRetry)
2428 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2429 pTrident->frequency = NTSC;
2434 pTrident->NoMMIO = TRUE;
2435 pTrident->NoAccel = TRUE;
2436 pTrident->HWCursor = FALSE;
2439 if (pTrident->UsePCIRetry)
2441 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2442 pTrident->frequency = NTSC;
2447 pTrident->NoMMIO = TRUE;
2448 pTrident->NoAccel = TRUE;
2449 pTrident->HWCursor = FALSE;
2452 if (pTrident->UsePCIRetry)
2454 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2455 pTrident->frequency = NTSC;
2460 pTrident->NoMMIO = TRUE;
2461 pTrident->NoAccel = TRUE;
2462 pTrident->HWCursor = FALSE;
2465 if (pTrident->UsePCIRetry)
2467 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2468 pTrident->frequency = NTSC;
2473 pTrident->NoMMIO = TRUE;
2474 pTrident->NoAccel = TRUE;
2475 pTrident->HWCursor = FALSE;
2478 if (pTrident->UsePCIRetry)
2480 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2481 pTrident->frequency = NTSC;
2484 pTrident->ddc1Read = Tridentddc1Read;
2485 pTrident->HWCursor = FALSE;
2488 if (pTrident->UsePCIRetry)
2490 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2491 pTrident->frequency = NTSC;
2494 pTrident->ddc1Read = Tridentddc1Read;
2497 if (pTrident->UsePCIRetry)
2499 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2502 * which chips are right ! Then override pTrident->Chipset to
2505 pTrident->ddc1Read = Tridentddc1Read;
2513 pTrident->Chipset = TGUI9660;
2514 if (pTrident->UsePCIRetry)
2516 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2520 pTrident->Chipset = TGUI9680;
2521 if (pTrident->UsePCIRetry)
2523 pTrident->UsePCIRetry = FALSE; /* Not Supported */
2528 pTrident->Chipset = PROVIDIA9682;
2533 pTrident->NewClockCode = TRUE;
2534 pTrident->Chipset = PROVIDIA9685;
2544 pTrident->HasSGRAM = TRUE;
2547 pTrident->NewClockCode = TRUE;
2548 pTrident->Chipset = CYBER9397;
2549 pTrident->IsCyber = TRUE;
2558 pTrident->HasSGRAM = TRUE;
2561 pTrident->NewClockCode = TRUE;
2562 pTrident->Chipset = CYBER9397DVD;
2563 pTrident->IsCyber = TRUE;
2571 pTrident->NewClockCode = TRUE;
2572 pTrident->Chipset = CYBER9385;
2573 pTrident->IsCyber = TRUE;
2578 pTrident->NewClockCode = TRUE;
2579 pTrident->Chipset = CYBER9385;
2580 pTrident->IsCyber = TRUE;
2587 pTrident->NewClockCode = TRUE;
2588 pTrident->Chipset = CYBER9382;
2589 pTrident->IsCyber = TRUE;
2598 pTrident->HasSGRAM = TRUE;
2601 pTrident->NewClockCode = TRUE;
2602 pTrident->Chipset = CYBER9388;
2603 pTrident->IsCyber = TRUE;
2607 pTrident->Chipset = TGUI9660;
2612 pTrident->ddc1Read = Tridentddc1Read;
2618 pTrident->HasSGRAM = TRUE;
2621 pTrident->IsCyber = TRUE;
2624 pTrident->NewClockCode = TRUE;
2627 pTrident->ddc1Read = Tridentddc1Read;
2633 pTrident->HasSGRAM = TRUE;
2636 pTrident->IsCyber = TRUE;
2639 pTrident->NewClockCode = TRUE;
2642 pTrident->ddc1Read = Tridentddc1Read;
2648 pTrident->HasSGRAM = TRUE;
2651 pTrident->IsCyber = TRUE;
2654 pTrident->NewClockCode = TRUE;
2657 pTrident->ddc1Read = Tridentddc1Read;
2663 pTrident->HasSGRAM = TRUE;
2666 pTrident->IsCyber = TRUE;
2669 pTrident->NewClockCode = TRUE;
2672 pTrident->ddc1Read = Tridentddc1Read;
2678 pTrident->HasSGRAM = TRUE;
2681 pTrident->IsCyber = TRUE;
2684 pTrident->NewClockCode = TRUE;
2687 pTrident->ddc1Read = Tridentddc1Read;
2689 pTrident->IsCyber = TRUE;
2692 pTrident->NewClockCode = TRUE;
2695 pTrident->ddc1Read = Tridentddc1Read;
2701 pTrident->HasSGRAM = TRUE;
2706 pTrident->NewClockCode = TRUE;
2709 pTrident->ddc1Read = Tridentddc1Read;
2715 pTrident->HasSGRAM = TRUE;
2720 pTrident->NewClockCode = TRUE;
2723 pTrident->ddc1Read = Tridentddc1Read;
2727 pTrident->HasSGRAM = TRUE;
2732 pTrident->NewClockCode = TRUE;
2733 pTrident->frequency = NTSC;
2734 pTrident->UsePCIRetry = TRUE; /* To avoid lockups */
2737 pTrident->ddc1Read = Tridentddc1Read;
2739 /* pTrident->IsCyber = TRUE; VIA MVP4 integrated Desktop version */
2742 pTrident->NewClockCode = TRUE;
2743 pTrident->frequency = NTSC;
2746 pTrident->ddc1Read = Tridentddc1Read;
2748 pTrident->IsCyber = TRUE;
2751 pTrident->NewClockCode = TRUE;
2752 pTrident->frequency = NTSC;
2755 pTrident->ddc1Read = Tridentddc1Read;
2757 pTrident->IsCyber = TRUE;
2760 pTrident->NewClockCode = TRUE;
2761 pTrident->frequency = NTSC;
2764 pTrident->ddc1Read = Tridentddc1Read;
2766 pTrident->IsCyber = TRUE;
2769 pTrident->NewClockCode = TRUE;
2770 pTrident->frequency = NTSC;
2773 pTrident->ddc1Read = Tridentddc1Read;
2775 pTrident->IsCyber = TRUE;
2778 pTrident->NewClockCode = TRUE;
2779 pTrident->frequency = NTSC;
2782 pTrident->ddc1Read = Tridentddc1Read;
2784 pTrident->IsCyber = TRUE;
2787 pTrident->NewClockCode = TRUE;
2788 pTrident->frequency = NTSC;
2791 pTrident->ddc1Read = Tridentddc1Read;
2793 pTrident->HasSGRAM = TRUE;
2795 pTrident->NewClockCode = TRUE;
2796 pTrident->frequency = NTSC;
2798 if (PCI_SUB_VENDOR_ID(pTrident->PciInfo) != 0x1023) {
2800 pTrident->IsCyber = TRUE;
2818 pTrident->ddc1Read = Tridentddc1Read;
2820 pTrident->HasSGRAM = TRUE;
2821 pTrident->IsCyber = TRUE;
2822 pTrident->shadowNew = TRUE;
2825 pTrident->NewClockCode = TRUE;
2826 pTrident->frequency = NTSC;
2829 pTrident->ddc1Read = Tridentddc1Read;
2831 pTrident->HasSGRAM = TRUE;
2832 pTrident->IsCyber = TRUE;
2833 pTrident->shadowNew = TRUE;
2836 pTrident->NewClockCode = TRUE;
2837 pTrident->frequency = NTSC;
2840 pTrident->ddc1Read = Tridentddc1Read;
2842 pTrident->HasSGRAM = TRUE;
2843 pTrident->IsCyber = TRUE;
2844 pTrident->shadowNew = TRUE;
2847 pTrident->NewClockCode = TRUE;
2848 pTrident->frequency = NTSC;
2884 pTrident->HwBpp = pScrn->bitsPerPixel;
2887 if (pTrident->Chipset >= CYBERBLADEI7 && pTrident->Chipset <= CYBERBLADEAI1D)
2888 pTrident->HWCursor = FALSE;
2891 if (pTrident->pEnt->device->videoRam != 0) {
2892 pScrn->videoRam = pTrident->pEnt->device->videoRam;
2895 if (pTrident->Chipset == XP5) {
2916 if (pTrident->Chipset == CYBER9525DVD) {
2922 if (pTrident->Chipset < TGUI9440AGi)
2984 pTrident->HWCursor ? "HW" : "SW");
2989 if (pTrident->IsCyber) {
2992 pTrident->lcdMode = 0xff;
3005 if (pTrident->displaySize) {
3008 if (pTrident->displaySize == LCD[i].display_x)
3009 pTrident->lcdMode = LCD[i].mode;
3019 pTrident->displaySize = 0;
3023 if (!pTrident->displaySize) {
3026 pTrident->lcdMode = i;
3035 if (pTrident->dspOverride) {
3036 if (pTrident->dspOverride & LCD_ACTIVE)
3037 pTrident->lcdActive = TRUE;
3039 pTrident->lcdActive = FALSE;
3042 pTrident->lcdActive = (INB(0x3CF) & 0x10);
3046 pTrident->MCLK = 0;
3049 if (xf86GetOptValFreq(pTrident->Options, OPTION_SETMCLK, OPTUNITS_MHZ,
3051 pTrident->MCLK = (int)(real * 1000.0);
3053 (float)(pTrident->MCLK / 1000));
3057 pTrident->MinClock = 12000; /* XXX Guess, need to check this */
3059 pTrident->MinClock / 1000);
3065 if (pTrident->pEnt->device->dacSpeeds[0]) {
3070 speed = pTrident->pEnt->device->dacSpeeds[DAC_BPP8];
3073 speed = pTrident->pEnt->device->dacSpeeds[DAC_BPP16];
3076 speed = pTrident->pEnt->device->dacSpeeds[DAC_BPP24];
3079 speed = pTrident->pEnt->device->dacSpeeds[DAC_BPP32];
3083 pTrident->MaxClock = pTrident->pEnt->device->dacSpeeds[0];
3085 pTrident->MaxClock = speed;
3090 pTrident->MaxClock = ClockLimit16bpp[pTrident->Chipset];
3093 pTrident->MaxClock = ClockLimit24bpp[pTrident->Chipset];
3096 pTrident->MaxClock = ClockLimit32bpp[pTrident->Chipset];
3099 pTrident->MaxClock = ClockLimit[pTrident->Chipset];
3104 pTrident->MaxClock / 1000);
3118 clockRanges->minClock = pTrident->MinClock;
3119 clockRanges->maxClock = pTrident->MaxClock;
3134 pTrident->NoAccel = TRUE;
3138 if (pTrident->NoAccel || Is3Dchip) {
3149 pTrident->FbMapSize,
3161 pTrident->FbMapSize,
3201 pTrident->EngineOperation |= 0x00;
3204 pTrident->EngineOperation |= 0x01;
3207 pTrident->EngineOperation |= 0x03;
3210 pTrident->EngineOperation |= 0x02;
3233 if (!pTrident->NoAccel) {
3234 if (!pTrident->useEXA) {
3238 pTrident->NoAccel = 1;
3239 pTrident->ShadowFB = 1;
3243 if (pTrident->useEXA) {
3266 pTrident->EngineOperation |= 0x00;
3269 pTrident->EngineOperation |= 0x04;
3272 pTrident->EngineOperation |= 0x08;
3275 pTrident->EngineOperation |= 0x0C;
3281 if (pTrident->ShadowFB) {
3309 if (pTrident->IsCyber && pTrident->MMIOonly)
3314 pTrident->FbMapSize = pScrn->videoRam * 1024;
3331 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
3335 if (!pTrident->NoAccel && !pTrident->useEXA)
3336 pTrident->AccelInfoRec->Sync(pScrn);
3339 if (!pTrident->NoAccel && pTrident->useEXA)
3340 pTrident->EXADriverPtr->WaitMarker(pScreen, 0);
3354 if (pTrident->AccelInfoRec)
3355 XAADestroyInfoRec(pTrident->AccelInfoRec);
3357 if (pTrident->EXADriverPtr) {
3359 free(pTrident->EXADriverPtr);
3360 pTrident->EXADriverPtr = NULL;
3362 if (pTrident->CursorInfoRec)
3363 xf86DestroyCursorInfoRec(pTrident->CursorInfoRec);
3364 if (pTrident->ShadowPtr) {
3366 free(pTrident->ShadowPtr);
3367 pScreen->CreateScreenResources = pTrident->CreateScreenResources;
3369 if (pTrident->DGAModes)
3370 free(pTrident->DGAModes);
3373 if(pTrident->BlockHandler)
3374 pScreen->BlockHandler = pTrident->BlockHandler;
3376 if (pTrident->pVbe)
3377 vbeFree(pTrident->pVbe);
3379 xf86FreeInt10(pTrident->Int10);
3380 pScreen->CloseScreen = pTrident->CloseScreen;
3398 TRIDENTPtr pTrident = TRIDENTPTR(pScrn);
3401 pScreen->CreateScreenResources = pTrident->CreateScreenResources;
3403 pTrident->CreateScreenResources = pScreen->CreateScreenResources;
3423 TRIDENTPtr pTrident;
3433 pTrident = TRIDENTPTR(pScrn);
3449 if (pTrident->vbeModes) {
3450 pTrident->pVbe = VBEInit(NULL,pTrident->pEnt->index);
3451 pTrident->Int10 = pTrident->pVbe->pInt10;
3457 pTrident->Int10 = xf86InitInt10(pTrident->pEnt->index);
3468 vgaHWSetMmioFuncs(hwp, pTrident->IOBase, 0);
3515 if (pTrident->pVbe)
3516 vbeFree(pTrident->pVbe);
3518 xf86FreeInt10(pTrident->Int10);
3526 if (pTrident->Rotate) {
3534 if(pTrident->ShadowFB) {
3535 pTrident->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
3536 pTrident->ShadowPtr = malloc(pTrident->ShadowPitch * height);
3537 displayWidth = pTrident->ShadowPitch / (pScrn->bitsPerPixel >> 3);
3538 FBStart = pTrident->ShadowPtr;
3540 pTrident->ShadowFB = FALSE;
3541 pTrident->ShadowPtr = NULL;
3542 FBStart = pTrident->FbBase;
3568 if (pTrident->pVbe)
3569 vbeFree(pTrident->pVbe);
3571 xf86FreeInt10(pTrident->Int10);
3594 pTrident->BlockHandler = pScreen->BlockHandler;
3597 if (!pTrident->ShadowFB)
3607 if (pTrident->pVbe)
3608 vbeFree(pTrident->pVbe);
3610 xf86FreeInt10(pTrident->Int10);
3613 pBankInfo->pBankA = pTrident->FbBase;
3614 pBankInfo->pBankB = pTrident->FbBase;
3628 if (pTrident->pVbe)
3629 vbeFree(pTrident->pVbe);
3631 xf86FreeInt10(pTrident->Int10);
3643 AvailFBArea.y2 = pTrident->FbMapSize / (pScrn->displayWidth *
3657 if (xf86InitFBManagerLinear(pScreen, area, ((pTrident->FbMapSize/cpp) - area))) {
3659 "Using %ld bytes of offscreen memory for linear (offset=0x%x)\n", (pTrident->FbMapSize - areaoffset), areaoffset);
3665 if ((pTrident->Chipset == CYBERBLADEI7) ||
3666 (pTrident->Chipset == CYBERBLADEI7D) ||
3667 (pTrident->Chipset == CYBERBLADEI1) ||
3668 (pTrident->Chipset == CYBERBLADEI1D) ||
3669 (pTrident->Chipset == CYBERBLADEAI1) ||
3670 (pTrident->Chipset == CYBERBLADEAI1D) ||
3671 (pTrident->Chipset == CYBERBLADEE4) ||
3672 (pTrident->Chipset == BLADE3D)) {
3673 if (pTrident->useEXA)
3678 if ((pTrident->Chipset == CYBERBLADEXP4) ||
3679 (pTrident->Chipset == XP5)) {
3680 if (pTrident->useEXA)
3685 if ((pTrident->Chipset == BLADEXP) ||
3686 (pTrident->Chipset == CYBERBLADEXPAI1)) {
3700 if (pTrident->HWCursor) {
3707 if (pTrident->pVbe)
3708 vbeFree(pTrident->pVbe);
3710 xf86FreeInt10(pTrident->Int10);
3715 if (pTrident->pVbe)
3716 vbeFree(pTrident->pVbe);
3718 xf86FreeInt10(pTrident->Int10);
3721 if(pTrident->ShadowFB) {
3722 if(pTrident->Rotate) {
3723 if (!pTrident->PointerMoved) {
3724 pTrident->PointerMoved = pScrn->PointerMoved;
3728 case 8: pTrident->RefreshArea = TRIDENTRefreshArea8; break;
3729 case 16: pTrident->RefreshArea = TRIDENTRefreshArea16; break;
3730 case 24: pTrident->RefreshArea = TRIDENTRefreshArea24; break;
3731 case 32: pTrident->RefreshArea = TRIDENTRefreshArea32; break;
3734 pTrident->RefreshArea = TRIDENTRefreshArea;
3738 pTrident->CreateScreenResources = pScreen->CreateScreenResources;
3744 pScrn->memPhysBase = pTrident->FbAddress;
3747 if (pTrident->Chipset >= TGUI9660)
3750 pTrident->CloseScreen = pScreen->CloseScreen;
3762 xf86PrintEDID(xf86DoEDID_DDC2(pScrn->scrnIndex,pTrident->DDC));