summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-03-11 12:14:51 -0700
committerEric Anholt <eric@anholt.net>2008-03-11 12:14:51 -0700
commit5f272471878c896038b2c3f2bf704655d908828d (patch)
tree85b3e51e6520ad490648c9b8dcc3e8ab3bdba5c1 /src
parent9a62d3b598cca3c28fa8b6313bba82983cc29ecf (diff)
Nuke more CARD* types from i810 driver. Untested.
Diffstat (limited to 'src')
-rw-r--r--src/i810.h11
-rw-r--r--src/i810_cursor.c6
-rw-r--r--src/i810_driver.c8
-rw-r--r--src/i810_io.c24
-rw-r--r--src/i810_memory.c4
-rw-r--r--src/i810_video.c70
-rw-r--r--src/i830.h11
-rw-r--r--src/i830_driver.c2
8 files changed, 69 insertions, 67 deletions
diff --git a/src/i810.h b/src/i810.h
index 8023c385..bd2985cb 100644
--- a/src/i810.h
+++ b/src/i810.h
@@ -85,11 +85,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
typedef struct _I810Rec *I810Ptr;
typedef void (*I810WriteIndexedByteFunc)(I810Ptr pI810, IOADDRESS addr,
- CARD8 index, CARD8 value);
-typedef CARD8(*I810ReadIndexedByteFunc)(I810Ptr pI810, IOADDRESS addr,
- CARD8 index);
-typedef void (*I810WriteByteFunc)(I810Ptr pI810, IOADDRESS addr, CARD8 value);
-typedef CARD8(*I810ReadByteFunc)(I810Ptr pI810, IOADDRESS addr);
+ uint8_t index, uint8_t value);
+typedef uint8_t(*I810ReadIndexedByteFunc)(I810Ptr pI810, IOADDRESS addr,
+ uint8_t index);
+typedef void (*I810WriteByteFunc)(I810Ptr pI810, IOADDRESS addr,
+ uint8_t value);
+typedef uint8_t(*I810ReadByteFunc)(I810Ptr pI810, IOADDRESS addr);
extern void I810SetTiledMemory(ScrnInfoPtr pScrn, int nr, unsigned start,
unsigned pitch, unsigned size);
diff --git a/src/i810_cursor.c b/src/i810_cursor.c
index c293a3d5..30f42d14 100644
--- a/src/i810_cursor.c
+++ b/src/i810_cursor.c
@@ -130,8 +130,8 @@ static Bool I810UseHWCursorARGB (ScreenPtr pScreen, CursorPtr pCurs)
static void I810LoadCursorARGB (ScrnInfoPtr pScrn, CursorPtr pCurs)
{
I810Ptr pI810 = I810PTR(pScrn);
- CARD32 *pcurs = (CARD32 *) (pI810->FbBase + pI810->CursorStart);
- CARD32 *image = (CARD32 *) pCurs->bits->argb;
+ uint32_t *pcurs = (uint32_t *) (pI810->FbBase + pI810->CursorStart);
+ uint32_t *image = (uint32_t *) pCurs->bits->argb;
int x, y, w, h;
#ifdef ARGB_CURSOR
@@ -171,7 +171,7 @@ static void
I810LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src)
{
I810Ptr pI810 = I810PTR(pScrn);
- CARD8 *pcurs = (CARD8 *) (pI810->FbBase + pI810->CursorStart);
+ uint8_t *pcurs = (uint8_t *) (pI810->FbBase + pI810->CursorStart);
int x, y;
#ifdef ARGB_CURSOR
diff --git a/src/i810_driver.c b/src/i810_driver.c
index 53121a6a..4b716608 100644
--- a/src/i810_driver.c
+++ b/src/i810_driver.c
@@ -1609,7 +1609,7 @@ I810Save(ScrnInfoPtr pScrn)
{
vgaHWPtr hwp;
I810Ptr pI810;
- CARD32 temp;
+ uint32_t temp;
hwp = VGAHWPTR(pScrn);
pI810 = I810PTR(pScrn);
@@ -1770,9 +1770,9 @@ DoRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, I810RegPtr i810Reg,
/* Setting the OVRACT Register for video overlay */
{
- CARD32 LCD_TV_Control = INREG(LCD_TV_C);
- CARD32 TV_HTotal = INREG(LCD_TV_HTOTAL);
- CARD32 ActiveStart, ActiveEnd;
+ uint32_t LCD_TV_Control = INREG(LCD_TV_C);
+ uint32_t TV_HTotal = INREG(LCD_TV_HTOTAL);
+ uint32_t ActiveStart, ActiveEnd;
if((LCD_TV_Control & LCD_TV_ENABLE)
&& !(LCD_TV_Control & LCD_TV_VGAMOD)
diff --git a/src/i810_io.c b/src/i810_io.c
index abe1d6f0..3fd8e4e3 100644
--- a/src/i810_io.c
+++ b/src/i810_io.c
@@ -71,19 +71,19 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "i810.h"
#endif
-#define minb(p) *(volatile CARD8 *)(pI810->MMIOBase + (p))
-#define moutb(p,v) *(volatile CARD8 *)(pI810->MMIOBase + (p)) = (v)
+#define minb(p) *(volatile uint8_t *)(pI810->MMIOBase + (p))
+#define moutb(p,v) *(volatile uint8_t *)(pI810->MMIOBase + (p)) = (v)
static void
-I810WriteControlPIO(I810Ptr pI810, IOADDRESS addr, CARD8 index, CARD8 val)
+I810WriteControlPIO(I810Ptr pI810, IOADDRESS addr, uint8_t index, uint8_t val)
{
addr += pI810->ioBase;
outb(addr, index);
outb(addr + 1, val);
}
-static CARD8
-I810ReadControlPIO(I810Ptr pI810, IOADDRESS addr, CARD8 index)
+static uint8_t
+I810ReadControlPIO(I810Ptr pI810, IOADDRESS addr, uint8_t index)
{
addr += pI810->ioBase;
outb(addr, index);
@@ -91,12 +91,12 @@ I810ReadControlPIO(I810Ptr pI810, IOADDRESS addr, CARD8 index)
}
static void
-I810WriteStandardPIO(I810Ptr pI810, IOADDRESS addr, CARD8 val)
+I810WriteStandardPIO(I810Ptr pI810, IOADDRESS addr, uint8_t val)
{
outb(pI810->ioBase + addr, val);
}
-static CARD8
+static uint8_t
I810ReadStandardPIO(I810Ptr pI810, IOADDRESS addr)
{
return inb(pI810->ioBase + addr);
@@ -112,26 +112,26 @@ I810SetPIOAccess(I810Ptr pI810)
}
static void
-I810WriteControlMMIO(I810Ptr pI810, IOADDRESS addr, CARD8 index, CARD8 val)
+I810WriteControlMMIO(I810Ptr pI810, IOADDRESS addr, uint8_t index, uint8_t val)
{
moutb(addr, index);
moutb(addr + 1, val);
}
-static CARD8
-I810ReadControlMMIO(I810Ptr pI810, IOADDRESS addr, CARD8 index)
+static uint8_t
+I810ReadControlMMIO(I810Ptr pI810, IOADDRESS addr, uint8_t index)
{
moutb(addr, index);
return minb(addr + 1);
}
static void
-I810WriteStandardMMIO(I810Ptr pI810, IOADDRESS addr, CARD8 val)
+I810WriteStandardMMIO(I810Ptr pI810, IOADDRESS addr, uint8_t val)
{
moutb(addr, val);
}
-static CARD8
+static uint8_t
I810ReadStandardMMIO(I810Ptr pI810, IOADDRESS addr)
{
return minb(addr);
diff --git a/src/i810_memory.c b/src/i810_memory.c
index 82d86eb2..222b5cf7 100644
--- a/src/i810_memory.c
+++ b/src/i810_memory.c
@@ -260,8 +260,8 @@ I810SetTiledMemory(ScrnInfoPtr pScrn, int nr, unsigned int start,
{
I810Ptr pI810 = I810PTR(pScrn);
I810RegPtr i810Reg = &pI810->ModeReg;
- CARD32 val;
- CARD32 fence_mask = 0;
+ uint32_t val;
+ uint32_t fence_mask = 0;
if (nr < 0 || nr > 7) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%s - fence %d out of range\n",
diff --git a/src/i810_video.c b/src/i810_video.c
index b3dc90e5..418f2952 100644
--- a/src/i810_video.c
+++ b/src/i810_video.c
@@ -271,43 +271,43 @@ static XF86ImageRec Images[NUM_IMAGES] =
/* *INDENT-ON* */
typedef struct {
- CARD32 OBUF_0Y;
- CARD32 OBUF_1Y;
- CARD32 OBUF_0U;
- CARD32 OBUF_0V;
- CARD32 OBUF_1U;
- CARD32 OBUF_1V;
- CARD32 OV0STRIDE;
- CARD32 YRGB_VPH;
- CARD32 UV_VPH;
- CARD32 HORZ_PH;
- CARD32 INIT_PH;
- CARD32 DWINPOS;
- CARD32 DWINSZ;
- CARD32 SWID;
- CARD32 SWIDQW;
- CARD32 SHEIGHT;
- CARD32 YRGBSCALE;
- CARD32 UVSCALE;
- CARD32 OV0CLRC0;
- CARD32 OV0CLRC1;
- CARD32 DCLRKV;
- CARD32 DCLRKM;
- CARD32 SCLRKVH;
- CARD32 SCLRKVL;
- CARD32 SCLRKM;
- CARD32 OV0CONF;
- CARD32 OV0CMD;
+ uint32_t OBUF_0Y;
+ uint32_t OBUF_1Y;
+ uint32_t OBUF_0U;
+ uint32_t OBUF_0V;
+ uint32_t OBUF_1U;
+ uint32_t OBUF_1V;
+ uint32_t OV0STRIDE;
+ uint32_t YRGB_VPH;
+ uint32_t UV_VPH;
+ uint32_t HORZ_PH;
+ uint32_t INIT_PH;
+ uint32_t DWINPOS;
+ uint32_t DWINSZ;
+ uint32_t SWID;
+ uint32_t SWIDQW;
+ uint32_t SHEIGHT;
+ uint32_t YRGBSCALE;
+ uint32_t UVSCALE;
+ uint32_t OV0CLRC0;
+ uint32_t OV0CLRC1;
+ uint32_t DCLRKV;
+ uint32_t DCLRKM;
+ uint32_t SCLRKVH;
+ uint32_t SCLRKVL;
+ uint32_t SCLRKM;
+ uint32_t OV0CONF;
+ uint32_t OV0CMD;
} I810OverlayRegRec, *I810OverlayRegPtr;
typedef struct {
- CARD32 YBuf0offset;
- CARD32 UBuf0offset;
- CARD32 VBuf0offset;
+ uint32_t YBuf0offset;
+ uint32_t UBuf0offset;
+ uint32_t VBuf0offset;
- CARD32 YBuf1offset;
- CARD32 UBuf1offset;
- CARD32 VBuf1offset;
+ uint32_t YBuf1offset;
+ uint32_t UBuf1offset;
+ uint32_t VBuf1offset;
unsigned char currentBuf;
@@ -315,9 +315,9 @@ typedef struct {
int contrast;
RegionRec clip;
- CARD32 colorKey;
+ uint32_t colorKey;
- CARD32 videoStatus;
+ uint32_t videoStatus;
Time offTime;
Time freeTime;
FBLinearPtr linear;
diff --git a/src/i830.h b/src/i830.h
index bfbaf428..3866a25a 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -121,11 +121,12 @@ typedef struct _I830OutputRec I830OutputRec, *I830OutputPtr;
typedef struct _I830Rec *I830Ptr;
typedef void (*I830WriteIndexedByteFunc)(I830Ptr pI830, IOADDRESS addr,
- CARD8 index, CARD8 value);
-typedef CARD8(*I830ReadIndexedByteFunc)(I830Ptr pI830, IOADDRESS addr,
- CARD8 index);
-typedef void (*I830WriteByteFunc)(I830Ptr pI830, IOADDRESS addr, CARD8 value);
-typedef CARD8(*I830ReadByteFunc)(I830Ptr pI830, IOADDRESS addr);
+ uint8_t index, uint8_t value);
+typedef uint8_t(*I830ReadIndexedByteFunc)(I830Ptr pI830, IOADDRESS addr,
+ uint8_t index);
+typedef void (*I830WriteByteFunc)(I830Ptr pI830, IOADDRESS addr,
+ uint8_t value);
+typedef uint8_t(*I830ReadByteFunc)(I830Ptr pI830, IOADDRESS addr);
enum tile_format {
TILE_NONE,
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 0365d204..4c282679 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3511,7 +3511,7 @@ I830CheckDevicesTimer(OsTimerPtr timer, CARD32 now, pointer arg)
{
ScrnInfoPtr pScrn = (ScrnInfoPtr) arg;
I830Ptr pI830 = I830PTR(pScrn);
- CARD8 gr18;
+ uint8_t gr18;
if (!pScrn->vtSema)
return 1000;