diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:59 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-26 22:48:59 +0000 |
commit | 38373de7d137f5ff5d612e58153fc932d0f7391b (patch) | |
tree | 97a7553421bb7ca739dc98c2bbecb30de1e2334f | |
parent | 0426f1a5c7f962ad5fab3bbec48b59658217c19f (diff) |
merge latest (4.3.99.16) from XFree86 (vendor) branch
-rw-r--r-- | man/nsc.man | 4 | ||||
-rw-r--r-- | src/gfx/disp_gu2.c | 6 | ||||
-rw-r--r-- | src/gfx/gfx_defs.h | 30 | ||||
-rw-r--r-- | src/gfx/i2c_acc.c | 4 | ||||
-rw-r--r-- | src/gfx/tv_fs451.c | 6 | ||||
-rw-r--r-- | src/gfx/vid_rdcl.c | 4 | ||||
-rw-r--r-- | src/nsc.h | 4 | ||||
-rw-r--r-- | src/nsc_driver.c | 5 | ||||
-rw-r--r-- | src/nsc_gx1_accel.c | 13 | ||||
-rw-r--r-- | src/nsc_gx1_cursor.c | 5 | ||||
-rw-r--r-- | src/nsc_gx1_driver.c | 25 | ||||
-rw-r--r-- | src/nsc_gx1_video.c | 56 | ||||
-rw-r--r-- | src/nsc_gx2_accel.c | 13 | ||||
-rw-r--r-- | src/nsc_gx2_cursor.c | 5 | ||||
-rw-r--r-- | src/nsc_gx2_driver.c | 22 | ||||
-rw-r--r-- | src/nsc_gx2_vga.c | 13 | ||||
-rw-r--r-- | src/nsc_gx2_video.c | 58 | ||||
-rw-r--r-- | src/panel/cen9211.c | 4 | ||||
-rw-r--r-- | src/panel/platform.c | 6 |
19 files changed, 87 insertions, 196 deletions
diff --git a/man/nsc.man b/man/nsc.man index c9df3c0..f5a5f6f 100644 --- a/man/nsc.man +++ b/man/nsc.man @@ -1,4 +1,4 @@ -.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc.man,v 1.1 2002/12/10 15:12:23 alanh Exp $ +.\" $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc.man,v 1.2 2003/05/29 21:48:09 herrb Exp $ .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH NSC __drivermansuffix__ __vendorversion__ @@ -80,7 +80,7 @@ Default: off. .BI "Option \*qOSMImageBuffers\*q \*q" integer \*q This sets the number of scanline buffers to be allocated in offscreen memory for acceleration. This can take any value 0 will disable the -allocation. Disabled if cannot alocate requested scanline memory. +allocation. Disabled if cannot allocate requested scanline memory. Default: 20. .TP .BI "Option \*qColorKey\*q \*q" integer \*q diff --git a/src/gfx/disp_gu2.c b/src/gfx/disp_gu2.c index ba72e88..c0aab15 100644 --- a/src/gfx/disp_gu2.c +++ b/src/gfx/disp_gu2.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/disp_gu2.c,v 1.4 2003/02/06 17:46:02 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/disp_gu2.c,v 1.5 2003/11/03 05:11:22 tsi Exp $ */ /* * $Workfile: disp_gu2.c $ * @@ -1558,13 +1558,13 @@ void gfx_set_display_video_enable(int enable) #endif { - unsigned long lock, gcfg, dcfg; + unsigned long lock, gcfg; /* READ CURRENT VALUES */ lock = READ_REG32(MDC_UNLOCK); gcfg = READ_REG32(MDC_GENERAL_CFG); - dcfg = READ_REG32(MDC_DISPLAY_CFG); + (void) READ_REG32(MDC_DISPLAY_CFG); /* SET OR CLEAR VIDEO ENABLE IN GENERAL_CFG */ diff --git a/src/gfx/gfx_defs.h b/src/gfx/gfx_defs.h index 8847e5b..42df074 100644 --- a/src/gfx/gfx_defs.h +++ b/src/gfx/gfx_defs.h @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/gfx_defs.h,v 1.2 2002/12/11 22:51:01 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/gfx_defs.h,v 1.3 2003/11/03 05:11:23 tsi Exp $ */ /* * $Workfile: gfx_defs.h $ * @@ -144,13 +144,13 @@ (*(volatile unsigned short *)(gfx_virt_regptr + (offset))) = (value) #define WRITE_REG32(offset, value) \ - (*(volatile unsigned long *)(gfx_virt_regptr + (offset))) = (value) + (*(volatile unsigned int *)(gfx_virt_regptr + (offset))) = (value) #define READ_REG16(offset) \ (*(volatile unsigned short *)(gfx_virt_regptr + (offset))) #define READ_REG32(offset) \ - (*(volatile unsigned long *)(gfx_virt_regptr + (offset))) + (*(volatile unsigned int *)(gfx_virt_regptr + (offset))) /* ACCESS TO THE ACCELERATOR REGISTERS (REDCLOUD ONLY) */ @@ -161,18 +161,18 @@ (*(volatile unsigned short *)(gfx_virt_gpptr + (offset))) = (value) #define WRITE_GP32(offset, value) \ - (*(volatile unsigned long *)(gfx_virt_gpptr + (offset))) = (value) + (*(volatile unsigned int *)(gfx_virt_gpptr + (offset))) = (value) #define READ_GP16(offset) \ (*(volatile unsigned short *)(gfx_virt_gpptr + (offset))) #define READ_GP32(offset) \ - (*(volatile unsigned long *)(gfx_virt_gpptr + (offset))) + (*(volatile unsigned int *)(gfx_virt_gpptr + (offset))) /* ACCESS TO THE FRAME BUFFER */ #define WRITE_FB32(offset, value) \ - (*(volatile unsigned long *)(gfx_virt_fbptr + (offset))) = (value) + (*(volatile unsigned int *)(gfx_virt_fbptr + (offset))) = (value) #define WRITE_FB16(offset, value) \ (*(volatile unsigned short *)(gfx_virt_fbptr + (offset))) = (value) @@ -183,23 +183,23 @@ /* ACCESS TO THE VIDEO HARDWARE */ #define READ_VID32(offset) \ - (*(volatile unsigned long *)(gfx_virt_vidptr + (offset))) + (*(volatile unsigned int *)(gfx_virt_vidptr + (offset))) #define WRITE_VID32(offset, value) \ - (*(volatile unsigned long *)(gfx_virt_vidptr + (offset))) = (value) + (*(volatile unsigned int *)(gfx_virt_vidptr + (offset))) = (value) /* ACCESS TO THE VIP HARDWARE */ #define READ_VIP32(offset) \ - (*(volatile unsigned long *)(gfx_virt_vipptr + (offset))) + (*(volatile unsigned int *)(gfx_virt_vipptr + (offset))) #define WRITE_VIP32(offset, value) \ - (*(volatile unsigned long *)(gfx_virt_vipptr + (offset))) = (value) + (*(volatile unsigned int *)(gfx_virt_vipptr + (offset))) = (value) /* ACCESS TO THE SCRATCHPAD RAM */ #define WRITE_SCRATCH32(offset, value) \ - (*(volatile unsigned long *)(gfx_virt_spptr + (offset))) = (value) + (*(volatile unsigned int *)(gfx_virt_spptr + (offset))) = (value) #define WRITE_SCRATCH16(offset, value) \ (*(volatile unsigned short *)(gfx_virt_spptr + (offset))) = (value) @@ -211,7 +211,7 @@ (*(volatile unsigned short *)(gfx_virt_spptr + (offset))) #define READ_SCRATCH32(offset) \ - (*(volatile unsigned long *)(gfx_virt_spptr + (offset))) + (*(volatile unsigned int *)(gfx_virt_spptr + (offset))) /* ACCESS TO MSRS */ @@ -318,7 +318,7 @@ void gfx_msr_asm_read(unsigned short msrReg, unsigned long msrAddr, /* WRITE DWORDS */ \ \ for (i = 0; i < dword_bytes; i += 4) \ - *((volatile unsigned long *)(gfx_gx1_scratch_base + i)) = *((unsigned long *)(aroffset + i)); \ + *((volatile unsigned int *)(gfx_gx1_scratch_base + i)) = *((unsigned int *)(aroffset + i)); \ \ /* WRITE BYTES */ \ \ @@ -348,7 +348,7 @@ void gfx_msr_asm_read(unsigned short msrReg, unsigned long msrAddr, unsigned long i; \ unsigned long aroffset = (unsigned long)array + (array_offset); \ for (i = 0; i < bytes; i += 4) \ - WRITE_FB32 ((fboffset) + i, *((unsigned long *)(aroffset + i))); \ + WRITE_FB32 ((fboffset) + i, *((unsigned int *)(aroffset + i))); \ } #endif @@ -393,7 +393,7 @@ void gfx_msr_asm_read(unsigned short msrReg, unsigned long msrAddr, { \ temp = (unsigned long)array + (array_offset); \ for (counter = 0; counter < dwords; counter++) \ - WRITE_GP32 (regoffset, *((unsigned long *)temp + counter)); \ + WRITE_GP32 (regoffset, *((unsigned int *)temp + counter)); \ } /************************************************************************************ diff --git a/src/gfx/i2c_acc.c b/src/gfx/i2c_acc.c index ff205eb..2ffd89b 100644 --- a/src/gfx/i2c_acc.c +++ b/src/gfx/i2c_acc.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/i2c_acc.c,v 1.1 2002/12/10 15:12:26 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/i2c_acc.c,v 1.2 2003/11/03 05:11:23 tsi Exp $ */ /* * $Workfile: i2c_acc.c $ * @@ -937,7 +937,7 @@ acc_i2c_set_freq(unsigned char busnum, char freq) OUTB((unsigned short)(bus_base_address + ACBCTL2), 0x0); - if (freq == -1) + if (freq == (char)(-1)) freq = 0x71; else { freq = freq << 1; diff --git a/src/gfx/tv_fs451.c b/src/gfx/tv_fs451.c index 6072ec7..d4e3fd2 100644 --- a/src/gfx/tv_fs451.c +++ b/src/gfx/tv_fs451.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/tv_fs451.c,v 1.1 2002/12/10 15:12:27 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/tv_fs451.c,v 1.2 2003/11/03 05:11:23 tsi Exp $ */ /* * $Workfile: tv_fs451.c $ * $Revision$ @@ -139,10 +139,10 @@ */ #if GFX_TV_DYNAMIC int -fs451_set_tv_format(int format, int resolution) +fs451_set_tv_format(TVStandardType format, GfxOnTVType resolution) #else int -gfx_set_tv_format(int format, int resolution) +gfx_set_tv_format(TVStandardType format, GfxOnTVType resolution) #endif { /* ### ADD ### IMPLEMENTATION */ diff --git a/src/gfx/vid_rdcl.c b/src/gfx/vid_rdcl.c index 8e429d8..b6dbc35 100644 --- a/src/gfx/vid_rdcl.c +++ b/src/gfx/vid_rdcl.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/vid_rdcl.c,v 1.3 2003/02/21 16:51:10 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/gfx/vid_rdcl.c,v 1.4 2003/11/03 05:11:23 tsi Exp $ */ /* * $Workfile: vid_rdcl.c $ * @@ -446,7 +446,6 @@ gfx_set_clock_frequency(unsigned long frequency) { Q_WORD msr_value; unsigned int i, index = 0; - unsigned long value; long timeout = 1000; long min, diff; RCDFPLLENTRY *PllTable; @@ -462,7 +461,6 @@ gfx_set_clock_frequency(unsigned long frequency) /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */ /* Search the table for the closest frequency (16.16 format). */ - value = PllTable[0].pll_value; min = (long)PllTable[0].frequency - frequency; if (min < 0L) min = -min; @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc.h,v 1.5 2003/02/21 16:51:09 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc.h,v 1.6 2003/11/03 05:11:20 tsi Exp $ */ /* * $Workfile: nsc.h $ * $Revision$ @@ -409,7 +409,7 @@ typedef struct GeodeRec, *GeodePtr; /* option flags are self-explanatory */ -enum +typedef enum { OPTION_SW_CURSOR, OPTION_HW_CURSOR, diff --git a/src/nsc_driver.c b/src/nsc_driver.c index d34aaf6..da856c6 100644 --- a/src/nsc_driver.c +++ b/src/nsc_driver.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_driver.c,v 1.4 2003/02/12 13:08:54 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_driver.c,v 1.5 2003/04/23 21:51:41 tsi Exp $ */ /* * $Workfile: nsc_driver.c $ * $Revision$ @@ -199,12 +199,10 @@ #include "extensions/xf86dgastr.h" #endif /* XFreeXDGA */ -#ifdef DPMSExtension #include "globals.h" #include "opaque.h" #define DPMS_SERVER #include "extensions/dpms.h" -#endif /* DPMSExtension */ #define EXTERN /* Our private include file (this also includes the durango headers) */ @@ -374,7 +372,6 @@ const char *nscXaaSymbols[] = { "XAADestroyInfoRec", "XAACreateInfoRec", "XAAInit", - "XAAScreenIndex", NULL }; diff --git a/src/nsc_gx1_accel.c b/src/nsc_gx1_accel.c index 7359c0d..3f7fce9 100644 --- a/src/nsc_gx1_accel.c +++ b/src/nsc_gx1_accel.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_accel.c,v 1.5 2003/02/11 13:36:41 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_accel.c,v 1.6 2003/11/03 05:11:20 tsi Exp $ */ /* * $Workfile: nsc_gx1_accel.c $ * $Revision$ @@ -171,7 +171,6 @@ static int Geodesrcx; static int Geodesrcy; static int Geodewidth; static int Geodeheight; -static int Geodebpp; static int GeodeCounter; #if !defined(STB_X) @@ -181,7 +180,9 @@ static unsigned short Geode_vector_mode = 0; static unsigned short Geode_buffer_width = 0; #endif static unsigned int gu1_bpp = 0; +#if SCR2SCREXP static unsigned int gu1_xshift = 1; +#endif static unsigned int gu1_yshift = 1; static unsigned short GeodebufferWidthPixels; static unsigned int ImgBufOffset; @@ -189,9 +190,11 @@ static unsigned short Geodebb0Base; static unsigned short Geodebb1Base; static XAAInfoRecPtr localRecPtr; +#if SCR2SCREXP #define CALC_FBOFFSET(_SrcX, _SrcY) \ (((unsigned int) (_SrcY) << gu1_yshift) |\ (((unsigned int) (_SrcX)) << gu1_xshift)) +#endif #define GFX_WAIT_BUSY while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_BUSY) { ; } #define GFX_WAIT_PENDING while(READ_REG16(GP_BLIT_STATUS) & BS_BLIT_PENDING) { ; } @@ -473,7 +476,7 @@ GX1Subsequent8x8PatternColorExpand(ScrnInfoPtr pScreenInfo, * fg :Specifies the foreground color * bg :Specifies the background color * planemask :Specifies the value of masking from rop data - + * * Returns :none. * * Comments :none. @@ -670,7 +673,6 @@ GX1SetupForScanlineImageWrite(ScrnInfoPtr pScreenInfo, /* SAVE TRANSPARENCY FLAG */ GeodeTransparent = (transparency_color == -1) ? 0 : 1; GeodeTransColor = transparency_color; - Geodebpp = bpp; } /*---------------------------------------------------------------------------- @@ -1369,7 +1371,6 @@ OPTGX1SetupForScanlineImageWrite(ScrnInfoPtr pScreenInfo, int rop, unsigned int planemask, int transparency_color, int bpp, int depth) { - Geodebpp = bpp; OPTGX1SetupForScreenToScreenCopy(pScreenInfo, 0, 0, rop, planemask, transparency_color); } @@ -1667,7 +1668,9 @@ GX1AccelInit(ScreenPtr pScreen) break; } +#if SCR2SCREXP gu1_xshift = pScreenInfo->bitsPerPixel >> 4; +#endif switch (pGeode->Pitch) { case 1024: diff --git a/src/nsc_gx1_cursor.c b/src/nsc_gx1_cursor.c index 9132ac6..dcf785a 100644 --- a/src/nsc_gx1_cursor.c +++ b/src/nsc_gx1_cursor.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_cursor.c,v 1.5 2003/02/21 16:51:09 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_cursor.c,v 1.6 2003/11/03 05:11:20 tsi Exp $ */ /* * $Workfile: nsc_gx1_cursor.c $ * $Revision$ @@ -298,14 +298,13 @@ GX1SetCursorPosition(ScrnInfoPtr pScreenInfo, int x, int y) void GX1LoadCursorImage(ScrnInfoPtr pScreenInfo, unsigned char *src) { - int i, j; + int i; unsigned long shape; unsigned long mask; unsigned long andMask[32] = { 0, }; unsigned long xorMask[32] = { 0, }; GeodePtr pGeode = GEODEPTR(pScreenInfo); - j = 0; for (i = 0; i < 32; i++) { if (src) { shape = ((unsigned long)src[i * 4] << 24) | diff --git a/src/nsc_gx1_driver.c b/src/nsc_gx1_driver.c index a4a860b..cf1c308 100644 --- a/src/nsc_gx1_driver.c +++ b/src/nsc_gx1_driver.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_driver.c,v 1.7 2003/02/14 13:28:29 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_driver.c,v 1.11 2003/11/03 05:11:20 tsi Exp $ */ /* * $Workfile: nsc_gx1_driver.c $ * $Revision$ @@ -204,12 +204,10 @@ #include "extensions/xf86dgastr.h" #endif /* XFreeXDGA */ -#ifdef DPMSExtension #include "globals.h" #include "opaque.h" #define DPMS_SERVER #include "extensions/dpms.h" -#endif /* DPMSExtension */ /* Our private include file (this also includes the durango headers) */ #include "nsc.h" @@ -273,7 +271,7 @@ static void GX1LeaveVT(int, int); static void GX1FreeScreen(int, int); void GX1AdjustFrame(int, int, int, int); Bool GX1SwitchMode(int, DisplayModePtr, int); -static int GX1ValidMode(int, DisplayModePtr, Bool, int); +static ModeStatus GX1ValidMode(int, DisplayModePtr, Bool, int); static void GX1LoadPalette(ScrnInfoPtr pScreenInfo, int numColors, int *indizes, LOCO * colors, VisualPtr pVisual); @@ -476,9 +474,9 @@ GX1PreInit(ScrnInfoPtr pScreenInfo, int flags) MessageType from; int i = 0; GeodePtr pGeode; +#if CFB char *mod = NULL; -#if CFB char *reqSymbol = NULL; #endif @@ -562,7 +560,7 @@ GX1PreInit(ScrnInfoPtr pScreenInfo, int flags) pScreenInfo->monitor = pScreenInfo->confScreen->monitor; GeodeDebug(("GX1PreInit(2)!\n")); /* Determine depth, bpp, etc. */ - if (!xf86SetDepthBpp(pScreenInfo, 8, 8, 8, 0)) { + if (!xf86SetDepthBpp(pScreenInfo, 16, 0, 0, 0)) { return FALSE; } else { @@ -1021,10 +1019,11 @@ GX1PreInit(ScrnInfoPtr pScreenInfo, int flags) /* Set the display resolution */ xf86SetDpi(pScreenInfo, 0, 0); GeodeDebug(("GX1PreInit(14)!\n")); + +#if CFB /* Load bpp-specific modules */ mod = NULL; -#if CFB /* Load bpp-specific modules */ switch (pScreenInfo->bitsPerPixel) { case 8: @@ -1088,6 +1087,7 @@ GX1PreInit(ScrnInfoPtr pScreenInfo, int flags) GeodeDebug(("GX1PreInit(19)!\n")); GeodeDebug(("GX1PreInit(20)!\n")); GeodeDebug(("GX1PreInit ... done successfully!\n")); + (void) from; return TRUE; } @@ -1260,7 +1260,8 @@ GX1SetMode(ScrnInfoPtr pScreenInfo, DisplayModePtr pMode) #else /* sequence might be important */ gfx_set_tv_display(pGeode->TvParam.wWidth, pGeode->TvParam.wHeight); - gfx_set_tv_format(pGeode->TvParam.wStandard, pGeode->TvParam.wType); + gfx_set_tv_format((TVStandardType)pGeode->TvParam.wStandard, + (GfxOnTVType)pGeode->TvParam.wType); gfx_set_tv_output(pGeode->TvParam.wOutput); gfx_set_tv_enable(pGeode->TvParam.bState); @@ -1704,7 +1705,6 @@ GX1CloseScreen(int scrnIndex, ScreenPtr pScreen) } -#ifdef DPMSExtension /*---------------------------------------------------------------------------- * GX1DPMSet. * @@ -1791,7 +1791,6 @@ GX1DPMSSet(ScrnInfoPtr pScreenInfo, int mode, int flags) break; } } -#endif /*---------------------------------------------------------------------------- * GX1ScreenInit. @@ -2135,9 +2134,7 @@ GX1ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } ShadowFBInit(pScreen, refreshArea); } -#ifdef DPMSExtension xf86DPMSInit(pScreen, GX1DPMSSet, 0); -#endif GeodeDebug(("GX1ScreenInit(12)!\n")); if (pGeode->TV_Overscan_On) { @@ -2312,7 +2309,7 @@ GX1FreeScreen(int scrnIndex, int flags) * Comments :none. *---------------------------------------------------------------------------- */ -static int +static ModeStatus GX1ValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags) { ScrnInfoPtr pScreenInfo = xf86Screens[scrnIndex]; @@ -2334,7 +2331,7 @@ GX1ValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags) #else ret = gfx_is_tv_display_mode_supported(pMode->CrtcHDisplay, pMode->CrtcVDisplay, - pGeode->TvParam.wStandard); + (TVStandardType)pGeode->TvParam.wStandard); #endif } } else { diff --git a/src/nsc_gx1_video.c b/src/nsc_gx1_video.c index 1e62ca2..e220035 100644 --- a/src/nsc_gx1_video.c +++ b/src/nsc_gx1_video.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_video.c,v 1.6 2003/02/21 16:51:09 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_video.c,v 1.8 2003/11/10 18:22:23 tsi Exp $ */ /* * $Workfile: nsc_gx1_video.c $ * $Revision$ @@ -176,18 +176,6 @@ void GX1InitVideo(ScreenPtr pScreen); void GX1ResetVideo(ScrnInfoPtr pScrn); -#ifndef XvExtension -void -GX1InitVideo(ScreenPtr pScreen) -{ -} - -void -GX1ResetVideo(ScrnInfoPtr pScrn) -{ -} -#else - #define DBUF 0 static XF86VideoAdaptorPtr GX1SetupImageVideo(ScreenPtr); @@ -504,7 +492,7 @@ GX1SetupImageVideo(ScreenPtr pScreen) #endif /* gotta uninit this someplace */ - REGION_INIT(pScreen, &pPriv->clip, NullBox, 0); + REGION_NULL(pScreen, &pPriv->clip); pGeode->adaptor = adapt; @@ -523,36 +511,6 @@ GX1SetupImageVideo(ScreenPtr pScreen) return adapt; } -#if REINIT -static Bool -RegionsEqual(RegionPtr A, RegionPtr B) -{ - int *dataA, *dataB; - int num; - - num = REGION_NUM_RECTS(A); - if (num != REGION_NUM_RECTS(B)) - return FALSE; - - if ((A->extents.x1 != B->extents.x1) || - (A->extents.x2 != B->extents.x2) || - (A->extents.y1 != B->extents.y1) || (A->extents.y2 != B->extents.y2)) - return FALSE; - - dataA = (int *)REGION_RECTS(A); - dataB = (int *)REGION_RECTS(B); - - while (num--) { - if ((dataA[0] != dataB[0]) || (dataA[1] != dataB[1])) - return FALSE; - dataA += 2; - dataB += 2; - } - - return TRUE; -} -#endif - /*---------------------------------------------------------------------------- * GX1StopVideo * @@ -1144,7 +1102,7 @@ GX1PutImage(ScrnInfoPtr pScrn, #if REINIT /* update cliplist */ - if (!RegionsEqual(&pPriv->clip, clipBoxes)) { + if (!REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes)) { ReInitVideo = TRUE; } if (ReInitVideo) { @@ -1257,12 +1215,10 @@ GX1PutImage(ScrnInfoPtr pScrn, #if REINIT /* update cliplist */ - REGION_COPY(pScreen, &pPriv->clip, clipBoxes); + REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes); if (pPriv->colorKeyMode == 0) { /* draw these */ - XAAFillSolidRects(pScrn, pPriv->colorKey, GXcopy, ~0, - REGION_NUM_RECTS(clipBoxes), - REGION_RECTS(clipBoxes)); + xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes); } GX1DisplayVideo(pScrn, id, offset, width, height, dstPitch, Bx1, By1, Bx2, By2, &dstBox, src_w, src_h, drw_w, @@ -1625,5 +1581,3 @@ GX1InitOffscreenImages(ScreenPtr pScreen) xf86XVRegisterOffscreenImages(pScreen, offscreenImages, 1); } - -#endif /* !XvExtension */ diff --git a/src/nsc_gx2_accel.c b/src/nsc_gx2_accel.c index d8730e4..2f0dbf9 100644 --- a/src/nsc_gx2_accel.c +++ b/src/nsc_gx2_accel.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_accel.c,v 1.4 2003/02/21 16:51:09 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_accel.c,v 1.5 2003/11/03 05:11:20 tsi Exp $ */ /* * $Workfile: nsc_gx2_accel.c $ * $Revision$ @@ -168,7 +168,6 @@ static int Geodesrcx; static int Geodesrcy; static int Geodewidth; static int Geodeheight; -static int Geodebpp; static int GeodeCounter; #if !defined(STB_X) @@ -180,7 +179,9 @@ static unsigned int gu2_xshift = 1; static unsigned int gu2_yshift = 1; static unsigned int gu2_bpp = 1; static unsigned int SetCPUToScreen = 0; +#if IMGWRITE_SUPPORT static unsigned int SetImageWriteRect = 0; +#endif static unsigned int ImgBufOffset; #define GU2_WAIT_PENDING while(READ_GP32(MGP_BLT_STATUS) & MGP_BS_BLT_PENDING) @@ -693,7 +694,6 @@ GX2SetupForImageWrite(ScrnInfoPtr pScreenInfo, /* SAVE TRANSPARENCY FLAG */ GeodeTransparent = (transparency_color == -1) ? 0 : 1; GeodeTransColor = transparency_color; - Geodebpp = bpp; } void @@ -704,7 +704,9 @@ GX2SubsequentImageWriteRect(ScrnInfoPtr pScreenInfo, Geodedsty = y; Geodewidth = w; Geodeheight = h; +#if IMGWRITE_SUPPORT SetImageWriteRect = 1; +#endif } @@ -740,7 +742,6 @@ GX2SetupForScanlineImageWrite(ScrnInfoPtr pScreenInfo, /* SAVE TRANSPARENCY FLAG */ GeodeTransparent = (transparency_color == -1) ? 0 : 1; GeodeTransColor = transparency_color; - Geodebpp = bpp; } /*---------------------------------------------------------------------------- @@ -1611,8 +1612,9 @@ OPTGX2SubsequentImageWriteRect(ScrnInfoPtr pScreenInfo, Geodedsty = y; Geodewidth = w; Geodeheight = h; - +#if IMGWRITE_SUPPORT SetImageWriteRect = 1; +#endif } /*---------------------------------------------------------------------------- @@ -1638,7 +1640,6 @@ OPTGX2SetupForScanlineImageWrite(ScrnInfoPtr pScreenInfo, int rop, unsigned int planemask, int transparency_color, int bpp, int depth) { - Geodebpp = bpp; OPTGX2SetupForScreenToScreenCopy(pScreenInfo, 0, 0, rop, planemask, transparency_color); } diff --git a/src/nsc_gx2_cursor.c b/src/nsc_gx2_cursor.c index f4a35db..ecf2704 100644 --- a/src/nsc_gx2_cursor.c +++ b/src/nsc_gx2_cursor.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_cursor.c,v 1.5 2003/02/21 16:51:09 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_cursor.c,v 1.6 2003/11/03 05:11:20 tsi Exp $ */ /* * $Workfile: nsc_gx2_cursor.c $ * $Revision$ @@ -295,14 +295,13 @@ GX2SetCursorPosition(ScrnInfoPtr pScreenInfo, int x, int y) void GX2LoadCursorImage(ScrnInfoPtr pScreenInfo, unsigned char *src) { - int i, j; + int i; unsigned long shape; unsigned long mask; unsigned long andMask[32] = { 0, }; unsigned long xorMask[32] = { 0, }; GeodePtr pGeode = GEODEPTR(pScreenInfo); - j = 0; for (i = 0; i < 32; i++) { if (src) { shape = ((unsigned long)src[i * 4] << 24) | diff --git a/src/nsc_gx2_driver.c b/src/nsc_gx2_driver.c index e21edc1..cc937a8 100644 --- a/src/nsc_gx2_driver.c +++ b/src/nsc_gx2_driver.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_driver.c,v 1.6 2003/02/12 13:08:54 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_driver.c,v 1.10 2003/11/03 05:11:20 tsi Exp $ */ /* * $Workfile: nsc_gx2_driver.c $ * $Revision$ @@ -200,12 +200,10 @@ #include "extensions/xf86dgastr.h" #endif /* XFreeXDGA */ -#ifdef DPMSExtension #include "globals.h" #include "opaque.h" #define DPMS_SERVER #include "extensions/dpms.h" -#endif /* DPMSExtension */ /* Our private include file (this also includes the durango headers) */ #include "nsc.h" @@ -232,7 +230,7 @@ static void GX2LeaveVT(int, int); static void GX2FreeScreen(int, int); void GX2AdjustFrame(int, int, int, int); Bool GX2SwitchMode(int, DisplayModePtr, int); -static int GX2ValidMode(int, DisplayModePtr, Bool, int); +static ModeStatus GX2ValidMode(int, DisplayModePtr, Bool, int); static void GX2LoadPalette(ScrnInfoPtr pScreenInfo, int numColors, int *indizes, LOCO * colors, VisualPtr pVisual); @@ -476,9 +474,8 @@ GX2PreInit(ScrnInfoPtr pScreenInfo, int flags) MessageType from; int i = 0; GeodePtr pGeode; - char *mod = NULL; - #if CFB + char *mod = NULL; char *reqSymbol = NULL; #endif /* CFB */ #if defined(STB_X) @@ -634,12 +631,12 @@ GX2PreInit(ScrnInfoPtr pScreenInfo, int flags) SupportFlags = Support24bppFb | Support32bppFb; GeodeDebug(("GX2PreInit(2)!\n")); /* Determine depth, bpp, etc. */ - if (!xf86SetDepthBpp(pScreenInfo, 8, 8, 8, SupportFlags)) { + if (!xf86SetDepthBpp(pScreenInfo, 0, 0, 0, SupportFlags)) { return FALSE; } else { if (!((pScreenInfo->depth == 8) || (pScreenInfo->depth == 16) || - (pScreenInfo->depth == 24) || (pScreenInfo->depth == 32))) { + (pScreenInfo->depth == 24))) { /* Depth not supported */ DEBUGMSG(1, (pScreenInfo->scrnIndex, X_ERROR, "Given depth (%d bpp) is not supported by this driver\n", @@ -981,10 +978,10 @@ GX2PreInit(ScrnInfoPtr pScreenInfo, int flags) xf86SetDpi(pScreenInfo, 0, 0); GeodeDebug(("GX2PreInit(14)!\n")); +#if CFB /* Load bpp-specific modules */ mod = NULL; -#if CFB /* Load bpp-specific modules */ switch (pScreenInfo->bitsPerPixel) { case 8: @@ -1054,6 +1051,7 @@ GX2PreInit(ScrnInfoPtr pScreenInfo, int flags) } GX2UnmapMem(pScreenInfo); GeodeDebug(("GX2PreInit ... done successfully!\n")); + (void) from; return TRUE; } @@ -1657,7 +1655,6 @@ GX2CloseScreen(int scrnIndex, ScreenPtr pScreen) return TRUE; } -#ifdef DPMSExtension /*---------------------------------------------------------------------------- * GX2DPMSSet. * @@ -1736,7 +1733,6 @@ GX2DPMSSet(ScrnInfoPtr pScreenInfo, int mode, int flags) break; } } -#endif /*---------------------------------------------------------------------------- * GX2ScreenInit. @@ -2062,9 +2058,7 @@ GX2ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } ShadowFBInit(pScreen, refreshArea); } -#ifdef DPMSExtension xf86DPMSInit(pScreen, GX2DPMSSet, 0); -#endif GeodeDebug(("GX2ScreenInit(12)!\n")); pScreenInfo->memPhysBase = (unsigned long)pGeode->FBBase; @@ -2223,7 +2217,7 @@ GX2FreeScreen(int scrnIndex, int flags) * Comments :none. *---------------------------------------------------------------------------- */ -static int +static ModeStatus GX2ValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags) { unsigned int total_memory_required; diff --git a/src/nsc_gx2_vga.c b/src/nsc_gx2_vga.c index 9e79e66..2725b10 100644 --- a/src/nsc_gx2_vga.c +++ b/src/nsc_gx2_vga.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_vga.c,v 1.2 2003/01/14 09:34:32 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_vga.c,v 1.3 2003/11/03 05:11:21 tsi Exp $ */ /* * $Workfile: nsc_gx2_vga.c $ * $Revision$ @@ -227,12 +227,10 @@ gu2_vga_seq_blanking(void) int gu2_vga_attr_ctrl(int reset) { - int tmp; - - tmp = gfx_inb(0x3DA); + (void) gfx_inb(0x3DA); gfx_outb(0x3C0, (unsigned char)(reset ? 0x00 : 0x20)); if (reset) - tmp = gfx_inb(0x3DA); + (void) gfx_inb(0x3DA); return (GFX_STATUS_OK); } @@ -250,7 +248,6 @@ gu2_vga_to_gfx(void) void gu2_gfx_to_vga(int vga_mode) { - int tmp; char sequencer; gu2_vga_extcrtc(0x40, vga_mode); @@ -268,9 +265,9 @@ gu2_gfx_to_vga(int vga_mode) gfx_outw(0x3C4, 0x300); /* turn on the attribute controler */ - tmp = gfx_inb(0x3DA); + (void) gfx_inb(0x3DA); gfx_outb(0x3C0, 0x20); - tmp = gfx_inb(0x3DA); + (void) gfx_inb(0x3DA); gu2_vga_extcrtc(0x3F, 0); } diff --git a/src/nsc_gx2_video.c b/src/nsc_gx2_video.c index 30bf731..d4546ef 100644 --- a/src/nsc_gx2_video.c +++ b/src/nsc_gx2_video.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_video.c,v 1.5 2003/02/21 16:51:09 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_video.c,v 1.7 2003/11/10 18:22:24 tsi Exp $ */ /* * $Workfile: nsc_gx2_video.c $ * $Revision$ @@ -172,17 +172,6 @@ #define TIMER_MASK (OFF_TIMER | FREE_TIMER) #define XV_PROFILE 0 #define REINIT 1 -#ifndef XvExtension -void -GX2InitVideo(ScreenPtr pScreen) -{ -} - -void -GX2ResetVideo(ScrnInfoPtr pScrn) -{ -} -#else #define DBUF 1 void GX2InitVideo(ScreenPtr pScreen); @@ -504,7 +493,7 @@ GX2SetupImageVideo(ScreenPtr pScreen) #endif /* gotta uninit this someplace */ - REGION_INIT(pScreen, &pPriv->clip, NullBox, 0); + REGION_NULL(pScreen, &pPriv->clip); pGeode->adaptor = adapt; @@ -523,36 +512,6 @@ GX2SetupImageVideo(ScreenPtr pScreen) return adapt; } -#if REINIT -static Bool -RegionsEqual(RegionPtr A, RegionPtr B) -{ - int *dataA, *dataB; - int num; - - num = REGION_NUM_RECTS(A); - if (num != REGION_NUM_RECTS(B)) - return FALSE; - - if ((A->extents.x1 != B->extents.x1) || - (A->extents.x2 != B->extents.x2) || - (A->extents.y1 != B->extents.y1) || (A->extents.y2 != B->extents.y2)) - return FALSE; - - dataA = (int *)REGION_RECTS(A); - dataB = (int *)REGION_RECTS(B); - - while (num--) { - if ((dataA[0] != dataB[0]) || (dataA[1] != dataB[1])) - return FALSE; - dataA += 2; - dataB += 2; - } - - return TRUE; -} -#endif - /*---------------------------------------------------------------------------- * GX2StopVideo * @@ -1079,7 +1038,7 @@ GX2PutImage(ScrnInfoPtr pScrn, #if REINIT /* update cliplist */ - if (!RegionsEqual(&pPriv->clip, clipBoxes)) { + if (!REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes)) { ReInitVideo = TRUE; } if (ReInitVideo) { @@ -1199,12 +1158,10 @@ GX2PutImage(ScrnInfoPtr pScrn, #if REINIT /* update cliplist */ - REGION_COPY(pScreen, &pPriv->clip, clipBoxes); + REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes); if (pPriv->colorKeyMode == 0) { /* draw these */ - XAAFillSolidRects(pScrn, pPriv->colorKey, GXcopy, ~0, - REGION_NUM_RECTS(clipBoxes), - REGION_RECTS(clipBoxes)); + xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes); } GX2DisplayVideo(pScrn, id, offset, width, height, dstPitch, Bx1, By1, Bx2, By2, &dstBox, src_w, src_h, drw_w, @@ -1237,8 +1194,7 @@ GX2PutImage(ScrnInfoPtr pScrn, REGION_COPY(pScreen, &pPriv->clip, clipBoxes); if (pPriv->colorKeyMode == 0) { /* draw these */ - XAAFillSolidRects(pScrn, pPriv->colorKey, GXcopy, ~0, - REGION_NUM_RECTS(clipBoxes), REGION_RECTS(clipBoxes)); + xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes); } GX2DisplayVideo(pScrn, id, offset, width, height, dstPitch, Bx1, By1, Bx2, By2, &dstBox, src_w, src_h, drw_w, drw_h); @@ -1566,5 +1522,3 @@ GX2InitOffscreenImages(ScreenPtr pScreen) xf86XVRegisterOffscreenImages(pScreen, offscreenImages, 1); } - -#endif /* !XvExtension */ diff --git a/src/panel/cen9211.c b/src/panel/cen9211.c index 85aecdf..7d3a854 100644 --- a/src/panel/cen9211.c +++ b/src/panel/cen9211.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/panel/cen9211.c,v 1.1 2002/12/10 15:12:28 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/panel/cen9211.c,v 1.2 2003/11/03 05:11:24 tsi Exp $ */ /* * $Workfile: cen9211.c $ * @@ -832,11 +832,9 @@ CentaurusProgramFRMload(void) }; unsigned char i; - unsigned short index; unsigned long data; Centaurus_write_gpio(FOUR_BYTES, CS92xx_FRM_MEMORY_INDEX, 0); - index = CS92xx_FRM_MEMORY_DATA; for (i = 0; i < 64; i += 2) { data = CentaurusFRMtable[i]; Centaurus_write_gpio(FOUR_BYTES, CS92xx_FRM_MEMORY_DATA, data); diff --git a/src/panel/platform.c b/src/panel/platform.c index 1248b09..ee98b95 100644 --- a/src/panel/platform.c +++ b/src/panel/platform.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/panel/platform.c,v 1.3 2003/01/14 09:34:36 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/panel/platform.c,v 1.4 2003/11/03 05:11:24 tsi Exp $ */ /* * $Workfile: platform.c $ * $Revision$ @@ -153,7 +153,7 @@ #define PLT_READ_WORDS 5 #define PLT_WRITE_DWORDS 6 #define PLT_READ_DWORDS 7 -#define PLT_UNKNOWN 0xFFFF +#define PLT_UNKNOWN ((SYS_BOARD) 0xFFFF) typedef struct { @@ -295,7 +295,7 @@ FindStringInSeg(unsigned int segment_address, char *string_ptr) char *psegment_buf; unsigned long mem_ptr = (unsigned long)segment_address << 16; char segment_buffer[SEGMENT_LENGTH + 1]; - int i, cursor; + int i, cursor = 0; /* silence compiler */ (void)cursor; |