Lines Matching defs:pGeode

306       GeodePtr pGeode;
308 pGeode = pScreenInfo->driverPrivate = xnfcalloc(sizeof(GeodeRec), 1);
310 pGeode->vesa = xcalloc(sizeof(VESARec), 1);
459 GeodePtr pGeode;
476 if (!(pGeode = GX2GetRec(pScreenInfo)))
481 pGeode->pEnt = xf86GetEntityInfo(pScreenInfo->entityList[i]);
482 if (pGeode->pEnt->resources)
484 pGeode->Chipset = pGeode->pEnt->chipset;
486 pGeode->pEnt->chipset);
490 GX2ProbeDDC(pScreenInfo, pGeode->pEnt->index);
498 pGeode->FBVGAActive = 0; /* KFB will Knock of VGA */
516 pGeode->cpu_version = sAdapterInfo.dwCPUVersion;
521 if ((pGeode->cpu_version & 0xFF) == GFX_CPU_REDCLOUD) {
523 pGeode->DetectedChipSet = GX2_TFT;
525 pGeode->DetectedChipSet = GX2_CRT;
530 pGeode->DetectedChipSet, sAdapterInfo.dwCPUType));
532 pGeode->vid_version = sAdapterInfo.dwVideoVersion;
533 pGeode->FBSize = sAdapterInfo.dwFrameBufferSize;
536 pGeode->FBLinearAddr = sAdapterInfo.dwFrameBufferBase;
538 pGeode->FBBase = (unsigned char *)xf86MapVidMem(pScreenInfo->scrnIndex,
540 pGeode->FBLinearAddr,
541 pGeode->FBSize);
546 pGeode->cpu_version, pGeode->vid_version, pGeode->FBSize,
547 pGeode->FBLinearAddr));
552 pGeode->cpu_version = gfx_detect_cpu();
557 /* pGeode->DetectedChipSet = GX1; */
558 if ((pGeode->cpu_version & 0xFF) == GFX_CPU_REDCLOUD)
559 pGeode->DetectedChipSet = GX2;
560 GeodeDebug(("Detected BaseChip (%d)\n", pGeode->DetectedChipSet));
566 pGeode->DetectedChipSet =
570 ((pGeode->DetectedChipSet == GX2_TFT) ? "TFT" : "CRT")));
573 pGeode->vid_version = gfx_detect_video();
575 pGeode->FBLinearAddr = gfx_get_frame_buffer_base();
577 pGeode->FBSize = gfx_get_frame_buffer_size();
587 if (pGeode->DetectedChipSet & GX2) {
588 pGeode->cpu_reg_size = 0x4000;
589 pGeode->gp_reg_size = 0x4000;
590 pGeode->vid_reg_size = 0x4000;
592 pGeode->cpu_reg_size = 0x9000;
593 pGeode->vid_reg_size = 0x1000;
602 pGeode->FBVGAActive = gu2_get_vga_active();
605 DEBUGMSG(1, (0, X_PROBED, "VGA = %d\n", pGeode->FBVGAActive));
684 pVesa = pGeode->vesa;
687 if ((pVesa->pInt = xf86InitInt10(pGeode->pEnt->index)) == NULL) {
703 pGeode->HWCursor = TRUE;
704 if (xf86GetOptValBool(GeodeOptions, OPTION_HW_CURSOR, &pGeode->HWCursor)) {
710 pGeode->HWCursor = FALSE;
713 pGeode->HWCursor ? "HW" : "SW"));
715 pGeode->Compression = TRUE;
717 pGeode->Compression = FALSE;
721 pGeode->NoAccel = FALSE;
723 pGeode->NoAccel = TRUE;
729 &(pGeode->NoOfImgBuffers)))
730 pGeode->NoOfImgBuffers = DEFAULT_NUM_OF_BUF; /* default # of buffers */
731 if (pGeode->NoOfImgBuffers <= 0)
732 pGeode->NoOfImgBuffers = 0;
734 "NoOfImgBuffers = %d\n", pGeode->NoOfImgBuffers));
736 pGeode->Panel = FALSE;
739 pGeode->Panel = TRUE;
743 if (pGeode->DetectedChipSet == GX2_TFT) {
744 pGeode->Panel = TRUE;
748 if ((pGeode->DetectedChipSet == GX2_CRT) && (pGeode->Panel))
749 pGeode->Panel = FALSE;
752 "Quering FP Bios %d\n", pGeode->Panel));
755 if (pGeode->Panel) {
758 Gal_pnl_enabled_in_bios(&pGeode->Panel);
759 Gal_pnl_info_from_bios(&pGeode->FPBX, &pGeode->FPBY,
760 &pGeode->FPBB, &pGeode->FPBF);
762 pGeode->Panel = Pnl_IsPanelEnabledInBIOS();
763 Pnl_GetPanelInfoFromBIOS(&pGeode->FPBX, &pGeode->FPBY,
764 &pGeode->FPBB, &pGeode->FPBF);
770 pGeode->FPBX, pGeode->FPBY, pGeode->FPBB, pGeode->FPBF));
775 if (!pGeode->Panel) {
789 pGeode->ShadowFB = FALSE;
791 pGeode->ShadowFB = TRUE;
792 pGeode->NoAccel = TRUE;
797 pGeode->Rotate = 0;
801 pGeode->ShadowFB = TRUE;
802 pGeode->NoAccel = TRUE;
803 pGeode->HWCursor = FALSE;
804 pGeode->Rotate = 1;
809 pGeode->ShadowFB = TRUE;
810 pGeode->NoAccel = TRUE;
811 pGeode->HWCursor = FALSE;
812 pGeode->Rotate = -1;
835 "ChipID 0x%04X is not recognised\n", pGeode->Chipset));
838 if (pGeode->Chipset < 0) {
868 if (pGeode->pEnt->device->videoRam == 0) {
870 pScreenInfo->videoRam = pGeode->FBSize / 1024;
872 pScreenInfo->videoRam = pGeode->pEnt->device->videoRam;
967 if (pGeode->NoAccel == FALSE) {
975 if (pGeode->HWCursor == TRUE) {
984 if (pGeode->ShadowFB) {
992 if (xf86RegisterResources(pGeode->pEnt->index, NULL, ResExclusive)) {
1021 GeodePtr pGeode;
1025 if (!(pGeode = GX2GetRec(pScreenInfo)))
1027 if (pGeode->FBVGAActive) {
1062 if (1) { /*!pGeode->NoAccel */
1173 GeodePtr pGeode = GEODEPTR(pScreenInfo);
1194 GX2GetRefreshRate(pMode), pGeode->Pitch));
1202 if (pGeode->Panel) {
1205 pGeode->FPBX, pGeode->FPBY,
1210 pGeode->Panel));
1211 GFX(set_fixed_timings(pGeode->FPBX, pGeode->FPBY,
1228 GFX(set_display_pitch(pGeode->Pitch));
1239 if (pGeode->Compression) {
1241 pGeode->Compression));
1243 gx2_set_DvLineSize(pGeode->Pitch);
1247 pGeode->CBOffset,
1248 pGeode->CBPitch, pGeode->CBSize);
1253 gfx_set_compression_offset(pGeode->CBOffset);
1254 gfx_set_compression_pitch(pGeode->CBPitch);
1255 gfx_set_compression_size(pGeode->CBSize);
1262 if (pGeode->HWCursor) {
1265 GFX(set_cursor_position(pGeode->CursorStartOffset, 0, 0, 0, 0));
1276 if (pGeode->HWCursor == TRUE) {
1306 GeodePtr pGeode = GX2GetRec(pScreenInfo);
1309 Gal_get_display_timing(&pGeode->FBgfxdisplaytiming);
1312 Gal_get_display_offset(&(pGeode->FBDisplayOffset));
1315 Gal_get_compression_enable(&(pGeode->FBCompressionEnable));
1317 &(pGeode->FBCompressionOffset),
1318 &(pGeode->FBCompressionPitch),
1319 &(pGeode->FBCompressionSize));
1325 Gal_get_cursor_position(&(pGeode->FBCursorOffset),
1332 pGeode->FBgfxdisplaytiming.dwDotClock = gfx_get_clock_frequency();
1333 pGeode->FBgfxdisplaytiming.wPitch = gfx_get_display_pitch();
1334 pGeode->FBgfxdisplaytiming.wBpp = gfx_get_display_bpp();
1335 pGeode->FBgfxdisplaytiming.wHTotal = gfx_get_htotal();
1336 pGeode->FBgfxdisplaytiming.wHActive = gfx_get_hactive();
1337 pGeode->FBgfxdisplaytiming.wHSyncStart = gfx_get_hsync_start();
1338 pGeode->FBgfxdisplaytiming.wHSyncEnd = gfx_get_hsync_end();
1339 pGeode->FBgfxdisplaytiming.wHBlankStart = gfx_get_hblank_start();
1340 pGeode->FBgfxdisplaytiming.wHBlankEnd = gfx_get_hblank_end();
1341 pGeode->FBgfxdisplaytiming.wVTotal = gfx_get_vtotal();
1342 pGeode->FBgfxdisplaytiming.wVActive = gfx_get_vactive();
1343 pGeode->FBgfxdisplaytiming.wVSyncStart = gfx_get_vsync_start();
1344 pGeode->FBgfxdisplaytiming.wVSyncEnd = gfx_get_vsync_end();
1345 pGeode->FBgfxdisplaytiming.wVBlankStart = gfx_get_vblank_start();
1346 pGeode->FBgfxdisplaytiming.wVBlankEnd = gfx_get_vblank_end();
1347 pGeode->FBgfxdisplaytiming.wPolarity = gfx_get_sync_polarities();
1350 pGeode->FBDisplayOffset = gfx_get_display_offset();
1353 pGeode->FBCompressionEnable = gfx_get_compression_enable();
1354 pGeode->FBCompressionOffset = gfx_get_compression_offset();
1355 pGeode->FBCompressionPitch = gfx_get_compression_pitch();
1356 pGeode->FBCompressionSize = gfx_get_compression_size();
1359 pGeode->FBCursorOffset = gfx_get_cursor_offset();
1365 if (pGeode->FBVGAActive) {
1487 GeodePtr pGeode = GX2GetRec(pScreenInfo);
1491 Gal_set_display_timing(&pGeode->FBgfxdisplaytiming);
1493 Gal_set_display_offset(pGeode->FBDisplayOffset);
1496 Gal_set_cursor_position(pGeode->FBCursorOffset, 0, 0, 0, 0);
1499 if (pGeode->FBCompressionEnable) {
1501 pGeode->FBCompressionOffset,
1502 pGeode->FBCompressionPitch,
1503 pGeode->FBCompressionSize);
1508 gfx_set_display_timings(pGeode->FBgfxdisplaytiming.wBpp,
1509 pGeode->FBgfxdisplaytiming.wPolarity,
1510 pGeode->FBgfxdisplaytiming.wHActive,
1511 pGeode->FBgfxdisplaytiming.wHBlankStart,
1512 pGeode->FBgfxdisplaytiming.wHSyncStart,
1513 pGeode->FBgfxdisplaytiming.wHSyncEnd,
1514 pGeode->FBgfxdisplaytiming.wHBlankEnd,
1515 pGeode->FBgfxdisplaytiming.wHTotal,
1516 pGeode->FBgfxdisplaytiming.wVActive,
1517 pGeode->FBgfxdisplaytiming.wVBlankStart,
1518 pGeode->FBgfxdisplaytiming.wVSyncStart,
1519 pGeode->FBgfxdisplaytiming.wVSyncEnd,
1520 pGeode->FBgfxdisplaytiming.wVBlankEnd,
1521 pGeode->FBgfxdisplaytiming.wVTotal,
1522 pGeode->FBgfxdisplaytiming.dwDotClock);
1527 if (pGeode->FBCompressionEnable) {
1528 gfx_set_compression_offset(pGeode->FBCompressionOffset);
1529 gfx_set_compression_pitch(pGeode->FBCompressionPitch);
1530 gfx_set_compression_size(pGeode->FBCompressionSize);
1534 gfx_set_display_pitch(pGeode->FBgfxdisplaytiming.wPitch);
1536 gfx_set_display_offset(pGeode->FBDisplayOffset);
1539 gfx_set_cursor_position(pGeode->FBCursorOffset, 0, 0, 0, 0);
1541 GeodeDebug(("FBVGAActive %d\n", pGeode->FBVGAActive));
1542 if (pGeode->FBVGAActive) {
1543 pGeode->vesa->pInt->num = 0x10;
1544 pGeode->vesa->pInt->ax = 0x3;
1545 pGeode->vesa->pInt->bx = 0;
1546 xf86ExecX86int10(pGeode->vesa->pInt);
1573 GeodePtr pGeode = GEODEPTR(pScreenInfo);
1575 if (pGeode->ShadowPtr)
1576 xfree(pGeode->ShadowPtr);
1583 if (pGeode->AccelInfoRec)
1584 XAADestroyInfoRec(pGeode->AccelInfoRec);
1586 if (pGeode->AccelImageWriteBufferOffsets) {
1587 xfree(pGeode->AccelImageWriteBufferOffsets);
1588 pGeode->AccelImageWriteBufferOffsets = 0x0;
1591 xf86FreeOffscreenArea(pGeode->AccelImgArea);
1592 xf86FreeOffscreenArea(pGeode->CompressionArea);
1597 if (pGeode && (pScreen->CloseScreen = pGeode->CloseScreen)) {
1598 pGeode->CloseScreen = NULL;
1622 GeodePtr pGeode;
1624 pGeode = GEODEPTR(pScreenInfo);
1638 if (pGeode->Panel)
1641 if (pGeode->Panel)
1650 if (pGeode->Panel)
1653 if (pGeode->Panel)
1662 if (pGeode->Panel)
1665 if (pGeode->Panel)
1673 if (pGeode->Panel)
1676 if (pGeode->Panel)
1704 GeodePtr pGeode;
1717 pGeode = GX2GetRec(pScreenInfo);
1722 GeodeDebug(("FBVGAActive %d\n", pGeode->FBVGAActive));
1723 if (pGeode->FBVGAActive) {
1734 pGeode->Pitch = GX2CalculatePitchBytes(pScreenInfo->virtualX,
1741 AvailBox.y2 = (pGeode->FBSize / pGeode->Pitch);
1743 pGeode->CursorSize = 16 * 64; /* 64x64 */
1745 if (pGeode->HWCursor) {
1748 pGeode->CursorStartOffset = pGeode->FBSize - pGeode->CursorSize;
1755 pGeode->Pitch, pScreenInfo->displayWidth,
1759 if (pGeode->Compression) {
1761 pGeode->CBPitch = 544;
1762 pGeode->CBSize = 544;
1764 req_offscreenmem = pScreenInfo->virtualY * pGeode->CBPitch;
1765 req_offscreenmem += pGeode->Pitch - 1;
1766 req_offscreenmem /= pGeode->Pitch;
1767 pGeode->CBOffset = AvailBox.y1 * pGeode->Pitch;
1774 if (!pGeode->NoAccel) {
1775 if (pGeode->NoOfImgBuffers > 0) {
1776 if (pGeode->NoOfImgBuffers <= (AvailBox.y2 - AvailBox.y1)) {
1777 pGeode->AccelImageWriteBufferOffsets =
1778 xalloc(sizeof(unsigned long) * pGeode->NoOfImgBuffers);
1780 pGeode->AccelImageWriteBufferOffsets[0] =
1781 ((unsigned char *)pGeode->FBBase) +
1782 (AvailBox.y1 * pGeode->Pitch);
1784 for (i = 1; i < pGeode->NoOfImgBuffers; i++) {
1785 pGeode->AccelImageWriteBufferOffsets[i] =
1786 pGeode->AccelImageWriteBufferOffsets[i - 1] +
1787 pGeode->Pitch;
1790 for (i = 0; i < pGeode->NoOfImgBuffers; i++) {
1793 pGeode->AccelImageWriteBufferOffsets[i]));
1795 AvailBox.y1 += pGeode->NoOfImgBuffers;
1865 if (pGeode->Rotate) {
1869 if (pGeode->ShadowFB) {
1870 pGeode->ShadowPitch = BitmapBytePad(pScreenInfo->bitsPerPixel * width);
1871 pGeode->ShadowPtr = xalloc(pGeode->ShadowPitch * height);
1872 displayWidth = pGeode->ShadowPitch / (pScreenInfo->bitsPerPixel >> 3);
1873 FBStart = pGeode->ShadowPtr;
1875 pGeode->ShadowPtr = NULL;
1877 FBStart = pGeode->FBBase;
1903 if (!pGeode->ShadowFB) {
1925 if (!pGeode->NoAccel) {
1936 if (pGeode->HWCursor) {
1959 if (pGeode->ShadowFB) {
1962 if (pGeode->Rotate) {
1963 if (!pGeode->PointerMoved) {
1964 pGeode->PointerMoved = pScreenInfo->PointerMoved;
1987 pScreenInfo->memPhysBase = (unsigned long)pGeode->FBBase;
1995 pGeode->CloseScreen = pScreen->CloseScreen;
2050 GeodePtr pGeode = GX2GetRec(pScreenInfo);
2054 offset = (unsigned long)y *(unsigned long)pGeode->Pitch;
2149 GeodePtr pGeode = GX2GetRec(pScreenInfo);
2178 total_memory_required, pGeode->FBSize));
2180 if (total_memory_required > pGeode->FBSize)
2225 GeodePtr pGeode = GEODEPTR(pScreenInfo);
2228 pGeode->FBBase = (unsigned char *)xf86MapVidMem(pScreenInfo->scrnIndex,
2230 pGeode->FBLinearAddr,
2231 pGeode->FBSize);
2238 (), pGeode->cpu_reg_size);
2240 if (pGeode->DetectedChipSet & GX2) {
2246 pGeode->gp_reg_size);
2255 (), pGeode->vid_reg_size);
2259 pGeode->FBLinearAddr,
2260 pGeode->FBSize);
2262 pGeode->FBBase = gfx_virt_fbptr;
2282 pGeode->cpu_version,
2283 pGeode->vid_version,
2284 pGeode->FBSize, pGeode->FBBase, XpressROMPtr));
2298 GeodePtr pGeode = GEODEPTR(pScreenInfo);
2302 gfx_virt_regptr, pGeode->cpu_reg_size);
2303 if (pGeode->DetectedChipSet & GX2) {
2305 gfx_virt_gpptr, pGeode->gp_reg_size);
2308 gfx_virt_vidptr, pGeode->vid_reg_size);
2309 xf86UnMapVidMem(pScreenInfo->scrnIndex, gfx_virt_fbptr, pGeode->FBSize);