1265N/Aindex 4cd7075..58274df 100644
705N/A@@ -42,4 +42,5 @@ ast_drv_la_SOURCES = \
705N/A * PERFORMANCE OF THIS SOFTWARE.
1265N/A@@ -90,6 +99,15 @@ typedef CARD32 ULONG;
705N/A typedef struct _ASTRegRec {
705N/A+#if (defined(__sparc__))
705N/A } ASTRegRec, *ASTRegPtr;
705N/A typedef struct _VIDEOMODE {
1265N/A@@ -249,12 +267,94 @@ typedef struct _ASTRec {
1265N/A Atom xvGammaRed, xvGammaGreen, xvGammaBlue;
1265N/A } ASTRec, *ASTRecPtr, *ASTPtr;
705N/A #define ASTPTR(p) ((ASTRecPtr)((p)->driverPrivate))
705N/A+#ifndef VIS_GETPCICONFIG
705N/A+ * These definitions will be removed when they are included in the
705N/A+#define VIS_GETVIDEOMODENAME (VIOC | 12)
705N/A+#define VIS_STOREVIDEOMODENAME (VIOC | 13)
705N/A+#define VIS_MAX_VMODE_LEN 48
705N/A+typedef struct vis_video_mode {
705N/A+ char mode_name[VIS_MAX_VMODE_LEN];
705N/A+#define VIS_GETPCICONFIG (VIOC | 14)
705N/A+typedef struct vis_pci_cfg {
705N/A+ uint8_t CacheLineSize;
705N/A+ uint32_t ROMBaseAddress;
705N/A+ uint8_t CapabilitiesPtr;
705N/A+ uint8_t Reserved_1[3];
705N/A+ uint8_t InterruptLine;
705N/A+ uint8_t MaximumLatency;
705N/A+#define VIS_SETIOREG (VIOC | 17)
705N/A+#define VIS_GETIOREG (VIOC | 18)
705N/A+typedef struct vis_io_reg {
705N/A+extern struct pci_device *ASTGetPciInfo(ASTRecPtr);
705N/A+extern ScrnInfoPtr ASTAllocScreen(DriverPtr, GDevPtr);
705N/A+extern pointer ASTMapVidMem(ScrnInfoPtr, unsigned int, PCITAG,
705N/A+ unsigned long, unsigned long);
705N/A+extern void ASTUnmapVidMem(ScrnInfoPtr, pointer, unsigned long);
705N/A+extern void ASTNotifyModeChanged(ScrnInfoPtr);
705N/A+extern void ASTSaveHW(ScrnInfoPtr);
705N/A+extern void ASTRestoreHW(ScrnInfoPtr);
1265N/Aindex 2d3dab3..74ca45d 100644
999N/A@@ -189,7 +189,12 @@ ASTAccelInit(ScreenPtr pScreen)
691N/A infoPtr->SetupForSolidFill = ASTSetupForSolidFill;
691N/A infoPtr->SubsequentSolidFillRect = ASTSubsequentSolidFillRect;
691N/A+ infoPtr->SolidFillFlags = NO_PLANEMASK | BIT_ORDER_IN_BYTE_MSBFIRST;
691N/A infoPtr->SolidFillFlags = NO_PLANEMASK;
1265N/Aindex b3f2061..9b7f1c8 100644
1265N/A@@ -87,7 +87,11 @@ ASTCursorInit(ScreenPtr pScreen)
691N/A infoPtr->Flags = HARDWARE_CURSOR_TRUECOLOR_AT_8BPP |
691N/A HARDWARE_CURSOR_INVERT_MASK |
691N/A HARDWARE_CURSOR_BIT_ORDER_MSBFIRST;
691N/A infoPtr->MaxWidth = MAX_HWC_WIDTH;
691N/A infoPtr->MaxHeight = MAX_HWC_HEIGHT;
1265N/A@@ -106,7 +106,7 @@ static void ASTFreeScreen(int scrnIndex, int flags);
691N/A static ModeStatus ASTValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags);
691N/A /* Internally used functions */
691N/A-static Bool ASTGetRec(ScrnInfoPtr pScrn);
691N/A+extern Bool ASTGetRec(ScrnInfoPtr pScrn);
691N/A static void ASTFreeRec(ScrnInfoPtr pScrn);
691N/A static Bool ASTSaveScreen(ScreenPtr pScreen, Bool unblack);
691N/A static Bool ASTCloseScreen(int scrnIndex, ScreenPtr pScreen);
1265N/A@@ -270,7 +270,7 @@ ASTProbe(DriverPtr drv, int flags)
691N/A-#ifndef XSERVER_LIBPCIACCESS
691N/A+#if !defined(XSERVER_LIBPCIACCESS) && !defined(__sparc__)
691N/A * This probing is just checking the PCI data the server already
1265N/A@@ -280,6 +280,7 @@ ASTProbe(DriverPtr drv, int flags)
691N/A+#if !defined(__sparc__)
691N/A numUsed = xf86MatchPciInstances(AST_NAME, PCI_VENDOR_AST,
691N/A ASTChipsets, ASTPciChipsets,
691N/A devSections, numDevSections,
1265N/A@@ -323,6 +324,37 @@ ASTProbe(DriverPtr drv, int flags)
691N/A } /* end of if flags */
1265N/A+ if (flags & PROBE_DETECT) {
1265N/A+ for (i = 0; i < numDevSections; i++) {
1265N/A+ /* Allocate new ScrnInfoRec and claim the slot */
1265N/A+ if (pScrn = ASTAllocScreen(drv, devSections[i])) {
1265N/A+ pScrn->driverVersion = AST_VERSION;
1265N/A+ pScrn->driverName = AST_DRIVER_NAME;
1265N/A+ pScrn->PreInit = ASTPreInit;
1265N/A+ pScrn->ScreenInit = ASTScreenInit;
1265N/A+ pScrn->SwitchMode = ASTSwitchMode;
1265N/A+ pScrn->AdjustFrame = ASTAdjustFrame;
1265N/A+ pScrn->EnterVT = ASTEnterVT;
1265N/A+ pScrn->LeaveVT = ASTLeaveVT;
1265N/A+ pScrn->FreeScreen = ASTFreeScreen;
1265N/A+ pScrn->ValidMode = ASTValidMode;
1265N/A@@ -338,7 +370,9 @@ static Bool
691N/A ASTPreInit(ScrnInfoPtr pScrn, int flags)
691N/A+#if !defined(__sparc__)
691N/A rgb defaultWeight = { 0, 0, 0 };
1265N/A@@ -355,6 +389,10 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
691N/A pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
691N/A if (flags & PROBE_DETECT) {
691N/A ASTProbeDDC(pScrn, pEnt->index);
1265N/A@@ -368,19 +406,23 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
691N/A /* The vgahw module should be loaded here when needed */
691N/A if (!xf86LoadSubModule(pScrn, "vgahw"))
691N/A /* The fb module should be loaded here when needed */
691N/A if (!xf86LoadSubModule(pScrn, "fb"))
691N/A /* Allocate a vgaHWRec */
691N/A if (!vgaHWGetHWRec(pScrn))
691N/A /* Color Depth Check */
691N/A flags24 = Support32bppFb;
1265N/A@@ -453,7 +495,12 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
691N/A pAST->pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
691N/A+#if !defined(__sparc__)
691N/A pAST->PciInfo = xf86GetPciInfoForEntity(pAST->pEnt->index);
1265N/A+ pAST->PciInfo = ASTGetPciInfo(pAST);
691N/A #ifndef XSERVER_LIBPCIACCESS
691N/A pAST->PciTag = pciTag(pAST->PciInfo->bus, pAST->PciInfo->device,
1265N/A@@ -508,11 +555,13 @@ ASTPreInit(ScrnInfoPtr pScrn, int flags)
691N/A * the vgaHW module to use our relocated i/o ports.
1265N/A #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
1265N/A VGAHWPTR(pScrn)->PIOOffset = /* ... */
1265N/A pAST->IODBase + PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO) - 0x380;
691N/A pAST->RelocateIO = (IOADDRESS)(PCI_REGION_BASE(pAST->PciInfo, 2, REGION_IO) + pAST->IODBase);
1265N/A@@ -757,7 +806,9 @@ ASTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
1265N/A@@ -766,7 +817,9 @@ ASTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
691N/A pScrn = xf86Screens[pScreen->myNum];
705N/A if (!ASTMapMem(pScrn)) {
705N/A xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Map FB Memory Failed \n");
1265N/A@@ -795,7 +848,9 @@ ASTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
691N/A+#if (!defined(__sparc__))
691N/A vFillASTModeInfo (pScrn);
1265N/A@@ -836,6 +891,10 @@ ASTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
691N/A+#if (defined(__sparc__))
691N/A+ ASTNotifyModeChanged(pScrn);
691N/A if (pScrn->bitsPerPixel > 8) {
691N/A /* Fixup RGB ordering */
691N/A visual = pScreen->visuals + pScreen->numVisuals;
1265N/A@@ -999,7 +1058,9 @@ ASTLeaveVT(int scrnIndex, int flags)
691N/A ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
691N/A ASTRecPtr pAST = ASTPTR(pScrn);
1265N/A vgaHWPtr hwp = VGAHWPTR(pScrn);
1265N/A@@ -1022,7 +1083,9 @@ ASTLeaveVT(int scrnIndex, int flags)
1265N/A if (pAST->jChipType == AST1180)
1265N/A@@ -1030,8 +1093,11 @@ static void
691N/A ASTFreeScreen(int scrnIndex, int flags)
691N/A ASTFreeRec(xf86Screens[scrnIndex]);
691N/A if (xf86LoaderCheckSymbol("vgaHWFreeHWRec"))
691N/A vgaHWFreeHWRec(xf86Screens[scrnIndex]);
1265N/A@@ -1122,7 +1188,6 @@ ASTValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
691N/A-/* Internal used modules */
691N/A * ASTGetRec and ASTFreeRec --
1265N/A@@ -1130,7 +1195,7 @@ ASTValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
691N/A * These two functions create and destroy that private data.
691N/A ASTGetRec(ScrnInfoPtr pScrn)
691N/A if (pScrn->driverPrivate)
1265N/A@@ -1140,6 +1205,8 @@ ASTGetRec(ScrnInfoPtr pScrn)
691N/A+/* Internal used modules */
691N/A ASTFreeRec(ScrnInfoPtr pScrn)
1265N/A@@ -1171,7 +1238,9 @@ static Bool
691N/A ASTCloseScreen(int scrnIndex, ScreenPtr pScreen)
691N/A ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
999N/A vgaHWPtr hwp = VGAHWPTR(pScrn);
691N/A ASTRecPtr pAST = ASTPTR(pScrn);
691N/A if (pScrn->vtSema == TRUE)
1265N/A@@ -1197,11 +1266,15 @@ ASTCloseScreen(int scrnIndex, ScreenPtr pScreen)
1265N/A if (pAST->jChipType == AST1180)
691N/A+#if (!defined(__sparc__))
691N/A if(pAST->AccelInfoPtr) {
691N/A XAADestroyInfoRec(pAST->AccelInfoPtr);
1265N/A@@ -1222,12 +1295,13 @@ static void
691N/A ASTSave(ScrnInfoPtr pScrn)
691N/A+#if !defined(__sparc__)
691N/A vgaReg = &VGAHWPTR(pScrn)->SavedReg;
691N/A astReg = &pAST->SavedReg;
1265N/A@@ -1238,6 +1312,10 @@ ASTSave(ScrnInfoPtr pScrn)
691N/A vgaHWSave(pScrn, vgaReg, VGA_SR_MODE);
691N/A+ astReg = &pAST->SavedReg;
1265N/A if (pAST->jChipType == AST1180)
1265N/A@@ -1266,12 +1344,13 @@ static void
691N/A ASTRestore(ScrnInfoPtr pScrn)
691N/A+#if !defined(__sparc__)
691N/A vgaReg = &VGAHWPTR(pScrn)->SavedReg;
691N/A astReg = &pAST->SavedReg;
1265N/A@@ -1303,18 +1382,21 @@ ASTRestore(ScrnInfoPtr pScrn)
1265N/A SetIndexReg(CRTC_PORT, (UCHAR) (i), astReg->ExtCRTC[icount++]);
1265N/A SetIndexReg(CRTC_PORT, (UCHAR) (0xBB), astReg->ExtCRTC[icount]);
691N/A ASTProbeDDC(ScrnInfoPtr pScrn, int index)
1265N/A ASTRecPtr pAST = ASTPTR(pScrn);
1265N/A unsigned char DDC_data[128];
1265N/A+ if (xf86LoadSubModule(pScrn, "ddc"))
1265N/A if ( (pAST->jChipType == AST1180) || (!xf86IsPrimaryPci(pAST->PciInfo)) )
1265N/A if (pAST->jChipType == AST1180)
1265N/A Flags = GetVGA2EDID(pScrn, DDC_data);
1265N/A@@ -1328,14 +1410,16 @@ ASTProbeDDC(ScrnInfoPtr pScrn, int index)
1265N/A xf86DrvMsg(pScrn->scrnIndex, X_INFO,"[ASTProbeDDC] Can't Get EDID Properly \n");
1265N/A if (xf86LoadSubModule(pScrn, "vbe")) {
1265N/A- pVbe = VBEInit(NULL, index);
1265N/A+ vbeInfoPtr pVbe = VBEInit(NULL, index);
1265N/A ConfiguredMonitor = vbeDoEDID(pVbe, NULL);
1265N/A@@ -1345,6 +1429,7 @@ ASTProbeDDC(ScrnInfoPtr pScrn, int index)
691N/A ASTDoDDC(ScrnInfoPtr pScrn, int index)
691N/A+#if !defined(__sparc__)
1265N/A xf86MonPtr MonInfo = NULL, MonInfo1 = NULL, MonInfo2 = NULL;
1265N/A ASTRecPtr pAST = ASTPTR(pScrn);
1265N/A@@ -1539,6 +1624,30 @@ ASTDoDDC(ScrnInfoPtr pScrn, int index)
691N/A+ xf86MonPtr MonInfo = NULL;
691N/A+ ASTRecPtr pAST = ASTPTR(pScrn);
691N/A+ unsigned char DDC_data[128];
691N/A+ /* Honour Option "noDDC" */
691N/A+ if (xf86ReturnOptValBool(pAST->Options, OPTION_NO_DDC, FALSE)) {
691N/A+ if ((xf86LoadSubModule(pScrn, "ddc")) && (GetVGAEDID(pScrn, DDC_data) == TRUE))
691N/A+ MonInfo = xf86InterpretEDID(pScrn->scrnIndex, DDC_data);
691N/A+ xf86PrintEDID(MonInfo);
691N/A+ xf86SetDDCproperties(pScrn, MonInfo);
691N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,"[ASTDoDDC] Can't Load DDC Sub-Modules or Read EDID Failed \n");
1265N/A@@ -1564,9 +1673,14 @@ ASTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
691N/A- hwp = VGAHWPTR(pScrn);
691N/A+#if !defined(__sparc__)
691N/A+ hwp = VGAHWPTR(pScrn);
691N/A if (!vgaHWInit(pScrn, mode))
1265N/A@@ -1579,6 +1693,10 @@ ASTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
691N/A vgaHWProtect(pScrn, FALSE);
691N/A+ if (!ASTSetMode(pScrn, mode))
1265N/Aindex b58916f..3ea5089 100644
1265N/A@@ -798,6 +798,16 @@ void vSetExtReg(ScrnInfoPtr pScrn, DisplayModePtr mode, PVBIOS_MODE_INFO pVGAMod
691N/A SetIndexRegMask(CRTC_PORT,0xA3, 0xF0, (UCHAR) jRegA3);
691N/A SetIndexRegMask(CRTC_PORT,0xA8, 0xFD, (UCHAR) jRegA8);
691N/A+ if ((pScrn->bitsPerPixel == 15) || (pScrn->bitsPerPixel == 16) )
691N/A+ else if (pScrn->bitsPerPixel == 32)
691N/A+ SetIndexRegMask(CRTC_PORT,0xA2, 0x3F, (UCHAR) jRegA2);
999N/A if (pAST->jChipType == AST2300)
1265N/Aindex 1dd87f0..7d9ed0d 100644
999N/A@@ -60,16 +60,29 @@ Bool ASTUnmapMem(ScrnInfoPtr pScrn);
691N/A Bool ASTMapMMIO(ScrnInfoPtr pScrn);
691N/A void ASTUnmapMMIO(ScrnInfoPtr pScrn);
691N/A+extern pointer ASTMapVidMem(ScrnInfoPtr, unsigned int, PCITAG,
691N/A+ unsigned long, unsigned long);
691N/A+extern void ASTUnmapVidMem(ScrnInfoPtr, pointer, unsigned long);
691N/A ASTMapMem(ScrnInfoPtr pScrn)
691N/A ASTRecPtr pAST = ASTPTR(pScrn);
691N/A-#ifndef XSERVER_LIBPCIACCESS
691N/A+#if !defined(XSERVER_LIBPCIACCESS) || defined(__sparc__)
691N/A+#if !defined(__sparc__)
691N/A pAST->FBVirtualAddr = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
691N/A pAST->FBPhysAddr, pAST->FbMapSize);
691N/A+ pAST->FBVirtualAddr = ASTMapVidMem(pScrn, VIDMEM_FRAMEBUFFER, NULL,
691N/A+ pAST->FBPhysAddr, pAST->FbMapSize);
691N/A void** result = (void**)&pAST->FBVirtualAddr;
691N/A int err = pci_device_map_range(pAST->PciInfo,
999N/A@@ -95,10 +108,14 @@ ASTUnmapMem(ScrnInfoPtr pScrn)
691N/A ASTRecPtr pAST = ASTPTR(pScrn);
691N/A-#ifndef XSERVER_LIBPCIACCESS
691N/A+#if !defined(XSERVER_LIBPCIACCESS) || defined(__sparc__)
691N/A+#if !defined(__sparc__)
691N/A xf86UnMapVidMem(pScrn->scrnIndex, (pointer) pAST->FBVirtualAddr,
1265N/A+ ASTUnmapVidMem(pScrn, (pointer)pAST->FBVirtualAddr, pAST->FbMapSize);
691N/A pci_device_unmap_range(pAST->PciInfo, pAST->FBVirtualAddr, pAST->FbMapSize);
999N/A@@ -111,7 +128,7 @@ Bool
691N/A ASTMapMMIO(ScrnInfoPtr pScrn)
691N/A ASTRecPtr pAST = ASTPTR(pScrn);
691N/A-#ifndef XSERVER_LIBPCIACCESS
691N/A+#if !defined(XSERVER_LIBPCIACCESS) || defined(__sparc__)
691N/A #if !defined(__alpha__)
999N/A@@ -121,9 +138,15 @@ ASTMapMMIO(ScrnInfoPtr pScrn)
691N/A+#if !defined(__sparc__)
691N/A pAST->MMIOVirtualAddr = xf86MapPciMem(pScrn->scrnIndex, mmioFlags,
691N/A pAST->MMIOPhysAddr, pAST->MMIOMapSize);
691N/A+ pAST->MMIOVirtualAddr = ASTMapVidMem(pScrn,
691N/A+ VIDMEM_MMIO | VIDMEM_READSIDEEFFECT, NULL,
691N/A+ pAST->MMIOPhysAddr, pAST->MMIOMapSize);
999N/A@@ -150,10 +173,14 @@ ASTUnmapMMIO(ScrnInfoPtr pScrn)
691N/A ASTRecPtr pAST = ASTPTR(pScrn);
691N/A-#ifndef XSERVER_LIBPCIACCESS
691N/A+#if !defined(XSERVER_LIBPCIACCESS) || defined(__sparc__)
691N/A+#if !defined(__sparc__)
691N/A xf86UnMapVidMem(pScrn->scrnIndex, (pointer) pAST->MMIOVirtualAddr,
691N/A+ ASTUnmapVidMem(pScrn, (pointer)pAST->MMIOVirtualAddr, pAST->MMIOMapSize);
691N/A pci_device_unmap_range(pAST->PciInfo, pAST->MMIOVirtualAddr, pAST->MMIOMapSize);
691N/A pAST->MMIOVirtualAddr = 0;
1265N/A@@ -95,6 +95,27 @@ bASTRegInit(ScrnInfoPtr pScrn)
691N/A SetIndexRegMask(CRTC_PORT,0xA1, 0xFF, 0x04);
691N/A+ /* Enable Big-Endian */
691N/A+ switch (pScrn->bitsPerPixel)
691N/A+ SetIndexRegMask(CRTC_PORT,0xA2, 0x3F, jReg);
1265N/A@@ -445,6 +466,7 @@ vASTLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors,
691N/A ASTDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags)
1265N/A@@ -494,6 +516,7 @@ ASTDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, int fla
1265N/A SetIndexRegMask(SEQ_PORT,0x01, 0xDF, SEQ01);
1265N/A SetIndexRegMask(CRTC_PORT,0xB6, 0xFC, CRB6);
1265N/A@@ -985,7 +1008,7 @@ AST_DRAMStruct AST1100DRAMTableData[] = {
691N/A { 0x0030, 0x00000040 },
691N/A { 0x0028, 0x00000003 },
691N/A { 0x000C, 0x00005a21 },
691N/A- { 0x0034, 0x00007c03 },
691N/A+ { 0x0034, 0x00007c43 },
691N/A { 0x0120, 0x00004c41 },
691N/A { 0xffff, 0xffffffff },
1265N/A@@ -1038,7 +1061,7 @@ AST_DRAMStruct AST2100DRAMTableData[] = {
691N/A { 0x0030, 0x00000040 },
691N/A { 0x0028, 0x00000003 },
691N/A { 0x000C, 0x00005a21 },
691N/A- { 0x0034, 0x00007c03 },
691N/A+ { 0x0034, 0x00007c43 },
691N/A { 0x0120, 0x00005061 },
691N/A { 0xffff, 0xffffffff },
1265N/A@@ -2654,9 +2677,11 @@ Bool InitVGA(ScrnInfoPtr pScrn, ULONG Flags)
999N/A+#if !defined(__sparc__)
999N/A PCI_READ_LONG(pAST->PciInfo, &ulData, 0x04);
999N/A PCI_WRITE_LONG(pAST->PciInfo, ulData, 0x04);
1265N/Aindex 53cb4c7..9f5fa50 100644
691N/A * PERFORMANCE OF THIS SOFTWARE.
691N/A /* VRAM Size Definition */
691N/A #define VIDEOMEM_SIZE_08M 0x00800000
691N/A #define VIDEOMEM_SIZE_16M 0x01000000
691N/A+#define SET_IO_REG 0x1000
691N/A+#define GET_IO_REG 0x1001
691N/A+#define AR_PORT_WRITE 0x40
691N/A+#define MISC_PORT_WRITE 0x42
691N/A+#define DAC_INDEX_READ 0x47
691N/A+#define DAC_INDEX_WRITE 0x48
691N/A+#define INPUT_STATUS1_READ 0x5A
691N/A+#define MISC_PORT_READ 0x4C
1265N/A+_GetRegFromFd(uchar_t off, int fd)
1265N/A+ struct vis_io_reg io_reg = {
1265N/A+ ioctl(fd, VIS_GETIOREG, &io_reg);
1265N/A+#define GetReg(off) _GetRegFromFd(off, pAST->fd)
1265N/A+#define SetReg(off, val) do { \
1265N/A+ struct vis_io_reg io_reg = { \
1265N/A+ ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1265N/A+#define GetIndexReg(off, index, val) do { \
1265N/A+ struct vis_io_reg io_reg = { \
1265N/A+ ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1265N/A+ ioctl(pAST->fd, VIS_GETIOREG, &io_reg); \
1265N/A+#define SetIndexReg(off, index, val) do { \
1265N/A+ struct vis_io_reg io_reg = { \
1265N/A+ ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1265N/A+ ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1265N/A+#define GetIndexRegMask(off, index, and, val) do { \
1265N/A+ struct vis_io_reg io_reg = { \
1265N/A+ ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1265N/A+ ioctl(pAST->fd, VIS_GETIOREG, &io_reg); \
1265N/A+#define SetIndexRegMask(off, index, and, val) do { \
1265N/A+ struct vis_io_reg io_reg = { \
1265N/A+ ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1265N/A+ ioctl(pAST->fd, VIS_GETIOREG, &io_reg); \
1265N/A+ ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
1265N/A+ ioctl(pAST->fd, VIS_SETIOREG, &io_reg); \
691N/A #define AR_PORT_WRITE (pAST->RelocateIO + 0x40)
691N/A #define MISC_PORT_WRITE (pAST->RelocateIO + 0x42)
691N/A #define SEQ_PORT (pAST->RelocateIO + 0x44)
691N/A SetIndexReg(base,index,__Temp); \
1265N/A #define VGA_GET_PALETTE_INDEX(index, red, green, blue) \
1265N/A *(ULONG *) (pAST->MMIOVirtualAddr + 0xF000) = 0x1; \
1265N/A *(ULONG *) (pAST->MMIOVirtualAddr + 0x10000 + ((addr) & 0x0000FFFF)) = (data); \
691N/A+#endif /* ASTVGATOOL_H */
1265N/A PCI_READ_LONG(pAST->PciInfo, &ulData, 0x04);
1265N/A PCI_WRITE_LONG(pAST->PciInfo, ulData, 0x04);