[PATCH r128 6/6] Use standard integers

Connor Behan connor.behan at gmail.com
Wed Jul 16 18:34:57 PDT 2014


To fix another warning, we need to be consistent about when we use
CARD32 an when we use uint32_t. Xorg developers have decided on the
latter as a convention.

Signed-off-by: Connor Behan <connor.behan at gmail.com>
---
 src/r128.h            | 168 +++++++++++++++++++++++++-------------------------
 src/r128_accel.c      |  20 +++---
 src/r128_crtc.c       |   2 +-
 src/r128_cursor.c     |  14 ++---
 src/r128_dga.c        |   6 +-
 src/r128_dri.c        |  14 ++---
 src/r128_driver.c     |  14 ++---
 src/r128_exa_render.c |   8 +--
 src/r128_output.c     |   4 +-
 src/r128_probe.h      |  14 ++---
 src/r128_reg.h        |  12 ++--
 src/r128_video.c      |  14 ++---
 12 files changed, 145 insertions(+), 145 deletions(-)

diff --git a/src/r128.h b/src/r128.h
index b9fcc0a..f361c2a 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -151,105 +151,105 @@ typedef struct {        /* All values in XCLKS    */
 
 typedef struct {
 				/* Common registers */
-    CARD32     ovr_clr;
-    CARD32     ovr_wid_left_right;
-    CARD32     ovr_wid_top_bottom;
-    CARD32     ov0_scale_cntl;
-    CARD32     mpp_tb_config;
-    CARD32     mpp_gp_config;
-    CARD32     subpic_cntl;
-    CARD32     viph_control;
-    CARD32     i2c_cntl_1;
-    CARD32     gen_int_cntl;
-    CARD32     cap0_trig_cntl;
-    CARD32     cap1_trig_cntl;
-    CARD32     bus_cntl;
-    CARD32     config_cntl;
+    uint32_t   ovr_clr;
+    uint32_t   ovr_wid_left_right;
+    uint32_t   ovr_wid_top_bottom;
+    uint32_t   ov0_scale_cntl;
+    uint32_t   mpp_tb_config;
+    uint32_t   mpp_gp_config;
+    uint32_t   subpic_cntl;
+    uint32_t   viph_control;
+    uint32_t   i2c_cntl_1;
+    uint32_t   gen_int_cntl;
+    uint32_t   cap0_trig_cntl;
+    uint32_t   cap1_trig_cntl;
+    uint32_t   bus_cntl;
+    uint32_t   config_cntl;
 
 				/* Other registers to save for VT switches */
-    CARD32     dp_datatype;
-    CARD32     gen_reset_cntl;
-    CARD32     clock_cntl_index;
-    CARD32     amcgpio_en_reg;
-    CARD32     amcgpio_mask;
+    uint32_t   dp_datatype;
+    uint32_t   gen_reset_cntl;
+    uint32_t   clock_cntl_index;
+    uint32_t   amcgpio_en_reg;
+    uint32_t   amcgpio_mask;
 
 				/* CRTC registers */
-    CARD32     crtc_gen_cntl;
-    CARD32     crtc_ext_cntl;
-    CARD32     dac_cntl;
-    CARD32     crtc_h_total_disp;
-    CARD32     crtc_h_sync_strt_wid;
-    CARD32     crtc_v_total_disp;
-    CARD32     crtc_v_sync_strt_wid;
-    CARD32     crtc_offset;
-    CARD32     crtc_offset_cntl;
-    CARD32     crtc_pitch;
+    uint32_t   crtc_gen_cntl;
+    uint32_t   crtc_ext_cntl;
+    uint32_t   dac_cntl;
+    uint32_t   crtc_h_total_disp;
+    uint32_t   crtc_h_sync_strt_wid;
+    uint32_t   crtc_v_total_disp;
+    uint32_t   crtc_v_sync_strt_wid;
+    uint32_t   crtc_offset;
+    uint32_t   crtc_offset_cntl;
+    uint32_t   crtc_pitch;
 
 				/* CRTC2 registers */
-    CARD32     crtc2_gen_cntl;
-    CARD32     crtc2_h_total_disp;
-    CARD32     crtc2_h_sync_strt_wid;
-    CARD32     crtc2_v_total_disp;
-    CARD32     crtc2_v_sync_strt_wid;
-    CARD32     crtc2_offset;
-    CARD32     crtc2_offset_cntl;
-    CARD32     crtc2_pitch;
+    uint32_t   crtc2_gen_cntl;
+    uint32_t   crtc2_h_total_disp;
+    uint32_t   crtc2_h_sync_strt_wid;
+    uint32_t   crtc2_v_total_disp;
+    uint32_t   crtc2_v_sync_strt_wid;
+    uint32_t   crtc2_offset;
+    uint32_t   crtc2_offset_cntl;
+    uint32_t   crtc2_pitch;
 
 				/* Flat panel registers */
-    CARD32     fp_crtc_h_total_disp;
-    CARD32     fp_crtc_v_total_disp;
-    CARD32     fp_gen_cntl;
-    CARD32     fp_h_sync_strt_wid;
-    CARD32     fp_horz_stretch;
-    CARD32     fp_panel_cntl;
-    CARD32     fp_v_sync_strt_wid;
-    CARD32     fp_vert_stretch;
-    CARD32     lvds_gen_cntl;
-    CARD32     tmds_crc;
-    CARD32     tmds_transmitter_cntl;
+    uint32_t   fp_crtc_h_total_disp;
+    uint32_t   fp_crtc_v_total_disp;
+    uint32_t   fp_gen_cntl;
+    uint32_t   fp_h_sync_strt_wid;
+    uint32_t   fp_horz_stretch;
+    uint32_t   fp_panel_cntl;
+    uint32_t   fp_v_sync_strt_wid;
+    uint32_t   fp_vert_stretch;
+    uint32_t   lvds_gen_cntl;
+    uint32_t   tmds_crc;
+    uint32_t   tmds_transmitter_cntl;
 
 				/* Computed values for PLL */
-    CARD32     dot_clock_freq;
-    CARD32     pll_output_freq;
+    uint32_t   dot_clock_freq;
+    uint32_t   pll_output_freq;
     int        feedback_div;
     int        post_div;
 
 				/* PLL registers */
-    CARD32     ppll_ref_div;
-    CARD32     ppll_div_3;
-    CARD32     htotal_cntl;
+    uint32_t   ppll_ref_div;
+    uint32_t   ppll_div_3;
+    uint32_t   htotal_cntl;
 
 				/* Computed values for PLL2 */
-    CARD32     dot_clock_freq_2;
-    CARD32     pll_output_freq_2;
+    uint32_t   dot_clock_freq_2;
+    uint32_t   pll_output_freq_2;
     int        feedback_div_2;
     int        post_div_2;
 
 				/* PLL2 registers */
-    CARD32     p2pll_ref_div;
-    CARD32     p2pll_div_0;
-    CARD32     htotal_cntl2;
+    uint32_t   p2pll_ref_div;
+    uint32_t   p2pll_div_0;
+    uint32_t   htotal_cntl2;
 
 				/* DDA register */
-    CARD32     dda_config;
-    CARD32     dda_on_off;
+    uint32_t   dda_config;
+    uint32_t   dda_on_off;
 
 				/* DDA2 register */
-    CARD32     dda2_config;
-    CARD32     dda2_on_off;
+    uint32_t   dda2_config;
+    uint32_t   dda2_on_off;
 
 				/* Pallet */
     Bool       palette_valid;
-    CARD32     palette[256];
-    CARD32     palette2[256];
+    uint32_t   palette[256];
+    uint32_t   palette2[256];
 } R128SaveRec, *R128SavePtr;
 
 typedef struct {
-    CARD16        reference_freq;
-    CARD16        reference_div;
+    uint16_t      reference_freq;
+    uint16_t      reference_div;
     unsigned      min_pll_freq;
     unsigned      max_pll_freq;
-    CARD16        xclk;
+    uint16_t      xclk;
 } R128PLLRec, *R128PLLPtr;
 
 typedef struct {
@@ -305,14 +305,14 @@ typedef struct {
 
     void              *MMIO;        /* Map of MMIO region                    */
     void              *FB;          /* Map of frame buffer                   */
-    CARD8             *VBIOS;       /* Video BIOS for mode validation on FPs */
+    uint8_t           *VBIOS;       /* Video BIOS for mode validation on FPs */
     int               FPBIOSstart;  /* Start of the flat panel info          */
 
-    CARD32            MemCntl;
-    CARD32            BusCntl;
+    uint32_t          MemCntl;
+    uint32_t          BusCntl;
     unsigned long     FbMapSize;    /* Size of frame buffer, in bytes        */
 
-    CARD8             BIOSDisplay;  /* Device the BIOS is set to display to  */
+    uint8_t           BIOSDisplay;  /* Device the BIOS is set to display to  */
 
     Bool              HasPanelRegs; /* Current chip can connect to a FP      */
 
@@ -356,7 +356,7 @@ typedef struct {
 				/* Computed values for Rage 128 */
     int               pitch;
     int               datatype;
-    CARD32            dp_gui_master_cntl;
+    uint32_t          dp_gui_master_cntl;
 
 				/* Saved values for ScreenToScreenCopy */
     int               xdir;
@@ -477,18 +477,18 @@ typedef struct {
     int               log2TexGran;
 
 				/* Saved scissor values */
-    CARD32            sc_left;
-    CARD32            sc_right;
-    CARD32            sc_top;
-    CARD32            sc_bottom;
+    uint32_t          sc_left;
+    uint32_t          sc_right;
+    uint32_t          sc_top;
+    uint32_t          sc_bottom;
 
-    CARD32            re_top_left;
-    CARD32            re_width_height;
+    uint32_t          re_top_left;
+    uint32_t          re_width_height;
 
-    CARD32            aux_sc_cntl;
+    uint32_t          aux_sc_cntl;
 
     int               irq;
-    CARD32            gen_int_cntl;
+    uint32_t          gen_int_cntl;
 
     Bool              DMAForXv;
 #endif
@@ -643,7 +643,7 @@ extern void	   R128DoPrepareCopy(ScrnInfoPtr pScrn, uint32_t src_pitch_offset,
 
 #define R128_VERBOSE	0
 
-#define RING_LOCALS	CARD32 *__head; int __count;
+#define RING_LOCALS	uint32_t *__head; int __count;
 
 #define R128CCE_REFRESH(pScrn, info)					\
 do {									\
@@ -684,12 +684,12 @@ do {									\
       xf86DrvMsg( pScrn->scrnIndex, X_INFO,				\
 		  "ADVANCE_RING() used: %d+%d=%d/%d\n",			\
 		  info->indirectBuffer->used - info->indirectStart,	\
-		  __count * (int)sizeof(CARD32),			\
+		  __count * (int)sizeof(uint32_t),			\
 		  info->indirectBuffer->used - info->indirectStart +	\
-		  __count * (int)sizeof(CARD32),			\
+		  __count * (int)sizeof(uint32_t),			\
 		  info->indirectBuffer->total - info->indirectStart );	\
    }									\
-   info->indirectBuffer->used += __count * (int)sizeof(CARD32);		\
+   info->indirectBuffer->used += __count * (int)sizeof(uint32_t);		\
 } while (0)
 
 #define OUT_RING( x ) do {						\
diff --git a/src/r128_accel.c b/src/r128_accel.c
index 4d666c7..99bfb20 100644
--- a/src/r128_accel.c
+++ b/src/r128_accel.c
@@ -145,9 +145,9 @@ void R128EngineReset(ScrnInfoPtr pScrn)
 {
     R128InfoPtr   info      = R128PTR(pScrn);
     unsigned char *R128MMIO = info->MMIO;
-    CARD32        clock_cntl_index;
-    CARD32        mclk_cntl;
-    CARD32        gen_reset_cntl;
+    uint32_t      clock_cntl_index;
+    uint32_t      mclk_cntl;
+    uint32_t      gen_reset_cntl;
 
     R128EngineFlush(pScrn);
 
@@ -161,7 +161,7 @@ void R128EngineReset(ScrnInfoPtr pScrn)
     OUTREG(R128_GEN_RESET_CNTL, gen_reset_cntl | R128_SOFT_RESET_GUI);
     INREG(R128_GEN_RESET_CNTL);
     OUTREG(R128_GEN_RESET_CNTL,
-	gen_reset_cntl & (CARD32)(~R128_SOFT_RESET_GUI));
+	gen_reset_cntl & (uint32_t)(~R128_SOFT_RESET_GUI));
     INREG(R128_GEN_RESET_CNTL);
 
     OUTPLL(R128_MCLK_CNTL,        mclk_cntl);
@@ -450,7 +450,7 @@ static void R128SetupForDashedLine(ScrnInfoPtr pScrn,
 {
     R128InfoPtr   info      = R128PTR(pScrn);
     unsigned char *R128MMIO = info->MMIO;
-    CARD32        pat       = *(CARD32 *)(pointer)pattern;
+    uint32_t      pat       = *(uint32_t *)(pointer)pattern;
 
 #if X_BYTE_ORDER == X_LITTLE_ENDIAN
 # define PAT_SHIFT(pat,n) pat << n
@@ -847,10 +847,10 @@ static void R128SubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno)
 {
     R128InfoPtr     info      = R128PTR(pScrn);
     unsigned char   *R128MMIO = info->MMIO;
-    CARD32          *p        = (pointer)info->scratch_buffer[bufno];
+    uint32_t        *p        = (pointer)info->scratch_buffer[bufno];
     int             i;
     int             left      = info->scanline_words;
-    volatile CARD32 *d;
+    volatile uint32_t *d;
 
     if (info->scanline_direct) return;
     --info->scanline_h;
@@ -977,10 +977,10 @@ static void R128SubsequentImageWriteScanline(ScrnInfoPtr pScrn, int bufno)
 {
     R128InfoPtr     info      = R128PTR(pScrn);
     unsigned char   *R128MMIO = info->MMIO;
-    CARD32          *p        = (pointer)info->scratch_buffer[bufno];
+    uint32_t        *p        = (pointer)info->scratch_buffer[bufno];
     int             i;
     int             left      = info->scanline_words;
-    volatile CARD32 *d;
+    volatile uint32_t *d;
 
     if (info->scanline_direct) return;
     --info->scanline_h;
@@ -1438,7 +1438,7 @@ static void R128CCESetupForDashedLine(ScrnInfoPtr pScrn,
 				   int length, unsigned char *pattern)
 {
     R128InfoPtr   info      = R128PTR(pScrn);
-    CARD32        pat       = *(CARD32 *)(pointer)pattern;
+    uint32_t      pat       = *(uint32_t *)(pointer)pattern;
     RING_LOCALS;
 
     R128CCE_REFRESH( pScrn, info );
diff --git a/src/r128_crtc.c b/src/r128_crtc.c
index e48e4d5..5f076cd 100644
--- a/src/r128_crtc.c
+++ b/src/r128_crtc.c
@@ -189,7 +189,7 @@ static void r128_crtc_mode_commit(xf86CrtcPtr crtc)
     r128_crtc_dpms(crtc, DPMSModeOn);
 }
 
-static void r128_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, int size)
+static void r128_crtc_gamma_set(xf86CrtcPtr crtc, uint16_t *red, uint16_t *green, uint16_t *blue, int size)
 {
     R128CrtcPrivatePtr r128_crtc = crtc->driver_private;
     int i;
diff --git a/src/r128_cursor.c b/src/r128_cursor.c
index ad6752f..d42bea6 100644
--- a/src/r128_cursor.c
+++ b/src/r128_cursor.c
@@ -179,18 +179,18 @@ void r128_crtc_load_cursor_image(xf86CrtcPtr crtc, unsigned char *src)
 
     R128InfoPtr   info      = R128PTR(pScrn);
     unsigned char *R128MMIO = info->MMIO;
-    CARD32        *s        = (pointer)src;
-    CARD32        *d        = (pointer)(info->FB + r128_crtc->cursor_offset + pScrn->fbOffset);
-    CARD32        save1     = 0;
-    CARD32        save2     = 0;
+    uint32_t      *s        = (pointer)src;
+    uint32_t      *d        = (pointer)(info->FB + r128_crtc->cursor_offset + pScrn->fbOffset);
+    uint32_t      save1     = 0;
+    uint32_t      save2     = 0;
     int           y;
 
     if (crtc_id == 0) {
 	save1 = INREG(R128_CRTC_GEN_CNTL);
-	OUTREG(R128_CRTC_GEN_CNTL, save1 & (CARD32)~R128_CRTC_CUR_EN);
+	OUTREG(R128_CRTC_GEN_CNTL, save1 & (uint32_t)~R128_CRTC_CUR_EN);
     } else if (crtc_id == 1) {
 	save2 = INREG(R128_CRTC2_GEN_CNTL);
-	OUTREG(R128_CRTC2_GEN_CNTL, save2 & (CARD32)~R128_CRTC2_CUR_EN);
+	OUTREG(R128_CRTC2_GEN_CNTL, save2 & (uint32_t)~R128_CRTC2_CUR_EN);
     }
 
 #if X_BYTE_ORDER == X_BIG_ENDIAN
@@ -255,7 +255,7 @@ Bool R128CursorInit(ScreenPtr pScreen)
     void*		  osArea  = NULL;
 #endif
     xf86CrtcConfigPtr     xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
-    CARD32                cursor_offset = 0;
+    uint32_t              cursor_offset = 0;
     int                   cpp = info->CurrentLayout.pixel_bytes;
     int                   width;
     int                   width_bytes;
diff --git a/src/r128_dga.c b/src/r128_dga.c
index d7fee02..bb4a1a6 100644
--- a/src/r128_dga.c
+++ b/src/r128_dga.c
@@ -332,7 +332,7 @@ R128_FillRect (
 ){
     R128InfoPtr info = R128PTR(pScrn);
 
-    (*info->accel->SetupForSolidFill)(pScrn, color, GXcopy, (CARD32)(~0));
+    (*info->accel->SetupForSolidFill)(pScrn, color, GXcopy, (uint32_t)(~0));
     (*info->accel->SubsequentSolidFillRect)(pScrn, x, y, w, h);
 
     if (pScrn->bitsPerPixel == info->CurrentLayout.bitsPerPixel)
@@ -351,7 +351,7 @@ R128_BlitRect(
     int ydir = (srcy < dsty) ? -1 : 1;
 
     (*info->accel->SetupForScreenToScreenCopy)(
-	pScrn, xdir, ydir, GXcopy, (CARD32)(~0), -1);
+	pScrn, xdir, ydir, GXcopy, (uint32_t)(~0), -1);
     (*info->accel->SubsequentScreenToScreenCopy)(
 	pScrn, srcx, srcy, dstx, dsty, w, h);
 
@@ -375,7 +375,7 @@ R128_BlitTransRect(
     info->XAAForceTransBlit = TRUE;
 
     (*info->accel->SetupForScreenToScreenCopy)(
-	pScrn, xdir, ydir, GXcopy, (CARD32)(~0), color);
+	pScrn, xdir, ydir, GXcopy, (uint32_t)(~0), color);
 
     info->XAAForceTransBlit = FALSE;
 
diff --git a/src/r128_dri.c b/src/r128_dri.c
index f924331..467cd88 100644
--- a/src/r128_dri.c
+++ b/src/r128_dri.c
@@ -397,7 +397,7 @@ static void R128DRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 indx)
     pboxSave = pbox = REGION_RECTS(prgn);
     nboxSave = nbox = REGION_NUM_RECTS(prgn);
 
-    (*info->accel->SetupForSolidFill)(pScrn, 0, GXcopy, (CARD32)(-1));
+    (*info->accel->SetupForSolidFill)(pScrn, 0, GXcopy, (uint32_t)(-1));
     for (; nbox; nbox--, pbox++) {
 	(*info->accel->SubsequentSolidFillRect)(pScrn,
 						pbox->x1 + info->fbX,
@@ -415,7 +415,7 @@ static void R128DRIInitBuffers(WindowPtr pWin, RegionPtr prgn, CARD32 indx)
     nbox = nboxSave;
 
     /* FIXME: this needs to consider depth tiling. */
-    (*info->accel->SetupForSolidFill)(pScrn, depth, GXcopy, (CARD32)(-1));
+    (*info->accel->SetupForSolidFill)(pScrn, depth, GXcopy, (uint32_t)(-1));
     for (; nbox; nbox--, pbox++)
 	(*info->accel->SubsequentSolidFillRect)(pScrn,
 						pbox->x1 + info->depthX,
@@ -647,7 +647,7 @@ static Bool R128DRIAgpInit(R128InfoPtr info, ScreenPtr pScreen)
 static Bool R128DRIPciInit(R128InfoPtr info, ScreenPtr pScreen)
 {
     unsigned char *R128MMIO = info->MMIO;
-    CARD32 chunk;
+    uint32_t chunk;
     int ret;
     int flags;
 
@@ -1413,12 +1413,12 @@ static void R128DRIRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
     if (!info->useEXA) {
 	(*info->accel->SetupForScreenToScreenCopy)(pScrn,
 					       1, 1, GXcopy,
-					       (CARD32)(-1), -1);
+					       (uint32_t)(-1), -1);
     }
 #endif
 #ifdef USE_EXA
     if (info->useEXA) {
-        CARD32 src_pitch_offset, dst_pitch_offset, datatype;
+        uint32_t src_pitch_offset, dst_pitch_offset, datatype;
 
 	R128GetPixmapOffsetPitch(pPix, &src_pitch_offset);
 	dst_pitch_offset = src_pitch_offset + (info->backOffset >> 5);
@@ -1465,7 +1465,7 @@ static void R128EnablePageFlip(ScreenPtr pScreen)
 	if (!info->useEXA) {
 	    (*info->accel->SetupForScreenToScreenCopy)(pScrn,
 						   1, 1, GXcopy,
-						   (CARD32)(-1), -1);
+						   (uint32_t)(-1), -1);
 
 	    (*info->accel->SubsequentScreenToScreenCopy)(pScrn,
 						     0,
@@ -1478,7 +1478,7 @@ static void R128EnablePageFlip(ScreenPtr pScreen)
 #endif
 #ifdef USE_EXA
 	if (info->useEXA) {
-	    CARD32 src_pitch_offset, dst_pitch_offset, datatype;
+	    uint32_t src_pitch_offset, dst_pitch_offset, datatype;
 
 	    R128GetPixmapOffsetPitch(pPix, &src_pitch_offset);
 	    dst_pitch_offset = src_pitch_offset + (info->backOffset >> 5);
diff --git a/src/r128_driver.c b/src/r128_driver.c
index 6cd669a..c541bfa 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -657,8 +657,8 @@ static Bool R128GetPLLParameters(ScrnInfoPtr pScrn)
 	pll->max_pll_freq   = 25000;
 	pll->xclk           = 10300;
     } else {
-	CARD16 bios_header    = R128_BIOS16(0x48);
-	CARD16 pll_info_block = R128_BIOS16(bios_header + 0x30);
+	uint16_t bios_header    = R128_BIOS16(0x48);
+	uint16_t pll_info_block = R128_BIOS16(bios_header + 0x30);
 	R128TRACE(("Header at 0x%04x; PLL Information at 0x%04x\n",
 		   bios_header, pll_info_block));
 
@@ -1634,7 +1634,7 @@ static void R128LoadPalette(ScrnInfoPtr pScrn, int numColors,
     xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
     int i, j;
     int c, index;
-    CARD16 lut_r[256], lut_g[256], lut_b[256];
+    uint16_t lut_r[256], lut_g[256], lut_b[256];
 
     for (c = 0; c < xf86_config->num_crtc; c++) {
         xf86CrtcPtr crtc = xf86_config->crtc[c];
@@ -2404,7 +2404,7 @@ void R128RestoreFPRegisters(ScrnInfoPtr pScrn, R128SavePtr restore)
     OUTREG(R128_TMDS_CRC,              restore->tmds_crc);
     OUTREG(R128_TMDS_TRANSMITTER_CNTL, restore->tmds_transmitter_cntl);
     OUTREG(R128_FP_PANEL_CNTL,         restore->fp_panel_cntl);
-    OUTREG(R128_FP_GEN_CNTL, restore->fp_gen_cntl & ~(CARD32)R128_FP_BLANK_DIS);
+    OUTREG(R128_FP_GEN_CNTL, restore->fp_gen_cntl & ~(uint32_t)R128_FP_BLANK_DIS);
 }
 
 /* Write LVDS registers */
@@ -2412,7 +2412,7 @@ void R128RestoreLVDSRegisters(ScrnInfoPtr pScrn, R128SavePtr restore)
 {
     R128InfoPtr   info      = R128PTR(pScrn);
     unsigned char *R128MMIO = info->MMIO;
-    CARD32        tmp;
+    uint32_t      tmp;
 
     tmp = INREG(R128_LVDS_GEN_CNTL);
     if ((tmp & (R128_LVDS_ON | R128_LVDS_BLON)) ==
@@ -2421,7 +2421,7 @@ void R128RestoreLVDSRegisters(ScrnInfoPtr pScrn, R128SavePtr restore)
     } else {
 	if (restore->lvds_gen_cntl & (R128_LVDS_ON | R128_LVDS_BLON)) {
 	    OUTREG(R128_LVDS_GEN_CNTL,
-		   restore->lvds_gen_cntl & (CARD32)~R128_LVDS_BLON);
+		   restore->lvds_gen_cntl & (uint32_t)~R128_LVDS_BLON);
 	    usleep(R128PTR(pScrn)->PanelPwrDly * 1000);
 	    OUTREG(R128_LVDS_GEN_CNTL, restore->lvds_gen_cntl);
 	} else {
@@ -3643,7 +3643,7 @@ ModeStatus R128ValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
 		    if (R128_BIOS16(j+5)) j  = R128_BIOS16(j+5);
 		    else                  j += 9;
 
-		    mode->Clock = (CARD32)R128_BIOS16(j) * 10;
+		    mode->Clock = (uint32_t)R128_BIOS16(j) * 10;
 
 		    mode->HDisplay   = mode->CrtcHDisplay   =
 			((R128_BIOS16(j+10) & 0x01ff)+1)*8;
diff --git a/src/r128_exa_render.c b/src/r128_exa_render.c
index f00daf7..c0d3688 100644
--- a/src/r128_exa_render.c
+++ b/src/r128_exa_render.c
@@ -40,8 +40,8 @@
 static struct {
     Bool dst_alpha;
     Bool src_alpha;
-    CARD32 sblend;
-    CARD32 dblend;
+    uint32_t sblend;
+    uint32_t dblend;
 } R128BlendOp[] = {
     /* Clear */
     {0, 0, R128_ALPHA_BLEND_ZERO        , R128_ALPHA_BLEND_ZERO},
@@ -582,9 +582,9 @@ R128CCEPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
     return TRUE;
 }
 
-typedef union { float f; CARD32 i; } fi_type;
+typedef union { float f; uint32_t i; } fi_type;
 
-static inline CARD32
+static inline uint32_t
 R128FloatAsInt(float val)
 {
 	fi_type fi;
diff --git a/src/r128_output.c b/src/r128_output.c
index e5306d6..7bb2e2a 100644
--- a/src/r128_output.c
+++ b/src/r128_output.c
@@ -234,7 +234,7 @@ static R128MonitorType R128DisplayDDCConnected(xf86OutputPtr output)
 
     R128MonitorType MonType = MT_NONE;
     xf86MonPtr *MonInfo = &output->MonInfo;
-    CARD32 mask1, mask2;
+    uint32_t mask1, mask2;
 
     if (r128_output->type == OUTPUT_LVDS) {
         return MT_LCD;
@@ -346,7 +346,7 @@ static void R128I2CPutBits(I2CBusPtr b, int Clock, int data)
     R128I2CBusPtr pR128I2CBus = b->DriverPrivate.ptr;
 
     val = INREG(pR128I2CBus->ddc_reg)
-              & ~(CARD32)(pR128I2CBus->put_clk_mask | pR128I2CBus->put_data_mask);
+              & ~(uint32_t)(pR128I2CBus->put_clk_mask | pR128I2CBus->put_data_mask);
     val |= (Clock ? 0 : pR128I2CBus->put_clk_mask);
     val |= (data  ? 0 : pR128I2CBus->put_data_mask);
     OUTREG(pR128I2CBus->ddc_reg, val);
diff --git a/src/r128_probe.h b/src/r128_probe.h
index 426840a..40fe82b 100644
--- a/src/r128_probe.h
+++ b/src/r128_probe.h
@@ -129,11 +129,11 @@ typedef enum
 } R128OutputType;
 
 typedef struct {
-    CARD32 ddc_reg;
-    CARD32 put_clk_mask;
-    CARD32 put_data_mask;
-    CARD32 get_clk_mask;
-    CARD32 get_data_mask;
+    uint32_t ddc_reg;
+    uint32_t put_clk_mask;
+    uint32_t put_data_mask;
+    uint32_t get_clk_mask;
+    uint32_t get_data_mask;
 } R128I2CBusRec, *R128I2CBusPtr;
 
 typedef struct _R128CrtcPrivateRec {
@@ -144,9 +144,9 @@ typedef struct _R128CrtcPrivateRec {
     ExaOffscreenArea *rotate_mem_exa;
 #endif
     int crtc_id;
-    CARD32 cursor_offset;
+    uint32_t cursor_offset;
     /* Lookup table values to be set when the CRTC is enabled */
-    CARD8 lut_r[256], lut_g[256], lut_b[256];
+    uint8_t lut_r[256], lut_g[256], lut_b[256];
 } R128CrtcPrivateRec, *R128CrtcPrivatePtr;
 
 typedef struct {
diff --git a/src/r128_reg.h b/src/r128_reg.h
index 9ba0de5..eee5fb1 100644
--- a/src/r128_reg.h
+++ b/src/r128_reg.h
@@ -57,12 +57,12 @@
 #define OUTREG16(addr, val) MMIO_OUT16(R128MMIO, addr, val)
 #define OUTREG(addr, val)   MMIO_OUT32(R128MMIO, addr, val)
 
-#define ADDRREG(addr)       ((volatile CARD32 *)(pointer)(R128MMIO + (addr)))
+#define ADDRREG(addr)       ((volatile uint32_t *)(pointer)(R128MMIO + (addr)))
 
 
 #define OUTREGP(addr, val, mask)   \
     do {                           \
-	CARD32 tmp = INREG(addr);  \
+	uint32_t tmp = INREG(addr);  \
 	tmp &= (mask);             \
 	tmp |= ((val) & ~(mask));  \
 	OUTREG(addr, tmp);         \
@@ -78,7 +78,7 @@
 
 #define OUTPLLP(pScrn, addr, val, mask)                                   \
     do {                                                                  \
-	CARD32 tmp = INPLL(pScrn, addr);                                  \
+	uint32_t tmp = INPLL(pScrn, addr);                                  \
 	tmp &= (mask);                                                    \
 	tmp |= ((val) & ~(mask));                                         \
 	OUTPLL(addr, tmp);                                                \
@@ -94,7 +94,7 @@
 	OUTREG(R128_PALETTE_DATA, ((r) << 16) | ((g) << 8) | (b));        \
     } while (0)
 
-#define OUTPAL_NEXT_CARD32(v)                                             \
+#define OUTPAL_NEXT_uint32_t(v)                                             \
     do {                                                                  \
 	OUTREG(R128_PALETTE_DATA, (v & 0x00ffffff));                      \
     } while (0)
@@ -114,12 +114,12 @@
 
 #define PAL_SELECT(idx)                                                   \
     do {                                                                  \
-	CARD32 tmp = INREG(R128_DAC_CNTL);                                \
+	uint32_t tmp = INREG(R128_DAC_CNTL);                                \
 	if (idx) {                                                        \
 	    OUTREG(R128_DAC_CNTL, tmp | R128_DAC_PALETTE_ACC_CTL);        \
 	} else {                                                          \
 	    OUTREG(R128_DAC_CNTL, tmp &                                   \
-		   (CARD32)~R128_DAC_PALETTE_ACC_CTL);                    \
+		   (uint32_t)~R128_DAC_PALETTE_ACC_CTL);                    \
 	}                                                                 \
     } while (0)
 
diff --git a/src/r128_video.c b/src/r128_video.c
index 6439a24..bcf36fc 100644
--- a/src/r128_video.c
+++ b/src/r128_video.c
@@ -59,8 +59,8 @@ typedef struct {
    void*         BufferHandle;
    int		 videoOffset;
    RegionRec     clip;
-   CARD32        colorKey;
-   CARD32        videoStatus;
+   uint32_t      colorKey;
+   uint32_t      videoStatus;
    Time          offTime;
    Time          freeTime;
    int           ecp_div;
@@ -405,7 +405,7 @@ R128DMA(
 #define BUFSIZE (R128_BUFFER_SIZE - R128_HOSTDATA_BLIT_OFFSET)
 #define MAXPASSES (MAXHEIGHT/(BUFSIZE/(MAXWIDTH*2))+1)
 
-    unsigned char *fb = (CARD8*)info->FB;
+    unsigned char *fb = (uint8_t*)info->FB;
     unsigned char *buf;
     int err=-1, i, idx, offset, hpass, passes, srcpassbytes, dstpassbytes;
     int sizes[MAXPASSES], list[MAXPASSES];
@@ -572,7 +572,7 @@ R128CopyData420(
 }
 
 
-static CARD32
+static uint32_t
 R128AllocateMemory(
    ScrnInfoPtr pScrn,
    void **mem_struct,
@@ -841,14 +841,14 @@ R128PutImage(
 ){
    R128InfoPtr info = R128PTR(pScrn);
    R128PortPrivPtr pPriv = (R128PortPrivPtr)data;
-   unsigned char *fb = (CARD8*)info->FB;
+   unsigned char *fb = (uint8_t*)info->FB;
    INT32 xa, xb, ya, yb;
    int new_size, offset, s1offset, s2offset, s3offset;
    int srcPitch, srcPitch2, dstPitch;
    int d1line, d2line, d3line, d1offset, d2offset, d3offset;
    int top, left, npixels, nlines;
    BoxRec dstBox;
-   CARD32 tmp;
+   uint32_t tmp;
 
    /* Currently, the video is only visible on the first monitor.
     * In the future we could try to make this smarter, or just implement
@@ -858,7 +858,7 @@ R128PutImage(
 
 #if X_BYTE_ORDER == X_BIG_ENDIAN
    unsigned char *R128MMIO = info->MMIO;
-   CARD32 config_cntl = INREG(R128_CONFIG_CNTL);
+   uint32_t config_cntl = INREG(R128_CONFIG_CNTL);
 
    /* We need to disable byte swapping, or the data gets mangled */
    OUTREG(R128_CONFIG_CNTL, config_cntl &
-- 
2.0.0



More information about the xorg-driver-ati mailing list