xf86-video-ati: Branch 'atombios-support' - 5 commits

Alex Deucher agd5f at kemper.freedesktop.org
Wed Dec 12 19:38:03 PST 2007


 src/r128_dri.c      |    6 ++---
 src/r128_probe.c    |    2 -
 src/radeon.h        |    4 ---
 src/radeon_bios.c   |    7 ++----
 src/radeon_crtc.c   |    2 -
 src/radeon_cursor.c |   49 ++++++++++++++++++++++++++++++-----------------
 src/radeon_dri.c    |    3 ++
 src/radeon_driver.c |    5 ----
 src/radeon_exa.c    |   20 ++++++++++++++-----
 src/radeon_output.c |   54 +++++++++++++++++++++++++++++++++++++++-------------
 src/radeon_probe.h  |    2 -
 11 files changed, 100 insertions(+), 54 deletions(-)

New commits:
commit f5ac34983411e4c4f41ab1817dce582830f398fd
Merge: f2b2e08... 6ccf5b3...
Author: Alex Deucher <alex at samba.(none)>
Date:   Wed Dec 12 22:37:44 2007 -0500

    Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support
    
    merge and fix conflicts

diff --cc src/radeon_cursor.c
index 00913c8,9dd6eb8..842668b
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@@ -89,25 -89,6 +89,25 @@@
  
  #endif
  
 +static void
 +avivo_setup_cursor(xf86CrtcPtr crtc, Bool enable)
 +{
 +    RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
 +    RADEONInfoPtr  info = RADEONPTR(crtc->scrn);
 +    unsigned char     *RADEONMMIO = info->MMIO;
 +
 +    OUTREG(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset, 0);
 +
 +    if (enable) {
 +	OUTREG(AVIVO_D1CUR_SURFACE_ADDRESS + radeon_crtc->crtc_offset,
- 	       info->fbLocation + info->cursor_offset);
++	       info->fbLocation + radeon_crtc->cursor_offset);
 +	OUTREG(AVIVO_D1CUR_SIZE + radeon_crtc->crtc_offset,
 +	       ((CURSOR_WIDTH - 1) << 16) | (CURSOR_HEIGHT - 1));
 +	OUTREG(AVIVO_D1CUR_CONTROL + radeon_crtc->crtc_offset,
 +	       AVIVO_D1CURSOR_EN | (AVIVO_D1CURSOR_MODE_24BPP << AVIVO_D1CURSOR_MODE_SHIFT));
 +    }
 +}
 +
  void
  radeon_crtc_show_cursor (xf86CrtcPtr crtc)
  {
@@@ -191,38 -158,30 +191,38 @@@ radeon_crtc_set_cursor_position (xf86Cr
      else if (mode->Flags & V_DBLSCAN)
  	y *= 2;
  
 -    if (crtc_id == 0) {
 -	OUTREG(RADEON_CUR_HORZ_VERT_OFF,  (RADEON_CUR_LOCK
 -					   | (xorigin << 16)
 -					   | yorigin));
 -	OUTREG(RADEON_CUR_HORZ_VERT_POSN, (RADEON_CUR_LOCK
 -					   | ((xorigin ? 0 : x) << 16)
 -					   | (yorigin ? 0 : y)));
 -	RADEONCTRACE(("cursor_offset: 0x%x, yorigin: %d, stride: %d, temp %08X\n",
 -			radeon_crtc->cursor_offset + pScrn->fbOffset, yorigin, stride, temp));
 -	OUTREG(RADEON_CUR_OFFSET,
 -		radeon_crtc->cursor_offset + pScrn->fbOffset + yorigin * stride);
 -    } else if (crtc_id == 1) {
 -	OUTREG(RADEON_CUR2_HORZ_VERT_OFF,  (RADEON_CUR2_LOCK
 -					    | (xorigin << 16)
 -					    | yorigin));
 -	OUTREG(RADEON_CUR2_HORZ_VERT_POSN, (RADEON_CUR2_LOCK
 -					   | ((xorigin ? 0 : x) << 16)
 -					   | (yorigin ? 0 : y)));
 -	RADEONCTRACE(("cursor_offset2: 0x%x, yorigin: %d, stride: %d, temp %08X\n",
 -			radeon_crtc->cursor_offset + pScrn->fbOffset, yorigin, stride, temp));
 -	OUTREG(RADEON_CUR2_OFFSET,
 -		radeon_crtc->cursor_offset + pScrn->fbOffset + yorigin * stride);
 +    if (IS_AVIVO_VARIANT) {
 +	/* avivo cursor spans the full fb width */
 +	x += crtc->x;
 +	y += crtc->y;
 +	OUTREG(AVIVO_D1CUR_POSITION + radeon_crtc->crtc_offset, ((xorigin ? 0 : x) << 16)
 +	       | (yorigin ? 0 : y));
 +	OUTREG(AVIVO_D1CUR_HOT_SPOT + radeon_crtc->crtc_offset, (xorigin << 16) | yorigin);
 +    } else {
 +	if (crtc_id == 0) {
 +	    OUTREG(RADEON_CUR_HORZ_VERT_OFF,  (RADEON_CUR_LOCK
 +					       | (xorigin << 16)
 +					       | yorigin));
 +	    OUTREG(RADEON_CUR_HORZ_VERT_POSN, (RADEON_CUR_LOCK
 +					       | ((xorigin ? 0 : x) << 16)
 +					       | (yorigin ? 0 : y)));
 +	    RADEONCTRACE(("cursor_offset: 0x%x, yorigin: %d, stride: %d, temp %08X\n",
- 			  info->cursor_offset + pScrn->fbOffset, yorigin, stride, temp));
++			  radeon_crtc->cursor_offset + pScrn->fbOffset, yorigin, stride, temp));
 +	    OUTREG(RADEON_CUR_OFFSET,
- 		   info->cursor_offset + pScrn->fbOffset + yorigin * stride);
++		   radeon_crtc->cursor_offset + pScrn->fbOffset + yorigin * stride);
 +	} else if (crtc_id == 1) {
 +	    OUTREG(RADEON_CUR2_HORZ_VERT_OFF,  (RADEON_CUR2_LOCK
 +						| (xorigin << 16)
 +						| yorigin));
 +	    OUTREG(RADEON_CUR2_HORZ_VERT_POSN, (RADEON_CUR2_LOCK
 +						| ((xorigin ? 0 : x) << 16)
 +						| (yorigin ? 0 : y)));
 +	    RADEONCTRACE(("cursor_offset2: 0x%x, yorigin: %d, stride: %d, temp %08X\n",
- 			  info->cursor_offset + pScrn->fbOffset, yorigin, stride, temp));
++			  radeon_crtc->cursor_offset + pScrn->fbOffset, yorigin, stride, temp));
 +	    OUTREG(RADEON_CUR2_OFFSET,
- 		   info->cursor_offset + pScrn->fbOffset + yorigin * stride);
++		   radeon_crtc->cursor_offset + pScrn->fbOffset + yorigin * stride);
 +	}
      }
 -
  }
  
  void
@@@ -310,10 -272,10 +314,10 @@@ Bool RADEONCursorInit(ScreenPtr pScreen
  	FBAreaPtr          fbarea;
  
  	fbarea = xf86AllocateOffscreenArea(pScreen, width, height,
 -					   256, NULL, NULL, NULL);
 +					   align, NULL, NULL, NULL);
  
  	if (!fbarea) {
- 	    info->cursor_offset    = 0;
+ 	    cursor_offset    = 0;
  	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
  		   "Hardware cursor disabled"
  		   " due to insufficient offscreen memory\n");
diff --cc src/radeon_probe.h
index df07149,7f8ce45..a25d635
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@@ -165,17 -166,9 +165,17 @@@ typedef struct _RADEONCrtcPrivateRec 
  #endif
      int crtc_id;
      int binding;
+     CARD32 cursor_offset;
      /* Lookup table values to be set when the CRTC is enabled */
      CARD8 lut_r[256], lut_g[256], lut_b[256];
 +
 +    uint32_t crtc_offset;
 +    int               h_total, h_blank, h_sync_wid, h_sync_pol;
 +    int               v_total, v_blank, v_sync_wid, v_sync_pol;
 +    int               fb_format, fb_length;
 +    int               fb_pitch, fb_width, fb_height;
 +    INT16             cursor_x;
 +    INT16             cursor_y;
-     unsigned long     cursor_offset;
  } RADEONCrtcPrivateRec, *RADEONCrtcPrivatePtr;
  
  typedef struct {
commit 6ccf5b33d27218ae1c45ab93c122438ed536d8ba
Author: Alex Deucher <alex at botch2.(none)>
Date:   Wed Dec 12 20:12:06 2007 -0500

    RADEON: only enable vblanks if we want them
    
    should fix bug 13610

diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 7136e4e..618334e 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -1361,6 +1361,9 @@ Bool RADEONDRISetVBlankInterrupt(ScrnInfoPtr pScrn, Bool on)
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
     int value = 0;
 
+    if (!info->want_vblank_interrupts)
+        on = FALSE;
+
     if (info->directRenderingEnabled && info->pKernelDRMVersion->version_minor >= 28) {
         if (on) {
   	    if (xf86_config->num_crtc > 1 && xf86_config->crtc[1]->enabled)
commit 1668f2056f56370f1b5681c13f1e14904e301216
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date:   Wed Dec 12 19:39:08 2007 -0500

    RADEON: use /proc/acpi to determine lid status
    
    Linux only

diff --git a/src/radeon_output.c b/src/radeon_output.c
index d041d54..12c83aa 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -684,6 +684,45 @@ void RADEONConnectorFindMonitor(ScrnInfoPtr pScrn, xf86OutputPtr output)
     }
 }
 
+static RADEONMonitorType
+RADEONDetectLidStatus(ScrnInfoPtr pScrn)
+{
+    RADEONInfoPtr info = RADEONPTR(pScrn);
+    RADEONMonitorType MonType = MT_NONE;
+#ifdef __linux__
+    char lidline[50];  /* 50 should be sufficient for our purposes */
+    FILE *f = fopen ("/proc/acpi/button/lid/LID/state", "r");
+
+    if (f != NULL) {
+	while (fgets(lidline, sizeof lidline, f)) {
+	    if (!strncmp(lidline, "state:", strlen ("state:"))) {
+		if (strstr(lidline, "open")) {
+		    ErrorF("proc lid open\n");
+		    return MT_LCD;
+		}
+		else if (strstr(lidline, "closed")) {
+		    ErrorF("proc lid closed\n");
+		    return MT_NONE;
+		}
+	    }
+	}
+    }
+#endif
+
+    if (!info->IsAtomBios) {
+	unsigned char *RADEONMMIO = info->MMIO;
+
+	/* see if the lid is closed -- only works at boot */
+	if (INREG(RADEON_BIOS_6_SCRATCH) & 0x10)
+	    MonType = MT_NONE;
+	else
+	    MonType = MT_LCD;
+    } else
+	MonType = MT_LCD;
+
+    return MonType;
+}
+
 static RADEONMonitorType RADEONPortCheckNonDDC(ScrnInfoPtr pScrn, xf86OutputPtr output)
 {
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
@@ -691,21 +730,10 @@ static RADEONMonitorType RADEONPortCheckNonDDC(ScrnInfoPtr pScrn, xf86OutputPtr
 
     if (radeon_output->type == OUTPUT_LVDS) {
 #if defined(__powerpc__)
-	/* not sure on ppc, OF? */
+	MonType = MT_LCD;
 #else
-	RADEONInfoPtr info       = RADEONPTR(pScrn);
-
-	if (!info->IsAtomBios) {
-	    unsigned char *RADEONMMIO = info->MMIO;
-
-	    /* see if the lid is closed -- only works at boot */
-	    if (INREG(RADEON_BIOS_6_SCRATCH) & 0x10)
-		MonType = MT_NONE;
-	    else
-		MonType = MT_LCD;
-	} else
+	MonType = RADEONDetectLidStatus(pScrn);
 #endif
-	    MonType = MT_LCD;
     } /*else if (radeon_output->type == OUTPUT_DVI) {
 	if (radeon_output->TMDSType == TMDS_INT) {
 	    if (INREG(RADEON_FP_GEN_CNTL) & RADEON_FP_DETECT_SENSE)
commit 33a39947f7f79533cd90007a17d57b20126642c6
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date:   Wed Dec 12 18:50:18 2007 -0500

    RADEON: fix cursors when using rotation
    
    allocate separate cursor buffers for each crtc

diff --git a/src/radeon.h b/src/radeon.h
index b7f9288..960266e 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -557,10 +557,6 @@ typedef struct {
 #endif
     Bool              accelOn;
     xf86CursorInfoPtr cursor;
-    CARD32            cursor_offset;
-#ifdef USE_XAA
-    unsigned long     cursor_end;
-#endif
     Bool              allowColorTiling;
     Bool              tilingEnabled; /* mirror of sarea->tiling_enabled */
 #ifdef ARGB_CURSOR
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index b8cfffd..9dd6eb8 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -166,9 +166,9 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
 					   | ((xorigin ? 0 : x) << 16)
 					   | (yorigin ? 0 : y)));
 	RADEONCTRACE(("cursor_offset: 0x%x, yorigin: %d, stride: %d, temp %08X\n",
-			info->cursor_offset + pScrn->fbOffset, yorigin, stride, temp));
+			radeon_crtc->cursor_offset + pScrn->fbOffset, yorigin, stride, temp));
 	OUTREG(RADEON_CUR_OFFSET,
-		info->cursor_offset + pScrn->fbOffset + yorigin * stride);
+		radeon_crtc->cursor_offset + pScrn->fbOffset + yorigin * stride);
     } else if (crtc_id == 1) {
 	OUTREG(RADEON_CUR2_HORZ_VERT_OFF,  (RADEON_CUR2_LOCK
 					    | (xorigin << 16)
@@ -177,9 +177,9 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
 					   | ((xorigin ? 0 : x) << 16)
 					   | (yorigin ? 0 : y)));
 	RADEONCTRACE(("cursor_offset2: 0x%x, yorigin: %d, stride: %d, temp %08X\n",
-			info->cursor_offset + pScrn->fbOffset, yorigin, stride, temp));
+			radeon_crtc->cursor_offset + pScrn->fbOffset, yorigin, stride, temp));
 	OUTREG(RADEON_CUR2_OFFSET,
-		info->cursor_offset + pScrn->fbOffset + yorigin * stride);
+		radeon_crtc->cursor_offset + pScrn->fbOffset + yorigin * stride);
     }
 
 }
@@ -188,8 +188,9 @@ void
 radeon_crtc_set_cursor_colors (xf86CrtcPtr crtc, int bg, int fg)
 {
     ScrnInfoPtr pScrn = crtc->scrn;
+    RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
     RADEONInfoPtr      info       = RADEONPTR(pScrn);
-    CARD32        *pixels     = (CARD32 *)(pointer)(info->FB + info->cursor_offset + pScrn->fbOffset);
+    CARD32        *pixels     = (CARD32 *)(pointer)(info->FB + radeon_crtc->cursor_offset + pScrn->fbOffset);
     int            pixel, i;
     CURSOR_SWAPPING_DECL_MMIO
 
@@ -229,9 +230,10 @@ void
 radeon_crtc_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image)
 {
     ScrnInfoPtr pScrn = crtc->scrn;
+    RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
     RADEONInfoPtr  info       = RADEONPTR(pScrn);
     unsigned char *RADEONMMIO = info->MMIO;
-    CARD32        *d          = (CARD32 *)(pointer)(info->FB + info->cursor_offset + pScrn->fbOffset);
+    CARD32        *d          = (CARD32 *)(pointer)(info->FB + radeon_crtc->cursor_offset + pScrn->fbOffset);
 
     RADEONCTRACE(("RADEONLoadCursorARGB\n"));
 
@@ -252,16 +254,18 @@ Bool RADEONCursorInit(ScreenPtr pScreen)
 {
     ScrnInfoPtr        pScrn   = xf86Screens[pScreen->myNum];
     RADEONInfoPtr      info    = RADEONPTR(pScrn);
+    xf86CrtcConfigPtr  xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
     int                width;
     int		       width_bytes;
     int                height;
     int                size_bytes;
-
+    CARD32             cursor_offset = 0;
+    int                c;
 
     size_bytes                = CURSOR_WIDTH * 4 * CURSOR_HEIGHT;
     width                     = pScrn->displayWidth;
     width_bytes		      = width * (pScrn->bitsPerPixel / 8);
-    height                    = (size_bytes + width_bytes - 1) / width_bytes;
+    height                    = ((size_bytes * xf86_config->num_crtc) + width_bytes - 1) / width_bytes;
 
 #ifdef USE_XAA
     if (!info->useEXA) {
@@ -271,19 +275,30 @@ Bool RADEONCursorInit(ScreenPtr pScreen)
 					   256, NULL, NULL, NULL);
 
 	if (!fbarea) {
-	    info->cursor_offset    = 0;
+	    cursor_offset    = 0;
 	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
 		   "Hardware cursor disabled"
 		   " due to insufficient offscreen memory\n");
+	    return FALSE;
 	} else {
-	    info->cursor_offset  = RADEON_ALIGN((fbarea->box.x1 +
-						fbarea->box.y1 * width) *
-						info->CurrentLayout.pixel_bytes,
-						256);
-	    info->cursor_end = info->cursor_offset + size_bytes;
+	    cursor_offset  = RADEON_ALIGN((fbarea->box.x1 +
+					   fbarea->box.y1 * width) *
+					  info->CurrentLayout.pixel_bytes,
+					  256);
+
+	    for (c = 0; c < xf86_config->num_crtc; c++) {
+		xf86CrtcPtr crtc = xf86_config->crtc[c];
+		RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
+
+		radeon_crtc->cursor_offset = cursor_offset + (c * size_bytes);
+
+		xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+			   "Using hardware cursor %d (scanline %u)\n", c,
+			   (unsigned)(radeon_crtc->cursor_offset / pScrn->displayWidth
+				      / info->CurrentLayout.pixel_bytes));
+	    }
+
 	}
-	RADEONCTRACE(("RADEONCursorInit (0x%08x-0x%08x)\n",
-		    info->cursor_offset, info->cursor_end));
     }
 #endif
 
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 4b5008e..122c582 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -3542,10 +3542,6 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
 	    if (!info->useEXA) {
 		int  width, height;
 
-		xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-			   "Using hardware cursor (scanline %u)\n",
-			   (unsigned)(info->cursor_offset / pScrn->displayWidth
-				      / info->CurrentLayout.pixel_bytes));
 		if (xf86QueryLargestOffscreenArea(pScreen, &width, &height,
 					      0, 0, 0)) {
 		    xf86DrvMsg(scrnIndex, X_INFO,
@@ -3560,7 +3556,6 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
 	    xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n");
 	}
     } else {
-	info->cursor_offset = 0;
 	xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n");
     }
 
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
index 8a12e1b..4da4841 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
@@ -374,6 +374,7 @@ Bool RADEONSetupMemEXA (ScreenPtr pScreen)
 {
     ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
     RADEONInfoPtr info = RADEONPTR(pScrn);
+    xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
     int cpp = info->CurrentLayout.pixel_bytes;
     int screen_size;
     int byteStride = pScrn->displayWidth * cpp;
@@ -405,14 +406,23 @@ Bool RADEONSetupMemEXA (ScreenPtr pScreen)
     /* Reserve static area for hardware cursor */
     if (!xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE)) {
 	int cursor_size = 64 * 4 * 64;
+	int c;
 
-	info->cursor_offset = info->exa->offScreenBase;
+	for (c = 0; c < xf86_config->num_crtc; c++) {
+	    xf86CrtcPtr crtc = xf86_config->crtc[c];
+	    RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
+
+	    radeon_crtc->cursor_offset = info->exa->offScreenBase;
+	    info->exa->offScreenBase += cursor_size;
+
+	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		       "Will use %d kb for hardware cursor %d at offset 0x%08x\n",
+		       (cursor_size * xf86_config->num_crtc) / 1024,
+		       c,
+		       (unsigned int)radeon_crtc->cursor_offset);
+	}
 
-	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-		   "Will use %d kb for hardware cursor at offset 0x%08x\n",
-		   cursor_size / 1024, (unsigned int)info->cursor_offset);
 
-	info->exa->offScreenBase += cursor_size;
     }
 
 #if defined(XF86DRI)
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index 66ece94..7f8ce45 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -166,6 +166,7 @@ typedef struct _RADEONCrtcPrivateRec {
 #endif
     int crtc_id;
     int binding;
+    CARD32 cursor_offset;
     /* Lookup table values to be set when the CRTC is enabled */
     CARD8 lut_r[256], lut_g[256], lut_b[256];
 } RADEONCrtcPrivateRec, *RADEONCrtcPrivatePtr;
commit 9e5efdecd12092031a4aebce58747cb4a6f48f28
Author: Arkadiusz Miskiewicz <arekm at maven.pl>
Date:   Tue Dec 11 23:53:03 2007 -0500

    sparse fixes and cleanups from arekm

diff --git a/src/r128_dri.c b/src/r128_dri.c
index fc91421..edb77ba 100644
--- a/src/r128_dri.c
+++ b/src/r128_dri.c
@@ -80,9 +80,9 @@ static Bool R128InitVisualConfigs(ScreenPtr pScreen)
     ScrnInfoPtr       pScrn            = xf86Screens[pScreen->myNum];
     R128InfoPtr       info             = R128PTR(pScrn);
     int               numConfigs       = 0;
-    __GLXvisualConfig *pConfigs        = 0;
-    R128ConfigPrivPtr pR128Configs     = 0;
-    R128ConfigPrivPtr *pR128ConfigPtrs = 0;
+    __GLXvisualConfig *pConfigs        = NULL;
+    R128ConfigPrivPtr pR128Configs     = NULL;
+    R128ConfigPrivPtr *pR128ConfigPtrs = NULL;
     int               i, accum, stencil, db;
 
     switch (info->CurrentLayout.pixel_code) {
diff --git a/src/r128_probe.c b/src/r128_probe.c
index b2298df..0be21e8 100644
--- a/src/r128_probe.c
+++ b/src/r128_probe.c
@@ -193,7 +193,7 @@ R128Probe(DriverPtr drv, int flags)
  
         pScrn    = NULL;
         if((pScrn = xf86ConfigPciEntity(pScrn, 0, usedChips[i],
-             R128PciChipsets, 0, 0, 0, 0, 0)))
+             R128PciChipsets, NULL, NULL, NULL, NULL, NULL)))
 	{
 	    pScrn->driverVersion = R128_VERSION_CURRENT;
 	    pScrn->driverName    = R128_DRIVER_NAME;
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index bc908b5..d150c4b 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -48,13 +48,12 @@ Bool RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr  pInt10)
     int tmp;
     unsigned short dptr;
 
-    if (!(info->VBIOS = xalloc(
 #ifdef XSERVER_LIBPCIACCESS
-			       info->PciInfo->rom_size
+    info->VBIOS = xalloc(info->PciInfo->rom_size);
 #else
-			       RADEON_VBIOS_SIZE
+    info->VBIOS = xalloc(RADEON_VBIOS_SIZE);
 #endif
-			       ))) {
+    if (!info->VBIOS) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Cannot allocate space for hold Video BIOS!\n");
 	return FALSE;
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index 8984428..2023f40 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -637,7 +637,7 @@ RADEONComputePLL(RADEONPLLPtr pll,
     CARD32 best_error = 0xffffffff;
     CARD32 best_vco_diff = 1;
 
-    ErrorF("freq: %d\n", freq);
+    ErrorF("freq: %lu\n", freq);
 
     for (i = 0; post_divs[i]; i++) {
 	int post_div = post_divs[i];


More information about the xorg-commit mailing list