sst96: vgdrvr.c, vg96drvr.c: minor whitespace cleanups.

This commit is contained in:
sezero
2018-08-05 17:24:28 +03:00
parent 9fee9e454d
commit ef5108ae49
6 changed files with 24 additions and 40 deletions

View File

@@ -24,7 +24,7 @@ LCOPTS = -WX
LCINCS = -I$(BUILD_ROOT_SWLIBS)\include -I$(BUILD_ROOT_SST1)\include LCINCS = -I$(BUILD_ROOT_SWLIBS)\include -I$(BUILD_ROOT_SST1)\include
!if "$(FX_SST96_PAGE_FIFO)" != "1" !if "$(FX_SST96_PAGE_FIFO)" != "1"
LCDEFS = $(LCDEFS) -DSST96_ALT_FIFO_WRAP LCDEFS = $(LCDEFS) -DSST96_ALT_FIFO_WRAP
!endif !endif
# sources # sources
@@ -34,10 +34,10 @@ CFILES = sst1init.c info.c print.c parse.c gamma.c util.c \
sli.c video.c dac.c gdebug.c sli.c video.c dac.c gdebug.c
!if "$(FX_DLL_BUILDSST1INIT)" == "1" !if "$(FX_DLL_BUILDSST1INIT)" == "1"
SUBLIBRARIES = $(BUILD_ROOT_SWLIBS)\lib\fxpci.lib SUBLIBRARIES = $(BUILD_ROOT_SWLIBS)\lib\fxpci.lib
FX_DLL_LIBRARY = 1 FX_DLL_LIBRARY = 1
!else !else
SUBLIBRARIES = SUBLIBRARIES =
!endif !endif
# targets # targets

View File

@@ -31,8 +31,6 @@
#include <string.h> #include <string.h>
#include <gdebug.h> #include <gdebug.h>
/* This is currently disabled, thus breaking rush, until we can get some
* sources from Aliance Semiconductor */
#if 0 #if 0
static FxBool setVideo( FxU32 hWnd, static FxBool setVideo( FxU32 hWnd,
GrScreenResolution_t sRes, GrScreenResolution_t sRes,
@@ -45,7 +43,8 @@ static FxBool setVideo( FxU32 hWnd,
int *yres, int *yres,
int *fbStride, int *fbStride,
sst1VideoTimingStruct *vidTimings) { sst1VideoTimingStruct *vidTimings) {
return init96SetVideo( hWnd, sRes, vRefresh, cFormat, yOrigin,
return init96SetVideo( hWnd, sRes, vRefresh, cFormat, yOrigin,
nColBuffers, nAuxBuffers, nColBuffers, nAuxBuffers,
&context->info.regs, &context->info.regs,
xres, yres, fbStride ); xres, yres, fbStride );
@@ -67,19 +66,17 @@ static InitSwapType_t swapBuffers( FxU32 code ) {
if ( context && context->writeMethod ) if ( context && context->writeMethod )
init96Swap( code, &context->info.regs, context->writeMethod ); init96Swap( code, &context->info.regs, context->writeMethod );
return INIT_SWAP_FLIP; return INIT_SWAP_FLIP;
} }
static FxU32 status( void ) { static FxU32 status( void ) {
return *(context->info.regs.hwDep.VG96RegDesc.serialStatus); return *(context->info.regs.hwDep.VG96RegDesc.serialStatus);
} }
static FxBool busy(void) { static FxBool busy(void) {
FxBool rv; FxBool rv;
rv = (status() & 0x1) ? FXTRUE : FXFALSE; rv = (status() & 0x1) ? FXTRUE : FXFALSE;
return rv; return rv;
} }
static void idle( void ) { static void idle( void ) {
init96Idle(context->writeMethod); init96Idle(context->writeMethod);
@@ -155,7 +152,7 @@ void vg96DriverInit( InitContext *context ) {
context->gammaRGB = gammargb; context->gammaRGB = gammargb;
context->initGammaTable = gammatable; context->initGammaTable = gammatable;
context->findVidTimingStruct = findvidtiming; context->findVidTimingStruct = findvidtiming;
} }
#else #else
/* I've got to stub this one to get the Voodoo Graphics glide to link */ /* I've got to stub this one to get the Voodoo Graphics glide to link */
void vg96DriverInit( InitContext *context ) { void vg96DriverInit( InitContext *context ) {
@@ -183,6 +180,3 @@ void vg96DriverInit( InitContext *context ) {
} }
#endif #endif

View File

@@ -98,18 +98,17 @@ static void disableTransport( void ) {
static InitSwapType_t swapBuffers( FxU32 code ) { static InitSwapType_t swapBuffers( FxU32 code ) {
return INIT_SWAP_FLIP; return INIT_SWAP_FLIP;
} }
static FxU32 status( void ) { static FxU32 status( void ) {
return sst1InitReturnStatus((FxU32 *) context->info.hwDep.vgInfo.vgBaseAddr); return sst1InitReturnStatus((FxU32 *) context->info.hwDep.vgInfo.vgBaseAddr);
} }
static FxBool busy(void) { static FxBool busy(void) {
FxU32 stat = status(); FxU32 stat = status();
FxBool ret = (stat & SST_BUSY) ? FXTRUE : FXFALSE; FxBool ret = (stat & SST_BUSY) ? FXTRUE : FXFALSE;
return ret; return ret;
} }
static void idle( void ) { static void idle( void ) {
sst1InitIdle((FxU32 *)context->info.hwDep.vgInfo.vgBaseAddr); sst1InitIdle((FxU32 *)context->info.hwDep.vgInfo.vgBaseAddr);
@@ -194,4 +193,3 @@ void vgDriverInit( InitContext *context ) {
context->findVidTimingStruct = findvidtiming; context->findVidTimingStruct = findvidtiming;
} }

View File

@@ -24,7 +24,7 @@ LCOPTS = -WX
LCINCS = -I$(BUILD_ROOT_SWLIBS)\include -I$(BUILD_ROOT_SST1)\include LCINCS = -I$(BUILD_ROOT_SWLIBS)\include -I$(BUILD_ROOT_SST1)\include
!if "$(FX_SST96_PAGE_FIFO)" != "1" !if "$(FX_SST96_PAGE_FIFO)" != "1"
LCDEFS = $(LCDEFS) -DSST96_ALT_FIFO_WRAP LCDEFS = $(LCDEFS) -DSST96_ALT_FIFO_WRAP
!endif !endif
# sources # sources
@@ -34,10 +34,10 @@ CFILES = sst1init.c info.c print.c parse.c gamma.c util.c \
sli.c video.c dac.c gdebug.c sli.c video.c dac.c gdebug.c
!if "$(FX_DLL_BUILDSST1INIT)" == "1" !if "$(FX_DLL_BUILDSST1INIT)" == "1"
SUBLIBRARIES = $(BUILD_ROOT_SWLIBS)\lib\fxpci.lib SUBLIBRARIES = $(BUILD_ROOT_SWLIBS)\lib\fxpci.lib
FX_DLL_LIBRARY = 1 FX_DLL_LIBRARY = 1
!else !else
SUBLIBRARIES = SUBLIBRARIES =
!endif !endif
# targets # targets

View File

@@ -31,8 +31,6 @@
#include <string.h> #include <string.h>
#include <gdebug.h> #include <gdebug.h>
/* This is currently disabled, thus breaking rush, until we can get some
* sources from Aliance Semiconductor */
#if SST96 #if SST96
static FxBool setVideo( FxU32 hWnd, static FxBool setVideo( FxU32 hWnd,
GrScreenResolution_t sRes, GrScreenResolution_t sRes,
@@ -45,7 +43,8 @@ static FxBool setVideo( FxU32 hWnd,
int *yres, int *yres,
int *fbStride, int *fbStride,
sst1VideoTimingStruct *vidTimings) { sst1VideoTimingStruct *vidTimings) {
return init96SetVideo( hWnd, sRes, vRefresh, cFormat, yOrigin,
return init96SetVideo( hWnd, sRes, vRefresh, cFormat, yOrigin,
nColBuffers, nAuxBuffers, nColBuffers, nAuxBuffers,
&context->info.regs, &context->info.regs,
xres, yres, fbStride ); xres, yres, fbStride );
@@ -66,19 +65,17 @@ static void disableTransport( void ) {
static void swapBuffers( FxU32 code ) { static void swapBuffers( FxU32 code ) {
if ( context && context->writeMethod ) if ( context && context->writeMethod )
init96Swap( code, &context->info.regs, context->writeMethod ); init96Swap( code, &context->info.regs, context->writeMethod );
} }
static FxU32 status( void ) { static FxU32 status( void ) {
return *(context->info.regs.hwDep.VG96RegDesc.serialStatus); return *(context->info.regs.hwDep.VG96RegDesc.serialStatus);
} }
static FxBool busy(void) { static FxBool busy(void) {
FxBool rv; FxBool rv;
rv = (status() & 0x1) ? FXTRUE : FXFALSE; rv = (status() & 0x1) ? FXTRUE : FXFALSE;
return rv; return rv;
} }
static void idle( void ) { static void idle( void ) {
init96Idle(context->writeMethod); init96Idle(context->writeMethod);
@@ -154,7 +151,7 @@ void vg96DriverInit( InitContext *context ) {
context->gammaRGB = gammargb; context->gammaRGB = gammargb;
context->initGammaTable = gammatable; context->initGammaTable = gammatable;
context->findVidTimingStruct = findvidtiming; context->findVidTimingStruct = findvidtiming;
} }
#else #else
/* I've got to stub this one to get the Voodoo Graphics glide to link */ /* I've got to stub this one to get the Voodoo Graphics glide to link */
void vg96DriverInit( InitContext *context ) { void vg96DriverInit( InitContext *context ) {
@@ -182,6 +179,3 @@ void vg96DriverInit( InitContext *context ) {
} }
#endif #endif

View File

@@ -97,18 +97,17 @@ static void disableTransport( void ) {
} }
static void swapBuffers( FxU32 code ) { static void swapBuffers( FxU32 code ) {
} }
static FxU32 status( void ) { static FxU32 status( void ) {
return sst1InitReturnStatus((FxU32 *) context->info.hwDep.vgInfo.vgBaseAddr); return sst1InitReturnStatus((FxU32 *) context->info.hwDep.vgInfo.vgBaseAddr);
} }
static FxBool busy(void) { static FxBool busy(void) {
FxU32 stat = status(); FxU32 stat = status();
FxBool ret = (stat & SST_BUSY) ? FXTRUE : FXFALSE; FxBool ret = (stat & SST_BUSY) ? FXTRUE : FXFALSE;
return ret; return ret;
} }
static void idle( void ) { static void idle( void ) {
sst1InitIdle((FxU32 *)context->info.hwDep.vgInfo.vgBaseAddr); sst1InitIdle((FxU32 *)context->info.hwDep.vgInfo.vgBaseAddr);
@@ -193,4 +192,3 @@ void vgDriverInit( InitContext *context ) {
context->findVidTimingStruct = findvidtiming; context->findVidTimingStruct = findvidtiming;
} }