Index: Imakefile =================================================================== RCS file: /cvs/fd/xorg/xc/programs/Xserver/hw/xfree86/drivers/savage/Imakefile,v retrieving revision 1.3 diff -u -r1.3 Imakefile --- Imakefile 16 Sep 2004 22:00:48 -0000 1.3 +++ Imakefile 18 Sep 2004 15:57:13 -0000 @@ -26,8 +26,9 @@ #include #if BuildXF86DRI -DRISRCS = savage_dri.c -DRIOBJS = savage_dri.o +DRISRCS = savage_dri.c savage_hwmc.c + +DRIOBJS = savage_dri.o savage_hwmc.o DRIINCLUDES = -I$(SERVERSRC)/GL/dri -I$(LIBSRC)/GL/dri -I$(LIBSRC)/GL/dri/drm \ -I$(XF86OSSRC)/linux/drm/kernel -I$(TOP)/include -I$(DRMSRCDIR)/shared DRIDEFINES = $(GLX_DEFINES) @@ -43,7 +44,6 @@ savage_vbe.c \ savage_video.c \ savage_streams.c \ - savage_hwmc.c \ $(DRISRCS) OBJS = savage_driver.o \ @@ -56,7 +56,6 @@ savage_vbe.o \ savage_video.o \ savage_streams.o \ - savage_hwmc.o \ $(DRIOBJS) DEFINES = -DPSZ=8 $(DRIDEFINES) Index: savage_accel.c =================================================================== RCS file: /cvs/fd/xorg/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_accel.c,v retrieving revision 1.6 diff -u -r1.6 savage_accel.c --- savage_accel.c 16 Sep 2004 23:50:48 -0000 1.6 +++ savage_accel.c 18 Sep 2004 15:54:33 -0000 @@ -215,7 +215,7 @@ unsigned long writefb( unsigned long addr, unsigned long value ); void writescan( unsigned long scan, unsigned long color ); -static int GetTileAperturePitch(ulong dwWidth, ulong dwBpp); +static int GetTileAperturePitch(unsigned long dwWidth, unsigned long dwBpp); void SavageSetGBD_M7(ScrnInfoPtr pScrn); void SavageSetGBD_Twister(ScrnInfoPtr pScrn); void SavageSetGBD_PM(ScrnInfoPtr pScrn); @@ -233,7 +233,7 @@ * if MM850C_15 = 1 (use MS-1 128bit non-linear tile mode),we should do it as follows * we now only support the later, and don't use Y range flag,see tile surface register */ -static int GetTileAperturePitch(ulong dwWidth, ulong dwBpp) +static int GetTileAperturePitch(unsigned long dwWidth, unsigned long dwBpp) { switch (dwBpp) { case 4: @@ -472,8 +472,8 @@ void SavageSetGBD_Twister(ScrnInfoPtr pScrn) { SavagePtr psav = SAVPTR(pScrn); - ulong ulTmp; - uchar byte; + unsigned long ulTmp; + unsigned char byte; int bci_enable, tile16, tile32; if (psav->Chipset == S3_SAVAGE4) { @@ -598,8 +598,8 @@ psav->GlobalBD.bd1.HighPart.ResBWTile |= 0x10;/* disable block write - was 0 */ /* HW uses width */ - psav->GlobalBD.bd1.HighPart.Stride = (ushort) psav->lDelta / (pScrn->bitsPerPixel >> 3); - psav->GlobalBD.bd1.HighPart.Bpp = (uchar) (pScrn->bitsPerPixel); + psav->GlobalBD.bd1.HighPart.Stride = (unsigned short) psav->lDelta / (pScrn->bitsPerPixel >> 3); + psav->GlobalBD.bd1.HighPart.Bpp = (unsigned char) (pScrn->bitsPerPixel); psav->GlobalBD.bd1.Offset = 0; @@ -640,8 +640,8 @@ void SavageSetGBD_M7(ScrnInfoPtr pScrn) { SavagePtr psav = SAVPTR(pScrn); - ulong ulTmp; - uchar byte; + unsigned long ulTmp; + unsigned char byte; int bci_enable, tile16, tile32; bci_enable = BCI_ENABLE; @@ -809,8 +809,8 @@ psav->GlobalBD.bd1.HighPart.ResBWTile |= 0x10;/* disable block write */ /* HW uses width */ - psav->GlobalBD.bd1.HighPart.Stride = (ushort)(psav->lDelta / (pScrn->bitsPerPixel >> 3)); - psav->GlobalBD.bd1.HighPart.Bpp = (uchar) (pScrn->bitsPerPixel); + psav->GlobalBD.bd1.HighPart.Stride = (unsigned short)(psav->lDelta / (pScrn->bitsPerPixel >> 3)); + psav->GlobalBD.bd1.HighPart.Bpp = (unsigned char) (pScrn->bitsPerPixel); psav->GlobalBD.bd1.Offset = 0; @@ -842,8 +842,8 @@ void SavageSetGBD_PM(ScrnInfoPtr pScrn) { SavagePtr psav = SAVPTR(pScrn); - ulong ulTmp; - uchar byte; + unsigned long ulTmp; + unsigned char byte; int bci_enable, tile16, tile32; /* Is supersavage like savage4 or twister? @@ -967,8 +967,8 @@ psav->GlobalBD.bd1.HighPart.ResBWTile |= 0x10;/* disable block write */ /* HW uses width */ - psav->GlobalBD.bd1.HighPart.Stride = (ushort)(psav->lDelta / (pScrn->bitsPerPixel >> 3)); - psav->GlobalBD.bd1.HighPart.Bpp = (uchar) (pScrn->bitsPerPixel); + psav->GlobalBD.bd1.HighPart.Stride = (unsigned short)(psav->lDelta / (pScrn->bitsPerPixel >> 3)); + psav->GlobalBD.bd1.HighPart.Bpp = (unsigned char) (pScrn->bitsPerPixel); psav->GlobalBD.bd1.Offset = 0; /* Index: savage_driver.c =================================================================== RCS file: /cvs/fd/xorg/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.c,v retrieving revision 1.8 diff -u -r1.8 savage_driver.c --- savage_driver.c 18 Sep 2004 13:37:30 -0000 1.8 +++ savage_driver.c 18 Sep 2004 15:53:21 -0000 @@ -1153,11 +1153,12 @@ } psav->EntityIndex = pEnt->index; +#ifdef XFree86LOADER if (xf86LoadSubModule(pScrn, "vbe")) { xf86LoaderReqSymLists(vbeSymbols, NULL); psav->pVbe = VBEInit(NULL, pEnt->index); } - +#endif psav->PciInfo = xf86GetPciInfoForEntity(pEnt->index); xf86RegisterResources(pEnt->index, NULL, ResNone); @@ -2551,6 +2552,7 @@ return; } +#ifdef XF86DRI static Bool SavageCheckAvailableRamFor3D(ScrnInfoPtr pScrn) { SavagePtr psav = SAVPTR(pScrn); @@ -2591,6 +2593,7 @@ return FALSE; } } +#endif static Bool SavageScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) @@ -2850,14 +2853,16 @@ if( !psav->FBStart2nd && !psav->NoAccel && !SavagePanningCheck(pScrn) ) SavageInitVideo( pScreen ); #endif - +#ifdef XF86DRI if ((psav->directRenderingEnabled) && (!psav->bDisableXvMC)) { if (SAVAGEInitMC(pScreen)) xf86DrvMsg(pScrn->scrnIndex,X_CONFIG,"XvMC is enabled\n"); else xf86DrvMsg(pScrn->scrnIndex,X_CONFIG,"XvMC is not enabled\n"); } - +#else + xf86DrvMsg(pScrn->scrnIndex,X_CONFIG,"XvMC is not enabled\n"); +#endif if (serverGeneration == 1) xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); @@ -3877,7 +3882,7 @@ { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; SavagePtr psav = SAVPTR(pScrn); - uchar byte; + unsigned char byte; xf86MonPtr pMon; UnLockExtRegs(); @@ -3939,8 +3944,8 @@ SavageResetStreams(ScrnInfoPtr pScrn) { SavagePtr psav = SAVPTR(pScrn); - uchar cr67; - uchar cr69; + unsigned char cr67; + unsigned char cr69; /* disable streams */ switch (psav->Chipset) { Index: savage_driver.h =================================================================== RCS file: /cvs/fd/xorg/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_driver.h,v retrieving revision 1.5 diff -u -r1.5 savage_driver.h --- savage_driver.h 18 Sep 2004 13:37:30 -0000 1.5 +++ savage_driver.h 18 Sep 2004 15:48:29 -0000 @@ -36,19 +36,6 @@ #endif -#ifndef uint -typedef unsigned int uint; -#endif -#ifndef ulong -typedef unsigned long ulong; -#endif -#ifndef ushort -typedef unsigned short ushort; -#endif -#ifndef uchar -typedef unsigned char uchar; -#endif - #define VGAIN8(addr) MMIO_IN8(psav->MapBase+0x8000, addr) #define VGAIN16(addr) MMIO_IN16(psav->MapBase+0x8000, addr) #define VGAIN(addr) MMIO_IN32(psav->MapBase+0x8000, addr) @@ -132,19 +119,19 @@ /* Bitmap descriptor structures for BCI */ typedef struct _HIGH { - ushort Stride; - uchar Bpp; - uchar ResBWTile; + unsigned short Stride; + unsigned char Bpp; + unsigned char ResBWTile; } HIGH; typedef struct _BMPDESC1 { - ulong Offset; + unsigned long Offset; HIGH HighPart; } BMPDESC1; typedef struct _BMPDESC2 { - ulong LoPart; - ulong HiPart; + unsigned long LoPart; + unsigned long HiPart; } BMPDESC2; typedef union _BMPDESC { Index: savage_regs.h =================================================================== RCS file: /cvs/fd/xorg/xc/programs/Xserver/hw/xfree86/drivers/savage/savage_regs.h,v retrieving revision 1.4 diff -u -r1.4 savage_regs.h --- savage_regs.h 16 Sep 2004 22:00:48 -0000 1.4 +++ savage_regs.h 18 Sep 2004 15:55:37 -0000 @@ -229,7 +229,7 @@ */ #define UnProtectCRTC() \ do { \ - uchar byte; \ + unsigned char byte; \ OUTREG8(CRT_ADDRESS_REG,0x11); \ byte = INREG8(CRT_DATA_REG) & 0X7F; \ OUTREG16(CRT_ADDRESS_REG,byte << 8 | 0x11); \