diff options
author | Adam Jackson <ajax@benzedrine.nwnk.net> | 2007-05-31 14:30:10 -0400 |
---|---|---|
committer | Adam Jackson <ajax@benzedrine.nwnk.net> | 2007-05-31 14:30:10 -0400 |
commit | c37fc13ea909a7a1315d3723ccac0e4146b3a0b2 (patch) | |
tree | 4779b26aa16fca0e5e96c42f69591fff2e66cff6 /src | |
parent | 0953a855c7d20186a8efb6db4842eb777f6e0e56 (diff) |
Add extra GCC warning fu. -Wall cleanup.
Diffstat (limited to 'src')
-rw-r--r-- | src/amd.h | 17 | ||||
-rw-r--r-- | src/amd_common.c | 1 | ||||
-rw-r--r-- | src/amd_gx_driver.c | 14 | ||||
-rw-r--r-- | src/amd_gx_rotate.c | 6 | ||||
-rw-r--r-- | src/amd_gx_video.c | 5 | ||||
-rw-r--r-- | src/amd_lx_driver.c | 14 | ||||
-rw-r--r-- | src/amd_lx_exa.c | 4 | ||||
-rw-r--r-- | src/amd_lx_rotate.c | 8 | ||||
-rw-r--r-- | src/amd_msr.c | 1 | ||||
-rw-r--r-- | src/durango.c | 1 | ||||
-rw-r--r-- | src/gfx/gfx_init.c | 2 | ||||
-rw-r--r-- | src/gfx/msr_rdcl.c | 4 | ||||
-rw-r--r-- | src/gfx/vid_rdcl.c | 10 | ||||
-rw-r--r-- | src/panel/gx2_9211.c | 2 |
14 files changed, 49 insertions, 40 deletions
@@ -37,6 +37,7 @@ #include <X11/extensions/randr.h> #include "xf86xv.h" +#include "randrstr.h" /* We only support EXA version >=2 */ @@ -167,6 +168,7 @@ extern unsigned short gfx_inw(unsigned short port); extern void gfx_outw(unsigned short port, unsigned short data); extern unsigned long gfx_ind(unsigned short port); extern void gfx_outd(unsigned short port, unsigned long data); +void gfx_reset_pitch(unsigned short pitch); #define Q_WORD QQ_WORD #include "gfx_rtns.h" @@ -283,7 +285,7 @@ typedef struct _geodeRec unsigned long FBLinearAddr; unsigned char *FBBase; - unsigned int FBAvail; + int FBAvail; unsigned int FBOffset; unsigned int FBSize; @@ -306,7 +308,7 @@ typedef struct _geodeRec ExaDriverPtr pExa; unsigned int exaBfrOffset; - unsigned int exaBfrSz; + int exaBfrSz; /* XAA structures */ unsigned char **AccelImageWriteBuffers; @@ -478,6 +480,7 @@ int GeodeGetFPGeometry(const char *str, int *width, int *height); void GeodePointerMoved(int index, int x, int y); void GeodeFreeScreen(int scrnIndex, int flags); int GeodeCalculatePitchBytes(unsigned int width, unsigned int bpp); +void GXSetupChipsetFPtr(ScrnInfoPtr pScrn); /* amd_msr.c */ int GeodeReadMSR(unsigned long addr, unsigned long *lo, unsigned long *hi); @@ -492,16 +495,21 @@ void GXShowCursor(ScrnInfoPtr pScrni); /* amd_gx_randr.c */ Rotation GXGetRotation(ScreenPtr pScreen); Bool GXRandRInit(ScreenPtr pScreen, int rotation); +Bool GXRandRSetConfig(ScreenPtr, Rotation, int, RRScreenSizePtr); /* amd_gx_rotate.c */ Bool GXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode); /* amd_gx_accel.c */ Bool GXAccelInit(ScreenPtr pScrn); +void GXAccelSync(ScrnInfoPtr pScrni); /* amd_gx_video.c */ void GXInitVideo(ScreenPtr pScrn); +/* amd_lx_driver.c */ +void LXSetupChipsetFPtr(ScrnInfoPtr pScrn); + /* amd_lx_cursor.c */ Bool LXHWCursorInit(ScreenPtr pScrn); void LXLoadCursorImage(ScrnInfoPtr pScrni, unsigned char *src); @@ -511,6 +519,7 @@ void LXShowCursor(ScrnInfoPtr pScrni); /* amd_lx_randr.c */ Rotation LXGetRotation(ScreenPtr pScreen); Bool LXRandRInit(ScreenPtr pScreen, int rotation); +Bool LXRandRSetConfig(ScreenPtr, Rotation, int, RRScreenSizePtr); /* amd_lx_rotate.c */ Bool LXSetRotatePitch(ScrnInfoPtr pScrni); @@ -521,5 +530,9 @@ Bool LXExaInit(ScreenPtr pScreen); /* amd_lx_video.c */ void LXInitVideo(ScreenPtr pScrn); +void LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, + BoxPtr dstBox, short srcW, short srcH, short drawW, short drawH); +void LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit); +void LXResetVideo(ScrnInfoPtr pScrni); #endif /* _AMD_GEODE_H_ */ diff --git a/src/amd_common.c b/src/amd_common.c index f7e0d73..86a8e86 100644 --- a/src/amd_common.c +++ b/src/amd_common.c @@ -31,6 +31,7 @@ #endif #include "xf86.h" +#include "amd.h" #define move0(d,s,n) \ __asm__ __volatile__( \ diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c index 922dbb5..a739019 100644 --- a/src/amd_gx_driver.c +++ b/src/amd_gx_driver.c @@ -1154,10 +1154,7 @@ GXCreateScreenResources(ScreenPtr pScreen) if (!(*pScreen->CreateScreenResources) (pScreen)) return FALSE; - if (xf86LoaderCheckSymbol("GXRandRSetConfig") - && pGeode->rotation != RR_Rotate_0) { - Rotation(*GXRandRSetConfig) (ScreenPtr pScreen, Rotation rr, int rate, - RRScreenSizePtr pSize) = NULL; + if (pGeode->rotation != RR_Rotate_0) { RRScreenSize p; Rotation requestedRotation = pGeode->rotation; @@ -1170,12 +1167,9 @@ GXCreateScreenResources(ScreenPtr pScreen) p.mmWidth = pScreen->mmWidth; p.mmHeight = pScreen->mmHeight; - GXRandRSetConfig = LoaderSymbol("GXRandRSetConfig"); - if (GXRandRSetConfig) { - pGeode->starting = TRUE; - (*GXRandRSetConfig) (pScreen, requestedRotation, 0, &p); - pGeode->starting = FALSE; - } + pGeode->starting = TRUE; + GXRandRSetConfig(pScreen, requestedRotation, 0, &p); + pGeode->starting = FALSE; } return TRUE; diff --git a/src/amd_gx_rotate.c b/src/amd_gx_rotate.c index 3e464ca..0b81851 100644 --- a/src/amd_gx_rotate.c +++ b/src/amd_gx_rotate.c @@ -135,10 +135,10 @@ GXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode) shadowAdd(pScrni->pScreen, pPixmap, GXUpdate, GXWindowLinear, pGeode->rotation, NULL); - /* XXX - FIXME - bail gracefully */ - - if (!ret) + if (!ret) { ErrorF("shadowAdd failed\n"); + goto error; + } } if (pGeode->rotation == RR_Rotate_0) diff --git a/src/amd_gx_video.c b/src/amd_gx_video.c index 9322da4..d0c48e1 100644 --- a/src/amd_gx_video.c +++ b/src/amd_gx_video.c @@ -764,6 +764,8 @@ static int top, left, npixels, nlines; static int offset, s1offset = 0, s2offset = 0, s3offset = 0; static unsigned char *dst_start; static int d2offset = 0, d3offset = 0; + +#if 0 static Bool RegionsIntersect(BoxPtr pRcl1, BoxPtr pRcl2, BoxPtr pRclResult) { @@ -781,6 +783,7 @@ RegionsIntersect(BoxPtr pRcl1, BoxPtr pRcl2, BoxPtr pRclResult) return (FALSE); } +#endif void GXSetVideoPosition(int x, int y, int width, int height, @@ -792,7 +795,9 @@ GXSetVideoPosition(int x, int y, int width, int height, unsigned long lines = 0; unsigned long y_extra, uv_extra = 0; unsigned long startAddress; +#if 0 BoxRec ovly, display, result; +#endif xend = x + drw_w; yend = y + drw_h; diff --git a/src/amd_lx_driver.c b/src/amd_lx_driver.c index 6f99e8f..099e40f 100644 --- a/src/amd_lx_driver.c +++ b/src/amd_lx_driver.c @@ -1166,10 +1166,7 @@ LXCreateScreenResources(ScreenPtr pScreen) if (!(*pScreen->CreateScreenResources) (pScreen)) return FALSE; - if (xf86LoaderCheckSymbol("LXRandRSetConfig") - && pGeode->rotation != RR_Rotate_0) { - Rotation(*LXRandRSetConfig) (ScreenPtr pScreen, Rotation rr, int rate, - RRScreenSizePtr pSize) = NULL; + if (pGeode->rotation != RR_Rotate_0) { RRScreenSize p; Rotation requestedRotation = pGeode->rotation; @@ -1182,12 +1179,9 @@ LXCreateScreenResources(ScreenPtr pScreen) p.mmWidth = pScreen->mmWidth; p.mmHeight = pScreen->mmHeight; - LXRandRSetConfig = LoaderSymbol("LXRandRSetConfig"); - if (LXRandRSetConfig) { - pGeode->starting = TRUE; - (*LXRandRSetConfig) (pScreen, requestedRotation, 0, &p); - pGeode->starting = FALSE; - } + pGeode->starting = TRUE; + LXRandRSetConfig(pScreen, requestedRotation, 0, &p); + pGeode->starting = FALSE; } return TRUE; diff --git a/src/amd_lx_exa.c b/src/amd_lx_exa.c index 4b25908..7918523 100644 --- a/src/amd_lx_exa.c +++ b/src/amd_lx_exa.c @@ -625,7 +625,7 @@ static Bool lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk, return TRUE; } -int lx_get_bpp_from_format(int format) { +static int lx_get_bpp_from_format(int format) { switch(format) { case CIMGP_SOURCE_FMT_8_8_8_8: @@ -993,7 +993,7 @@ static Bool lx_upload(PixmapPtr pDst, int x, int y, int w, int h, gp_set_solid_pattern(0); offset = ((unsigned long) dst) - ((unsigned long) pGeode->FBBase); - gp_color_bitmap_to_screen_blt(offset, 0, w, h, src, src_pitch); + gp_color_bitmap_to_screen_blt(offset, 0, w, h, (unsigned char *)src, src_pitch); return TRUE; } diff --git a/src/amd_lx_rotate.c b/src/amd_lx_rotate.c index cb28ec4..b803b74 100644 --- a/src/amd_lx_rotate.c +++ b/src/amd_lx_rotate.c @@ -44,7 +44,7 @@ LXWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, row * pGeode->displayPitch + offset; } -void +static void LXUpdateFunc(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = shadowDamage (pBuf); @@ -187,10 +187,10 @@ LXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode) ret = shadowAdd(pScrni->pScreen, pPixmap, LXUpdateFunc, LXWindowLinear, pGeode->rotation, NULL); - /* XXX - FIXME - bail gracefully */ - - if (!ret) + if (!ret) { ErrorF("shadowAdd failed\n"); + goto error; + } } if (pGeode->rotation == RR_Rotate_0) diff --git a/src/amd_msr.c b/src/amd_msr.c index 12b9f73..c37d921 100644 --- a/src/amd_msr.c +++ b/src/amd_msr.c @@ -5,6 +5,7 @@ #include <sys/types.h> #include <sys/errno.h> #include "os.h" +#include "amd.h" static int _msr_open(void) { diff --git a/src/durango.c b/src/durango.c index 77ba16a..2902684 100644 --- a/src/durango.c +++ b/src/durango.c @@ -38,6 +38,7 @@ #include <errno.h> #include <xf86_ansic.h> #include <compiler.h> +#include "amd.h" /* Compiler options */ diff --git a/src/gfx/gfx_init.c b/src/gfx/gfx_init.c index 469c70f..715153d 100644 --- a/src/gfx/gfx_init.c +++ b/src/gfx/gfx_init.c @@ -274,7 +274,7 @@ gfx_detect_cpu(void) value = gfx_pci_config_read(0x80000800); if (value == PCI_VENDOR_DEVICE_REDCLOUD) { - Q_WORD msr_value; + QQ_WORD msr_value; int valid, i; /* CHECK FOR SOFT VG */ diff --git a/src/gfx/msr_rdcl.c b/src/gfx/msr_rdcl.c index 548e8a4..2174a11 100644 --- a/src/gfx/msr_rdcl.c +++ b/src/gfx/msr_rdcl.c @@ -580,7 +580,7 @@ redcloud_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) #else DEV_STATUS -gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) +gfx_msr_read(unsigned int device, unsigned int msrRegister, QQ_WORD * msrValue) #endif { if (device < NUM_DEVS) { @@ -618,7 +618,7 @@ redcloud_msr_write(unsigned int device, unsigned int msrRegister, #else DEV_STATUS gfx_msr_write(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue) + QQ_WORD * msrValue) #endif { if (device < NUM_DEVS) { diff --git a/src/gfx/vid_rdcl.c b/src/gfx/vid_rdcl.c index 7c98d2d..0aff629 100644 --- a/src/gfx/vid_rdcl.c +++ b/src/gfx/vid_rdcl.c @@ -254,7 +254,7 @@ void gfx_set_clock_frequency(unsigned long frequency) #endif { - Q_WORD msr_value, sys_value; + QQ_WORD msr_value, sys_value; unsigned long sys_low; unsigned int i, index = 0; unsigned long value; @@ -1632,7 +1632,7 @@ unsigned long gfx_get_clock_frequency(void) #endif { - Q_WORD msr_value; + QQ_WORD msr_value; unsigned int index; unsigned long value, mask = 0x00001FFF; unsigned long post_div3 = 0, pre_mult2 = 0; @@ -2310,7 +2310,7 @@ unsigned long gfx_read_crc(void) #endif { - Q_WORD msr_value; + QQ_WORD msr_value; unsigned long crc = 0xFFFFFFFF; /* DISABLE 32-BIT CRCS */ @@ -2359,7 +2359,7 @@ unsigned long gfx_read_crc32(void) #endif { - Q_WORD msr_value; + QQ_WORD msr_value; unsigned long crc = 0xFFFFFFFF; /* ENABLE 32-BIT CRCS */ @@ -2409,7 +2409,7 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, unsigned short width, unsigned short height, int crc32) #endif { - Q_WORD msr_value; + QQ_WORD msr_value; unsigned long xpos, ypos, crc = 0; unsigned long old_fmt = 0; unsigned int vsync_active_base, vsync_inactive_base, hsync_active_base; diff --git a/src/panel/gx2_9211.c b/src/panel/gx2_9211.c index a60264d..7d46b9c 100644 --- a/src/panel/gx2_9211.c +++ b/src/panel/gx2_9211.c @@ -193,7 +193,7 @@ set_Redcloud_92xx_mode_params(int mode) CS92xx_MODE *pMode = &FPModeParams[mode]; unsigned long temp_data = 0; unsigned long base_data; - Q_WORD msrValue; + QQ_WORD msrValue; /* on a Redcloud, we need to set up the DF pad select MSR */ if (gfx_msr_read(RC_ID_DF, GX2_VP_MSR_PAD_SELECT, &msrValue) == FOUND) { |