summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-05-09 13:32:42 -0600
committerJordan Crouse <jordan.crouse@amd.com>2007-05-09 13:32:42 -0600
commitda653c761c9a275cf2b5ff4e087cb0239421c72d (patch)
tree499dbad08253ae944715ce1fbf871547de5c2d4e
parent8fa5d1e3653f91c0c1409147f7292463554dd9f9 (diff)
More -Wall warnings fixed
-rw-r--r--src/amd_driver.c7
-rw-r--r--src/amd_gx_cursor.c5
-rw-r--r--src/amd_gx_driver.c2
-rw-r--r--src/amd_lx_cursor.c5
-rw-r--r--src/amd_lx_driver.c6
-rw-r--r--src/amd_lx_rotate.c8
6 files changed, 24 insertions, 9 deletions
diff --git a/src/amd_driver.c b/src/amd_driver.c
index 5eae188..2a12b40 100644
--- a/src/amd_driver.c
+++ b/src/amd_driver.c
@@ -407,7 +407,7 @@ AmdProbe(DriverPtr drv, int flags)
GDevPtr *devSections = NULL;
int *usedChips = NULL;
int i;
- void (*drvr_setup) (ScrnInfoPtr pScrni);
+ void (*drvr_setup) (ScrnInfoPtr pScrni) = NULL;
DEBUGMSG(1, (0, X_INFO, "AmdProbe: Probing for supported devices!\n"));
/*
@@ -462,12 +462,15 @@ AmdProbe(DriverPtr drv, int flags)
break;
#endif
default:
- return FALSE;
+ break;
}
break;
}
}
xfree(pEnt);
+ if (drvr_setup == NULL)
+ return FALSE;
+
DEBUGMSG(1, (0, X_INFO, "AmdProbe: CPUDetected %d!\n",
CPUDetected));
diff --git a/src/amd_gx_cursor.c b/src/amd_gx_cursor.c
index 461b774..b87d28d 100644
--- a/src/amd_gx_cursor.c
+++ b/src/amd_gx_cursor.c
@@ -145,6 +145,8 @@ GXSetCursorPosition(ScrnInfoPtr pScrni, int x, int y)
savey = y + pScrni->frameY0;
switch(pGeode->rotation) {
+ default:
+ ErrorF("%s:%d invalid rotation %d\n", __func__, __LINE__, pGeode->rotation);
case RR_Rotate_0:
newX = savex; newY = savey;
break;
@@ -231,6 +233,9 @@ GXLoadCursorImage(ScrnInfoPtr pScrni, unsigned char *src)
}
switch(pGeode->rotation) {
+ default:
+ ErrorF("%s:%d invalid rotation %d\n", __func__, __LINE__,
+ pGeode->rotation);
case RR_Rotate_0:
newX = x;
newY = y;
diff --git a/src/amd_gx_driver.c b/src/amd_gx_driver.c
index fcb8874..922dbb5 100644
--- a/src/amd_gx_driver.c
+++ b/src/amd_gx_driver.c
@@ -762,7 +762,7 @@ static Bool
GXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
{
GeodeRec *pGeode = GEODEPTR(pScrni);
- int flags;
+ int flags = 0;
pScrni->vtSema = TRUE;
diff --git a/src/amd_lx_cursor.c b/src/amd_lx_cursor.c
index 1e49822..61094b3 100644
--- a/src/amd_lx_cursor.c
+++ b/src/amd_lx_cursor.c
@@ -91,6 +91,8 @@ LXSetCursorPosition(ScrnInfoPtr pScrni, int x, int y)
savey = y + pScrni->frameY0;
switch(pGeode->rotation) {
+ default:
+ ErrorF("%s:%d invalid rotation %d\n", __func__, __LINE__, pGeode->rotation);
case RR_Rotate_0:
newX = savex; newY = savey;
hsx= 31; hsy = 31;
@@ -152,6 +154,9 @@ LXLoadCursorImage(ScrnInfoPtr pScrni, unsigned char *src)
}
switch(pGeode->rotation) {
+ default:
+ ErrorF("%s:%d invalid rotation %d\n", __func__, __LINE__,
+ pGeode->rotation);
case RR_Rotate_0:
newX = x;
newY = y;
diff --git a/src/amd_lx_driver.c b/src/amd_lx_driver.c
index 252a4ce..6f99e8f 100644
--- a/src/amd_lx_driver.c
+++ b/src/amd_lx_driver.c
@@ -487,7 +487,6 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
GeodePtr pGeode;
ClockRangePtr GeodeClockRange;
OptionInfoRec *GeodeOptions = &LX_GeodeOptions[0];
- unsigned long cpuver;
rgb defaultWeight = { 0, 0, 0 };
int modecnt;
char *s, *panelgeo = NULL;
@@ -530,11 +529,6 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
/* Set up the Cimarron MSR tables */
msr_init_table();
- if ((cpuver & 0xFF) != CIM_CPU_GEODELX)
- xf86DrvMsg(pScrni->scrnIndex, X_ERROR,
- "No Geode LX chipset was detected.\n");
-
-
/* By default, we support panel and CRT - the config file should
* disable the ones we don't want
*/
diff --git a/src/amd_lx_rotate.c b/src/amd_lx_rotate.c
index 4458a96..cb28ec4 100644
--- a/src/amd_lx_rotate.c
+++ b/src/amd_lx_rotate.c
@@ -99,6 +99,14 @@ LXUpdateFunc(ScreenPtr pScreen, shadowBufPtr pBuf)
srcOffset += (y * pGeode->Pitch) + (x * (shaBpp >> 3));
switch(pGeode->rotation) {
+ case RR_Rotate_0:
+ dx = x;
+ dy = y;
+ dw = w;
+ dh = h;
+ degrees = 0;
+ break;
+
case RR_Rotate_90:
dx = (pScrni->pScreen->height - 1) - (y + (h-1));
dy = x;