Lines Matching refs:pGeode

103     GeodePtr pGeode = GEODEPTR(pScrni);
105 if (pGeode->exaBfrSz > 0 && pGeode->exaBfrSz <= *avail) {
106 pGeode->exaBfrOffset = *offset;
107 *offset += pGeode->exaBfrOffset;
108 *avail -= pGeode->exaBfrOffset;
115 GeodePtr pGeode = GEODEPTR(pScrni);
121 if (pGeode->NoOfImgBuffers > 0) {
122 size = pGeode->displayPitch * pGeode->NoOfImgBuffers;
124 for (i = 0; i < pGeode->NoOfImgBuffers; i++) {
125 pGeode->AccelImageWriteBuffers[i] = pGeode->FBBase + *offset;
126 *offset += pGeode->displayPitch;
127 *avail -= pGeode->displayPitch;
134 for (i = 0; i < pGeode->NoOfImgBuffers; i++)
135 pGeode->AccelImageWriteBuffers[i] = NULL;
139 if (pGeode->NoOfColorExpandLines > 0) {
140 pitch = ((pGeode->displayPitch + 31) >> 5) << 2;
141 size = pitch * pGeode->NoOfColorExpandLines;
144 for (i = 0; i < pGeode->NoOfColorExpandLines; i++) {
145 pGeode->AccelColorExpandBuffers[i] = pGeode->FBBase + *offset;
154 for (i = 0; i < pGeode->NoOfImgBuffers; i++)
155 pGeode->AccelColorExpandBuffers[i] = NULL;
163 GeodePtr pGeode = GEODEPTR(pScrni);
170 if (pGeode->tryCompression)
171 pGeode->displayPitch =
174 pGeode->displayPitch =
177 pGeode->Pitch = pGeode->displayPitch;
178 pGeode->displayWidth = pGeode->displayPitch / bytpp;
179 pScrni->displayWidth = pGeode->displayWidth;
181 fbavail = pGeode->FBAvail - 0x4000;
183 pGeode->displayOffset = fboffset = 0;
184 pGeode->displaySize = pScrni->virtualY * pGeode->displayPitch;
186 fbavail -= pGeode->displaySize;
187 fboffset += pGeode->displaySize;
189 if (pGeode->tryCompression) {
193 pGeode->CBData.compression_offset = fboffset;
198 pGeode->Compression = TRUE;
203 pGeode->Compression = FALSE;
207 if (pGeode->tryHWCursor) {
210 pGeode->CursorStartOffset = fboffset;
213 pGeode->HWCursor = TRUE;
218 pGeode->HWCursor = FALSE;
222 if (!pGeode->NoAccel) {
223 if (pGeode->useEXA)
229 pGeode->shadowSize = 0;
233 size = pGeode->displayPitch * pScrni->virtualX;
235 size = pGeode->displayPitch * pScrni->virtualY;
238 pGeode->shadowOffset = fboffset;
239 pGeode->shadowSize = size;
255 if (!pGeode->NoAccel) {
257 if (pGeode->useEXA && pGeode->pExa) {
258 ExaDriverPtr pExa = pGeode->pExa;
264 if (!pGeode->useEXA) {
276 if (pGeode->shadowSize == 0) {
284 (offset + pGeode->displayPitch - 1) / pGeode->displayPitch;
286 AvailBox.x2 = pGeode->displayWidth;
287 AvailBox.y2 = (offset + avail) / pGeode->displayPitch;
315 GeodePtr pGeode = GEODEPTR(pScrni);
317 if (pGeode->useVGA && !pScrni->vtSema)
356 GeodeRec *pGeode = GEODEPTR(pScrni);
359 pciVideoPtr pci = xf86GetPciInfoForEntity(pGeode->pEnt->index);
376 pGeode->FBAvail);
381 gfx_virt_fbptr = map_pci_mem(pScrni, 1, pci, 0, pGeode->FBAvail);
384 gfx_gx2_scratch_base = pGeode->FBAvail - 0x4000;
399 pGeode->FBBase = gfx_virt_fbptr;
405 if (!pGeode->NoAccel && pGeode->useEXA)
406 pGeode->pExa->memoryBase = pGeode->FBBase;
409 pGeode->FBAvail, pGeode->FBBase);
447 GeodePtr pGeode;
467 pGeode = pScrni->driverPrivate = xnfcalloc(1, sizeof(GeodeRec));
469 if (pGeode == NULL)
480 pGeode->useVGA = useVGA;
481 pGeode->pEnt = pEnt;
483 if (pGeode->useVGA) {
485 pGeode->useVGA = FALSE;
490 pGeode->vesa = calloc(1, sizeof(VESARec));
499 pGeode->Output =
550 pGeode->FBVGAActive = FALSE;
551 pGeode->tryHWCursor = TRUE;
552 pGeode->tryCompression = TRUE;
554 pGeode->NoAccel = FALSE;
555 pGeode->useEXA = FALSE;
557 pGeode->Panel = (pGeode->Output & OUTPUT_PANEL) ? TRUE : FALSE;
559 pGeode->NoOfImgBuffers = DEFAULT_IMG_LINE_BUFS;
560 pGeode->NoOfColorExpandLines = DEFAULT_CLR_LINE_BUFS;
561 pGeode->exaBfrSz = DEFAULT_EXA_SCRATCH_BFRSZ;
563 xf86GetOptValBool(GeodeOptions, GX_OPTION_HW_CURSOR, &pGeode->tryHWCursor);
566 (int *) &(pGeode->FBAvail)))
567 pGeode->FBAvail = 0;
572 pGeode->tryHWCursor = FALSE;
575 pGeode->tryCompression = FALSE;
578 pGeode->NoAccel = TRUE;
580 pGeode->rotation = RR_Rotate_0;
585 pGeode->rotation = RR_Rotate_90;
587 pGeode->rotation = RR_Rotate_180;
589 pGeode->rotation = RR_Rotate_270;
595 &(pGeode->NoOfImgBuffers));
597 if (pGeode->NoOfImgBuffers <= 0)
598 pGeode->NoOfImgBuffers = 0;
601 &(pGeode->NoOfColorExpandLines));
603 if (pGeode->NoOfColorExpandLines <= 0)
604 pGeode->NoOfColorExpandLines = 0;
607 (int *) &(pGeode->exaBfrSz));
609 if (pGeode->exaBfrSz <= 0)
610 pGeode->exaBfrSz = 0;
612 if (pGeode->Panel == TRUE) {
614 pGeode->Panel = FALSE;
622 pGeode->useEXA = FALSE;
628 pGeode->useEXA = TRUE;
630 pGeode->useEXA = FALSE;
636 pGeode->useEXA ? "EXA" : "XAA");
640 if (pGeode->Panel) {
642 if (GeodeGetFPGeometry(panelgeo, &pGeode->PanelX, &pGeode->PanelY))
643 pGeode->Panel = FALSE;
651 if ((pGeode->Panel = Pnl_IsPanelEnabledInBIOS()))
652 Pnl_GetPanelInfoFromBIOS(&pGeode->PanelX, &pGeode->PanelY, &b,
660 if (pGeode->useVGA) {
667 pVesa = pGeode->vesa;
669 if ((pVesa->pInt = xf86InitInt10(pGeode->pEnt->index)) == NULL) {
672 pGeode->useVGA = FALSE;
682 if (pGeode->FBAvail == 0) {
683 if (GeodeGetSizeFromFB(&pGeode->FBAvail))
684 pGeode->FBAvail = gfx_get_frame_buffer_size();
692 if (pGeode->pEnt->device->videoRam == 0)
693 pScrni->videoRam = pGeode->FBAvail / 1024;
695 pScrni->videoRam = pGeode->pEnt->device->videoRam;
705 pScrni->monitor->DDC = GeodeDoDDC(pScrni, pGeode->pEnt->index);
716 pScrni->display->virtualY, pGeode->FBAvail,
743 if (pGeode->NoAccel == FALSE) {
744 const char *module = (pGeode->useEXA) ? "exa" : "xaa";
751 if (pGeode->tryHWCursor == TRUE) {
758 if (xf86RegisterResources(pGeode->pEnt->index, NULL, ResExclusive)) {
770 GeodeRec *pGeode = GEODEPTR(pScrni);
772 if (pGeode->useVGA && pGeode->FBVGAActive) {
784 GeodeRec *pGeode = GEODEPTR(pScrni);
791 xf86UnMapVidMem(pScrni->scrnIndex, gfx_virt_fbptr, pGeode->FBAvail);
793 pciVideoPtr pci = xf86GetPciInfoForEntity(pGeode->pEnt->index);
798 unmap_pci_mem(pScrni, pci, gfx_virt_fbptr, pGeode->FBAvail);
832 GeodeRec *pGeode = GEODEPTR(pScrni);
835 offset = y * pGeode->Pitch + x * (pScrni->bitsPerPixel >> 3);
843 GeodeRec *pGeode = GEODEPTR(pScrni);
858 if (pGeode->Panel)
867 GFX(set_fixed_timings(pGeode->PanelX, pGeode->PanelY,
872 if (pGeode->Panel)
873 GFX(set_panel_present(pGeode->PanelX, pGeode->PanelY,
889 GFX(set_display_pitch(pGeode->displayPitch));
893 if (pGeode->Compression) {
894 GXSetDvLineSize(pGeode->Pitch);
896 gfx_set_compression_offset(pGeode->CBData.compression_offset);
903 if (pGeode->HWCursor && !(pMode->Flags & V_DBLSCAN)) {
905 GFX(set_cursor_position(pGeode->CursorStartOffset, 0, 0, 0, 0));
910 pGeode->HWCursor = FALSE;
923 GeodeRec *pGeode = GEODEPTR(pScrni);
936 if (pGeode->curMode != pMode)
946 if (!GXSetVideoMode(pScrni, pGeode->curMode))
951 pGeode->curMode = pMode;
959 GeodeRec *pGeode = GEODEPTR(pScrni);
964 gfx_set_display_timings(pGeode->FBgfxdisplaytiming.wBpp,
965 pGeode->FBgfxdisplaytiming.wPolarity,
966 pGeode->FBgfxdisplaytiming.wHActive,
967 pGeode->FBgfxdisplaytiming.wHBlankStart,
968 pGeode->FBgfxdisplaytiming.wHSyncStart,
969 pGeode->FBgfxdisplaytiming.wHSyncEnd,
970 pGeode->FBgfxdisplaytiming.wHBlankEnd,
971 pGeode->FBgfxdisplaytiming.wHTotal,
972 pGeode->FBgfxdisplaytiming.wVActive,
973 pGeode->FBgfxdisplaytiming.wVBlankStart,
974 pGeode->FBgfxdisplaytiming.wVSyncStart,
975 pGeode->FBgfxdisplaytiming.wVSyncEnd,
976 pGeode->FBgfxdisplaytiming.wVBlankEnd,
977 pGeode->FBgfxdisplaytiming.wVTotal,
978 pGeode->FBgfxdisplaytiming.dwDotClock);
983 if (pGeode->FBCompressionEnable) {
984 gfx_set_compression_offset(pGeode->FBCompressionOffset);
985 gfx_set_compression_pitch(pGeode->FBCompressionPitch);
986 gfx_set_compression_size(pGeode->FBCompressionSize);
990 gfx_set_display_pitch(pGeode->FBgfxdisplaytiming.wPitch);
992 gfx_set_display_offset(pGeode->FBDisplayOffset);
995 gfx_set_cursor_position(pGeode->FBCursorOffset, 0, 0, 0, 0);
997 if (pGeode->useVGA) {
998 pGeode->vesa->pInt->num = 0x10;
999 pGeode->vesa->pInt->ax = 0x0 | pGeode->FBBIOSMode;
1000 pGeode->vesa->pInt->bx = 0;
1001 xf86ExecX86int10(pGeode->vesa->pInt);
1014 GeodeRec *pGeode = GEODEPTR(pScrni);
1020 if (pGeode->AccelInfoRec)
1021 XAADestroyInfoRec(pGeode->AccelInfoRec);
1024 if (pGeode->AccelImageWriteBuffers) {
1025 free(pGeode->AccelImageWriteBuffers[0]);
1026 free(pGeode->AccelImageWriteBuffers);
1027 pGeode->AccelImageWriteBuffers = NULL;
1030 if (pGeode->AccelColorExpandBuffers) {
1031 free(pGeode->AccelColorExpandBuffers);
1032 pGeode->AccelColorExpandBuffers = NULL;
1035 if (pGeode->pExa) {
1037 free(pGeode->pExa);
1038 pGeode->pExa = NULL;
1045 pScrni->PointerMoved = pGeode->PointerMoved;
1046 pScrn->CloseScreen = pGeode->CloseScreen;
1057 GeodeRec *pGeode = GEODEPTR(pScrni);
1062 if (pGeode->useVGA)
1063 pGeode->FBVGAActive = gu2_get_vga_active();
1069 pGeode->FBgfxdisplaytiming.dwDotClock = gfx_get_clock_frequency();
1070 pGeode->FBgfxdisplaytiming.wPitch = gfx_get_display_pitch();
1071 pGeode->FBgfxdisplaytiming.wBpp = gfx_get_display_bpp();
1072 pGeode->FBgfxdisplaytiming.wHTotal = gfx_get_htotal();
1073 pGeode->FBgfxdisplaytiming.wHActive = gfx_get_hactive();
1074 pGeode->FBgfxdisplaytiming.wHSyncStart = gfx_get_hsync_start();
1075 pGeode->FBgfxdisplaytiming.wHSyncEnd = gfx_get_hsync_end();
1076 pGeode->FBgfxdisplaytiming.wHBlankStart = gfx_get_hblank_start();
1077 pGeode->FBgfxdisplaytiming.wHBlankEnd = gfx_get_hblank_end();
1078 pGeode->FBgfxdisplaytiming.wVTotal = gfx_get_vtotal();
1079 pGeode->FBgfxdisplaytiming.wVActive = gfx_get_vactive();
1080 pGeode->FBgfxdisplaytiming.wVSyncStart = gfx_get_vsync_start();
1081 pGeode->FBgfxdisplaytiming.wVSyncEnd = gfx_get_vsync_end();
1082 pGeode->FBgfxdisplaytiming.wVBlankStart = gfx_get_vblank_start();
1083 pGeode->FBgfxdisplaytiming.wVBlankEnd = gfx_get_vblank_end();
1084 pGeode->FBgfxdisplaytiming.wPolarity = gfx_get_sync_polarities();
1086 pGeode->FBDisplayOffset = gfx_get_display_offset();
1088 if (pGeode->useVGA) {
1091 pGeode->FBBIOSMode = pvgaHW->readCrtc(pvgaHW, 0x040);
1094 pGeode->FBCompressionEnable = gfx_get_compression_enable();
1095 pGeode->FBCompressionOffset = gfx_get_compression_offset();
1096 pGeode->FBCompressionPitch = gfx_get_compression_pitch();
1097 pGeode->FBCompressionSize = gfx_get_compression_size();
1105 if (pGeode->useVGA && pGeode->FBVGAActive) {
1141 GXAllocateMemory(pScrn, pScrni, pGeode->rotation);
1144 memset(pGeode->FBBase + pGeode->displayOffset, 0, pGeode->displaySize);
1148 pGeode->curMode = pScrni->currentMode;
1186 GeodeRec *pGeode;
1188 pGeode = GEODEPTR(pScrni);
1198 if (pGeode->Panel) {
1209 if (pGeode->Panel) {
1220 if (pGeode->Panel) {
1231 if (pGeode->Panel) {
1245 GeodeRec *pGeode = GEODEPTR(pScrni);
1247 pScreen->CreateScreenResources = pGeode->CreateScreenResources;
1252 && pGeode->rotation != RR_Rotate_0) {
1257 Rotation requestedRotation = pGeode->rotation;
1259 pGeode->rotation = RR_Rotate_0;
1270 pGeode->starting = TRUE;
1272 pGeode->starting = FALSE;
1283 GeodeRec *pGeode = GEODEPTR(pScrni);
1287 pGeode->starting = TRUE;
1291 if (pGeode->useVGA) {
1299 if (!pGeode->NoAccel) {
1301 if (pGeode->useEXA) {
1303 if (!(pGeode->pExa = exaDriverAlloc())) {
1306 pGeode->NoAccel = TRUE;
1309 ExaDriverPtr pExa = pGeode->pExa;
1325 pGeode->AccelImageWriteBuffers =
1326 calloc(pGeode->NoOfImgBuffers,
1327 sizeof(pGeode->AccelImageWriteBuffers[0]));
1328 pGeode->AccelColorExpandBuffers =
1329 calloc(pGeode->NoOfColorExpandLines,
1330 sizeof(pGeode->AccelColorExpandBuffers[0]));
1362 ret = fbScreenInit(pScrn, pGeode->FBBase + pGeode->displayOffset,
1364 pScrni->xDpi, pScrni->yDpi, pGeode->displayWidth,
1392 if (!pGeode->NoAccel)
1402 if (pGeode->tryHWCursor) {
1452 if (pGeode->rotation != RR_Rotate_0)
1456 rotate = pGeode->rotation = RR_Rotate_0;
1461 pGeode->PointerMoved = pScrni->PointerMoved;
1464 pGeode->CreateScreenResources = pScrn->CreateScreenResources;
1467 pGeode->CloseScreen = pScrn->CloseScreen;
1474 pGeode->starting = FALSE;
1483 GeodeRec *pGeode = GEODEPTR(pScrni);
1487 if (pGeode->Panel)
1494 if (!custom && pGeode->Panel) {
1495 if (pMode->CrtcHDisplay > pGeode->PanelX ||
1496 pMode->CrtcVDisplay > pGeode->PanelY ||
1497 gfx_is_panel_mode_supported(pGeode->PanelX,
1498 pGeode->PanelY,
1517 if (pGeode->tryCompression)
1522 if (p * pMode->CrtcVDisplay > pGeode->FBAvail)
1541 GeodeRec *pGeode = GEODEPTR(pScrni);
1543 pGeode->PrevDisplayOffset = gfx_get_display_offset();
1570 GeodeRec *pGeode = GEODEPTR(pScrni);
1574 switch (pGeode->rotation) {
1591 (*pGeode->PointerMoved) (POINTER_MOVED_ARGS(newX, newY));
1616 GeodeRec *pGeode = GEODEPTR(pScrni);
1618 if (pGeode == NULL)
1621 if (pGeode->useVGA) {