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

Alex Deucher agd5f at kemper.freedesktop.org
Fri Nov 30 13:41:33 PST 2007


 man/radeon.man      |   26 ++++++--
 src/radeon.h        |   16 +++--
 src/radeon_crtc.c   |    4 -
 src/radeon_driver.c |   18 +++--
 src/radeon_output.c |  158 +++++++++++++++++++++++++++++++++++++++++++---------
 src/radeon_render.c |    4 -
 6 files changed, 177 insertions(+), 49 deletions(-)

New commits:
commit af0196f7bf0d1d5d211391149c18935d64ed2b06
Merge: d9858a2... 0175b79...
Author: Alex Deucher <alex at botch2.(none)>
Date:   Fri Nov 30 16:40:28 2007 -0500

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

diff --cc src/radeon.h
index b814b10,f9bf343..586a1fc
--- a/src/radeon.h
+++ b/src/radeon.h
@@@ -943,11 -833,8 +950,12 @@@ typedef struct 
  #if defined(__powerpc__)
      RADEONMacModel    MacModel;
  #endif
+     RADEONExtTMDSChip ext_tmds_chip;
  
 +    atomBiosHandlePtr atomBIOS;
 +    unsigned long FbFreeStart, FbFreeSize;
 +    unsigned char*      BIOSCopy;
 +
      Rotation rotation;
      void (*PointerMoved)(int, int, int);
      CreateScreenResourcesProcPtr CreateScreenResources;
diff --cc src/radeon_output.c
index d8ded6d,efe093f..a325add
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@@ -1741,11 -1683,13 +1752,13 @@@ radeon_detect(xf86OutputPtr output
  	  /* default to unknown for flaky chips/connectors
  	   * so we can get something on the screen
  	   */
- 	  if (((radeon_output->type == OUTPUT_VGA || radeon_output->type == OUTPUT_DVI_I) &&
- 	       radeon_output->DACType == DAC_TVDAC)) {
 -	  if ((radeon_output->type == OUTPUT_VGA || radeon_output->type == OUTPUT_DVI) &&
++	  if ((radeon_output->type == OUTPUT_VGA || radeon_output->type == OUTPUT_DVI_I) &&
+ 	      (radeon_output->DACType == DAC_TVDAC) &&
+ 	      (info->ChipFamily == CHIP_FAMILY_RS400)) {
  	      radeon_output->MonType = MT_CRT;
  	      return XF86OutputStatusUnknown;
- 	  } else if  (info->IsIGP && radeon_output->type == OUTPUT_DVI_D) {
+ 	  } else if  ((info->ChipFamily == CHIP_FAMILY_RS400) &&
 -		      radeon_output->type == OUTPUT_DVI) {
++		      radeon_output->type == OUTPUT_DVI_D) {
  	      radeon_output->MonType = MT_DFP; /* MT_LCD ??? */
  	      return XF86OutputStatusUnknown;
  	  }
@@@ -2799,17 -2675,17 +2812,17 @@@ static Bool RADEONSetupAppleConnectors(
  	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
  	info->BiosConnector[2].DACType = DAC_TVDAC;
  	info->BiosConnector[2].TMDSType = TMDS_NONE;
 -	info->BiosConnector[2].DDCType = DDC_NONE_DETECTED;
 +	info->BiosConnector[2].ddc_line = 0;
  	info->BiosConnector[2].valid = TRUE;
  	return TRUE;
-     case RADEON_MAC_POWERBOOK_DL:
+     case RADEON_MAC_POWERBOOK_EXTERNAL:
 -	info->BiosConnector[0].DDCType = DDC_DVI;
 +	info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC;
  	info->BiosConnector[0].DACType = DAC_NONE;
  	info->BiosConnector[0].TMDSType = TMDS_NONE;
 -	info->BiosConnector[0].ConnectorType = CONNECTOR_PROPRIETARY;
 +	info->BiosConnector[0].ConnectorType = CONNECTOR_LVDS;
  	info->BiosConnector[0].valid = TRUE;
  
 -	info->BiosConnector[1].DDCType = DDC_VGA;
 +	info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
  	info->BiosConnector[1].DACType = DAC_PRIMARY;
  	info->BiosConnector[1].TMDSType = TMDS_EXT;
  	info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I;
@@@ -2818,17 -2694,17 +2831,18 @@@
  	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
  	info->BiosConnector[2].DACType = DAC_TVDAC;
  	info->BiosConnector[2].TMDSType = TMDS_NONE;
 -	info->BiosConnector[2].DDCType = DDC_NONE_DETECTED;
 +	info->BiosConnector[2].ddc_line = 0;
  	info->BiosConnector[2].valid = TRUE;
  	return TRUE;
-     case RADEON_MAC_POWERBOOK:
++
+     case RADEON_MAC_POWERBOOK_INTERNAL:
 -	info->BiosConnector[0].DDCType = DDC_DVI;
 +	info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC;
  	info->BiosConnector[0].DACType = DAC_NONE;
  	info->BiosConnector[0].TMDSType = TMDS_NONE;
 -	info->BiosConnector[0].ConnectorType = CONNECTOR_PROPRIETARY;
 +	info->BiosConnector[0].ConnectorType = CONNECTOR_LVDS;
  	info->BiosConnector[0].valid = TRUE;
  
 -	info->BiosConnector[1].DDCType = DDC_VGA;
 +	info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
  	info->BiosConnector[1].DACType = DAC_PRIMARY;
  	info->BiosConnector[1].TMDSType = TMDS_INT;
  	info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I;
@@@ -2837,11 -2713,30 +2851,30 @@@
  	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
  	info->BiosConnector[2].DACType = DAC_TVDAC;
  	info->BiosConnector[2].TMDSType = TMDS_NONE;
 -	info->BiosConnector[2].DDCType = DDC_NONE_DETECTED;
 +	info->BiosConnector[2].ddc_line = 0;
  	info->BiosConnector[2].valid = TRUE;
  	return TRUE;
-     case RADEON_MAC_MINI:
+     case RADEON_MAC_POWERBOOK_VGA:
 -	info->BiosConnector[0].DDCType = DDC_DVI;
++	info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC;
+ 	info->BiosConnector[0].DACType = DAC_NONE;
+ 	info->BiosConnector[0].TMDSType = TMDS_NONE;
+ 	info->BiosConnector[0].ConnectorType = CONNECTOR_CRT;
+ 	info->BiosConnector[0].valid = TRUE;
+ 
 -	info->BiosConnector[1].DDCType = DDC_VGA;
++	info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
+ 	info->BiosConnector[1].DACType = DAC_PRIMARY;
+ 	info->BiosConnector[1].TMDSType = TMDS_INT;
+ 	info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I;
+ 	info->BiosConnector[1].valid = TRUE;
+ 
+ 	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
+ 	info->BiosConnector[2].DACType = DAC_TVDAC;
+ 	info->BiosConnector[2].TMDSType = TMDS_NONE;
 -	info->BiosConnector[2].DDCType = DDC_NONE_DETECTED;
++	info->BiosConnector[2].ddc_line = 0;
+ 	info->BiosConnector[2].valid = TRUE;
+ 	return TRUE;
+     case RADEON_MAC_MINI_EXTERNAL:
 -	info->BiosConnector[0].DDCType = DDC_CRT2;
 +	info->BiosConnector[0].ddc_line = RADEON_GPIO_CRT2_DDC;
  	info->BiosConnector[0].DACType = DAC_TVDAC;
  	info->BiosConnector[0].TMDSType = TMDS_EXT;
  	info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I;
@@@ -2850,9 -2745,22 +2883,22 @@@
  	info->BiosConnector[1].ConnectorType = CONNECTOR_STV;
  	info->BiosConnector[1].DACType = DAC_TVDAC;
  	info->BiosConnector[1].TMDSType = TMDS_NONE;
 -	info->BiosConnector[1].DDCType = DDC_NONE_DETECTED;
 +	info->BiosConnector[1].ddc_line = 0;
  	info->BiosConnector[1].valid = TRUE;
  	return TRUE;
+     case RADEON_MAC_MINI_INTERNAL:
 -	info->BiosConnector[0].DDCType = DDC_CRT2;
++	info->BiosConnector[0].ddc_line = RADEON_GPIO_CRT2_DDC;
+ 	info->BiosConnector[0].DACType = DAC_TVDAC;
+ 	info->BiosConnector[0].TMDSType = TMDS_INT;
+ 	info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I;
+ 	info->BiosConnector[0].valid = TRUE;
+ 
+ 	info->BiosConnector[1].ConnectorType = CONNECTOR_STV;
+ 	info->BiosConnector[1].DACType = DAC_TVDAC;
+ 	info->BiosConnector[1].TMDSType = TMDS_NONE;
 -	info->BiosConnector[1].DDCType = DDC_NONE_DETECTED;
++	info->BiosConnector[1].ddc_line = 0;
+ 	info->BiosConnector[1].valid = TRUE;
+ 	return TRUE;
      default:
  	return FALSE;
      }
@@@ -2909,96 -2864,19 +2955,104 @@@ static void RADEONSetupGenericConnector
 -    if (info->InternalTVOut) {
  	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
  	info->BiosConnector[2].DACType = DAC_TVDAC;
  	info->BiosConnector[2].TMDSType = TMDS_NONE;
 -	info->BiosConnector[2].DDCType = DDC_NONE_DETECTED;
 +	info->BiosConnector[2].ddc_line = 0;
 +	info->BiosConnector[2].devices = ATOM_DEVICE_TV1_SUPPORT;
  	info->BiosConnector[2].valid = TRUE;
 -    }
 +    } else {
 +	if (info->IsMobility) {
 +	    /* Below is the most common setting, but may not be true */
 +	    if (info->IsIGP) {
 +		info->BiosConnector[0].ddc_line = RADEON_LCD_GPIO_MASK;
 +		info->BiosConnector[0].DACType = DAC_UNKNOWN;
 +		info->BiosConnector[0].TMDSType = TMDS_UNKNOWN;
 +		info->BiosConnector[0].ConnectorType = CONNECTOR_LVDS;
 +		info->BiosConnector[0].valid = TRUE;
 +
 +		/* IGP only has TVDAC */
 +		if (info->ChipFamily == CHIP_FAMILY_RS400)
 +		    info->BiosConnector[1].ddc_line = RADEON_GPIO_CRT2_DDC;
 +		else
 +		    info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
 +		info->BiosConnector[1].DACType = DAC_TVDAC;
 +		info->BiosConnector[1].TMDSType = TMDS_UNKNOWN;
 +		info->BiosConnector[1].ConnectorType = CONNECTOR_VGA;
 +		info->BiosConnector[1].valid = TRUE;
 +	    } else {
 +#if defined(__powerpc__)
 +		info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC;
 +#else
 +		info->BiosConnector[0].ddc_line = RADEON_LCD_GPIO_MASK;
 +#endif
 +		info->BiosConnector[0].DACType = DAC_UNKNOWN;
 +		info->BiosConnector[0].TMDSType = TMDS_UNKNOWN;
 +		info->BiosConnector[0].ConnectorType = CONNECTOR_LVDS;
 +		info->BiosConnector[0].valid = TRUE;
 +
 +		info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
 +		info->BiosConnector[1].DACType = DAC_PRIMARY;
 +		info->BiosConnector[1].TMDSType = TMDS_UNKNOWN;
 +		info->BiosConnector[1].ConnectorType = CONNECTOR_VGA;
 +		info->BiosConnector[1].valid = TRUE;
 +	    }
 +	} else {
 +	    /* Below is the most common setting, but may not be true */
 +	    if (info->IsIGP) {
 +		if (info->ChipFamily == CHIP_FAMILY_RS400)
 +		    info->BiosConnector[0].ddc_line = RADEON_GPIO_CRT2_DDC;
 +		else
 +		    info->BiosConnector[0].ddc_line = RADEON_GPIO_VGA_DDC;
 +		info->BiosConnector[0].DACType = DAC_TVDAC;
 +		info->BiosConnector[0].TMDSType = TMDS_UNKNOWN;
 +		info->BiosConnector[0].ConnectorType = CONNECTOR_VGA;
 +		info->BiosConnector[0].valid = TRUE;
 +
 +		/* not sure what a good default DDCType for DVI on
 +		 * IGP desktop chips is
 +		 */
 +		info->BiosConnector[1].ddc_line = RADEON_GPIO_MONID; /* DDC_DVI? */
 +		info->BiosConnector[1].DACType = DAC_UNKNOWN;
 +		info->BiosConnector[1].TMDSType = TMDS_EXT;
 +		info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_D;
 +		info->BiosConnector[1].valid = TRUE;
 +	    } else {
 +		info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC;
 +		info->BiosConnector[0].DACType = DAC_TVDAC;
 +		info->BiosConnector[0].TMDSType = TMDS_INT;
 +		info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I;
 +		info->BiosConnector[0].valid = TRUE;
  
 -    /* Some cards have the DDC lines swapped and we have no way to
 -     * detect it yet (Mac cards)
 -     */
 -    if (xf86ReturnOptValBool(info->Options, OPTION_REVERSE_DDC, FALSE)) {
 -	info->BiosConnector[0].DDCType = DDC_VGA;
 -	info->BiosConnector[1].DDCType = DDC_DVI;
 -    }
++#if defined(__powerpc__)
++		info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
++		info->BiosConnector[1].DACType = DAC_PRIMARY;
++		info->BiosConnector[1].TMDSType = TMDS_EXT;
++		info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I;
++		info->BiosConnector[1].valid = TRUE;
++#else
 +		info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
 +		info->BiosConnector[1].DACType = DAC_PRIMARY;
 +		info->BiosConnector[1].TMDSType = TMDS_EXT;
 +		info->BiosConnector[1].ConnectorType = CONNECTOR_VGA;
 +		info->BiosConnector[1].valid = TRUE;
++#endif
 +	    }
 +	}
 +
 +	if (info->InternalTVOut) {
 +	    info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
 +	    info->BiosConnector[2].DACType = DAC_TVDAC;
 +	    info->BiosConnector[2].TMDSType = TMDS_NONE;
 +	    info->BiosConnector[2].ddc_line = 0;
 +	    info->BiosConnector[2].valid = TRUE;
 +	}
  
 +	/* Some cards have the DDC lines swapped and we have no way to
 +	 * detect it yet (Mac cards)
 +	 */
 +	if (xf86ReturnOptValBool(info->Options, OPTION_REVERSE_DDC, FALSE)) {
 +	    info->BiosConnector[0].ddc_line = RADEON_GPIO_VGA_DDC;
 +	    info->BiosConnector[1].ddc_line = RADEON_GPIO_DVI_DDC;
 +	}
 +    }
  }
  
  #if defined(__powerpc__)
commit 0175b79987ef4d7b0ce8238c3bdde989e504516a
Author: Alex Deucher <alex at botch2.(none)>
Date:   Fri Nov 30 15:37:42 2007 -0500

    RADEON: rework MacModel option
    
    this brings in some previous research from Michel Dänzer,
    Sjoerd Simons, and myself.  Hopefully, the driver will pick
    the correct MacModel in more cases.  This also changes the
    default connector table for desktop Macs to dual DVI rather
    than DVI+VGA as that seems to be the case more often than not.
    External TMDS chips are handled separately now as well.
    Eventually we should add an option to allow the user to specify
    what external TMDS chip they need, but we don't have enough info
    yet, so we'll rely on OF to init the external chip in most cases
    for now.

diff --git a/man/radeon.man b/man/radeon.man
index 8f7b551..41c7242 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -421,14 +421,22 @@ a powerbook or mini with DVI that does not work properly, try the alternate
 .br
 ibook                \-\- ibooks
 .br
-powerbook-duallink   \-\- Powerbooks with external DVI
+powerbook-external   \-\- Powerbooks with external DVI
 .br
-powerbook            \-\- Powerbooks with integrated DVI
+powerbook-internal   \-\- Powerbooks with integrated DVI
 .br
-mini                 \-\- Mac Mini with external DVI
+powerbook-vga        \-\- Powerbooks with VGA rather than DVI
+.br
+powerbook-duallink   \-\- powerbook-external alias
+.br
+powerbook            \-\- powerbook-internal alias
+.br
+mini-external        \-\- Mac Mini with external DVI
 .br
 mini-internal        \-\- Mac Mini with integrated DVI
 .br
+mini                 \-\- mini-external alias
+.br
 The default value is
 .B undefined.
 .TP
diff --git a/src/radeon.h b/src/radeon.h
index 4180752..f9bf343 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -428,13 +428,19 @@ typedef enum {
        CHIP_ERRATA_PLL_DELAY           = 0x00000004
 } RADEONErrata;
 
+typedef enum {
+    RADEON_SIL_164  = 0x00000001,
+    RADEON_SIL_1178 = 0x00000002
+} RADEONExtTMDSChip;
+
 #if defined(__powerpc__)
 typedef enum {
-       RADEON_MAC_IBOOK             = 0x00000001,
-       RADEON_MAC_POWERBOOK_DL      = 0x00000002,
-       RADEON_MAC_POWERBOOK         = 0x00000004,
-       RADEON_MAC_MINI              = 0x00000008,
-       RADEON_MAC_MINI_INTERNAL     = 0x00000016
+       RADEON_MAC_IBOOK              = 0x00000001,
+       RADEON_MAC_POWERBOOK_EXTERNAL = 0x00000002,
+       RADEON_MAC_POWERBOOK_INTERNAL = 0x00000004,
+       RADEON_MAC_POWERBOOK_VGA      = 0x00000008,
+       RADEON_MAC_MINI_EXTERNAL      = 0x00000016,
+       RADEON_MAC_MINI_INTERNAL      = 0x00000032
 } RADEONMacModel;
 #endif
 
@@ -827,6 +833,7 @@ typedef struct {
 #if defined(__powerpc__)
     RADEONMacModel    MacModel;
 #endif
+    RADEONExtTMDSChip ext_tmds_chip;
 
     Rotation rotation;
     void (*PointerMoved)(int, int, int);
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 1645b5a..efe093f 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -218,22 +218,33 @@ RADEONRestoreDVOChip(ScrnInfoPtr pScrn, xf86OutputPtr output)
 	   (CARD32)~(RADEON_GPIO_A_0 | RADEON_GPIO_A_1));
 
     if (!RADEONInitExtTMDSInfoFromBIOS(output)) {
-	/* do mac stuff here */
-#if defined(__powerpc__)
 	if (radeon_output->DVOChip) {
-	    switch(info->MacModel) {
-	    case RADEON_MAC_POWERBOOK_DL:
+	    switch(info->ext_tmds_chip) {
+	    case RADEON_SIL_164:
 		RADEONDVOWriteByte(radeon_output->DVOChip, 0x08, 0x30);
 		RADEONDVOWriteByte(radeon_output->DVOChip, 0x09, 0x00);
 		RADEONDVOWriteByte(radeon_output->DVOChip, 0x0a, 0x90);
 		RADEONDVOWriteByte(radeon_output->DVOChip, 0x0c, 0x89);
 		RADEONDVOWriteByte(radeon_output->DVOChip, 0x08, 0x3b);
 		break;
+#if 0
+		/* needs work see bug 10418 */
+	    case RADEON_SIL_1178:
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x0f, 0x44);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x0f, 0x4c);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x0e, 0x01);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x0a, 0x80);
+                RADEONDVOWriteByte(radeon_output->DVOChip, 0x09, 0x30);
+                RADEONDVOWriteByte(radeon_output->DVOChip, 0x0c, 0xc9);
+                RADEONDVOWriteByte(radeon_output->DVOChip, 0x0d, 0x70);
+                RADEONDVOWriteByte(radeon_output->DVOChip, 0x08, 0x32);
+                RADEONDVOWriteByte(radeon_output->DVOChip, 0x08, 0x33);
+		break;
+#endif
 	    default:
 		break;
 	    }
 	}
-#endif
     }
 }
 
@@ -2667,7 +2678,7 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[2].DDCType = DDC_NONE_DETECTED;
 	info->BiosConnector[2].valid = TRUE;
 	return TRUE;
-    case RADEON_MAC_POWERBOOK_DL:
+    case RADEON_MAC_POWERBOOK_EXTERNAL:
 	info->BiosConnector[0].DDCType = DDC_DVI;
 	info->BiosConnector[0].DACType = DAC_NONE;
 	info->BiosConnector[0].TMDSType = TMDS_NONE;
@@ -2686,7 +2697,7 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[2].DDCType = DDC_NONE_DETECTED;
 	info->BiosConnector[2].valid = TRUE;
 	return TRUE;
-    case RADEON_MAC_POWERBOOK:
+    case RADEON_MAC_POWERBOOK_INTERNAL:
 	info->BiosConnector[0].DDCType = DDC_DVI;
 	info->BiosConnector[0].DACType = DAC_NONE;
 	info->BiosConnector[0].TMDSType = TMDS_NONE;
@@ -2705,7 +2716,26 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[2].DDCType = DDC_NONE_DETECTED;
 	info->BiosConnector[2].valid = TRUE;
 	return TRUE;
-    case RADEON_MAC_MINI:
+    case RADEON_MAC_POWERBOOK_VGA:
+	info->BiosConnector[0].DDCType = DDC_DVI;
+	info->BiosConnector[0].DACType = DAC_NONE;
+	info->BiosConnector[0].TMDSType = TMDS_NONE;
+	info->BiosConnector[0].ConnectorType = CONNECTOR_CRT;
+	info->BiosConnector[0].valid = TRUE;
+
+	info->BiosConnector[1].DDCType = DDC_VGA;
+	info->BiosConnector[1].DACType = DAC_PRIMARY;
+	info->BiosConnector[1].TMDSType = TMDS_INT;
+	info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I;
+	info->BiosConnector[1].valid = TRUE;
+
+	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
+	info->BiosConnector[2].DACType = DAC_TVDAC;
+	info->BiosConnector[2].TMDSType = TMDS_NONE;
+	info->BiosConnector[2].DDCType = DDC_NONE_DETECTED;
+	info->BiosConnector[2].valid = TRUE;
+	return TRUE;
+    case RADEON_MAC_MINI_EXTERNAL:
 	info->BiosConnector[0].DDCType = DDC_CRT2;
 	info->BiosConnector[0].DACType = DAC_TVDAC;
 	info->BiosConnector[0].TMDSType = TMDS_EXT;
@@ -2815,11 +2845,19 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn)
 	    info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I;
 	    info->BiosConnector[0].valid = TRUE;
 
+#if defined(__powerpc__)
 	    info->BiosConnector[1].DDCType = DDC_VGA;
 	    info->BiosConnector[1].DACType = DAC_PRIMARY;
 	    info->BiosConnector[1].TMDSType = TMDS_EXT;
+	    info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I;
+	    info->BiosConnector[1].valid = TRUE;
+#else
+	    info->BiosConnector[1].DDCType = DDC_VGA;
+	    info->BiosConnector[1].DACType = DAC_PRIMARY;
+	    info->BiosConnector[1].TMDSType = TMDS_NONE;
 	    info->BiosConnector[1].ConnectorType = CONNECTOR_CRT;
 	    info->BiosConnector[1].valid = TRUE;
+#endif
 	}
     }
 
@@ -2848,6 +2886,7 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn)
  * in /proc/cpuinfo (on Linux) */
 static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn)
 {
+    RADEONInfoPtr info = RADEONPTR(pScrn);
     RADEONMacModel ret = 0;
 #ifdef __linux__
     char cpuline[50];  /* 50 should be sufficient for our purposes */
@@ -2858,23 +2897,52 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn)
      * Unforunately, there doesn't seem to be any good way to figure it out.
      */
 
+    /* 
+     * PowerBook5,[1-5]: external tmds, single-link
+     * PowerBook5,[789]: external tmds, dual-link
+     * PowerBook5,6:     external tmds, single-link or dual-link
+     * need to add another option to specify the external tmds chip
+     * or find out what's used and add it.
+     */
+
+
     if (f != NULL) {
 	while (fgets(cpuline, sizeof cpuline, f)) {
 	    if (!strncmp(cpuline, "machine", strlen ("machine"))) {
-		if (strstr(cpuline, "PowerBook5,6") ||
-		    strstr(cpuline, "PowerBook5,7") ||
+		if (strstr(cpuline, "PowerBook5,1") ||
+		    strstr(cpuline, "PowerBook5,2") ||
+		    strstr(cpuline, "PowerBook5,3") ||
+		    strstr(cpuline, "PowerBook5,4") ||
+		    strstr(cpuline, "PowerBook5,5")) {
+		    ret = RADEON_MAC_POWERBOOK_EXTERNAL; /* single link */
+		    info->ext_tmds_chip = RADEON_SIL_164; /* works on 5,2 */
+		    break;
+		}
+
+		if (strstr(cpuline, "PowerBook5,6")) {
+		    ret = RADEON_MAC_POWERBOOK_EXTERNAL; /* dual or single link */
+		    break;
+		}
+
+		if (strstr(cpuline, "PowerBook5,7") ||
 		    strstr(cpuline, "PowerBook5,8") ||
 		    strstr(cpuline, "PowerBook5,9")) {
-		    ret = RADEON_MAC_POWERBOOK_DL;
+		    ret = RADEON_MAC_POWERBOOK_EXTERNAL; /* dual link */
+		    info->ext_tmds_chip = RADEON_SIL_1178; /* guess */
+		    break;
+		}
+
+		if (strstr(cpuline, "PowerBook3,3")) {
+		    ret = RADEON_MAC_POWERBOOK_VGA; /* vga rather than dvi */
 		    break;
 		}
 
 		if (strstr(cpuline, "PowerMac10,1")) {
-		    ret = RADEON_MAC_MINI_INTERNAL;
+		    ret = RADEON_MAC_MINI_INTERNAL; /* internal tmds */
 		    break;
 		}
 		if (strstr(cpuline, "PowerMac10,2")) {
-		    ret = RADEON_MAC_MINI;
+		    ret = RADEON_MAC_MINI_EXTERNAL; /* external tmds */
 		    break;
 		}
 	    } else if (!strncmp(cpuline, "detected as", strlen("detected as"))) {
@@ -2882,7 +2950,7 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn)
                     ret = RADEON_MAC_IBOOK;
 		    break;
 		} else if (strstr(cpuline, "PowerBook")) {
-		    ret = RADEON_MAC_POWERBOOK_DL;
+		    ret = RADEON_MAC_POWERBOOK_INTERNAL; /* internal tmds */
 		    break;
                 }
 
@@ -2901,10 +2969,12 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn)
 
     if (ret) {
 	xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT, "Detected %s.\n",
-		   ret == RADEON_MAC_POWERBOOK_DL ? "PowerBook with external DVI" :
-		   ret == RADEON_MAC_POWERBOOK ? "PowerBook with integrated DVI" :
+		   ret == RADEON_MAC_POWERBOOK_EXTERNAL ? "PowerBook with external DVI" :
+		   ret == RADEON_MAC_POWERBOOK_INTERNAL ? "PowerBook with integrated DVI" :
+		   ret == RADEON_MAC_POWERBOOK_VGA ? "PowerBook with VGA" :
 		   ret == RADEON_MAC_IBOOK ? "iBook" :
-		   "Mac Mini");
+		   ret == RADEON_MAC_MINI_EXTERNAL ? "Mac Mini with external DVI" :
+		   "Mac Mini with integrated DVI");
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 		   "If this is not correct, try Option \"MacModel\" and "
 		   "consider reporting to the\n");
@@ -2951,14 +3021,22 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
     if (optstr) {
 	if (!strncmp("ibook", optstr, strlen("ibook")))
 	    info->MacModel = RADEON_MAC_IBOOK;
-	else if (!strncmp("powerbook-duallink", optstr, strlen("powerbook-duallink")))
-	    info->MacModel = RADEON_MAC_POWERBOOK_DL;
-	else if (!strncmp("powerbook", optstr, strlen("powerbook")))
-	    info->MacModel = RADEON_MAC_POWERBOOK;
+	else if (!strncmp("powerbook-duallink", optstr, strlen("powerbook-duallink"))) /* alias */
+	    info->MacModel = RADEON_MAC_POWERBOOK_EXTERNAL;
+	else if (!strncmp("powerbook-external", optstr, strlen("powerbook-external")))
+	    info->MacModel = RADEON_MAC_POWERBOOK_EXTERNAL;
+	else if (!strncmp("powerbook-internal", optstr, strlen("powerbook-internal")))
+	    info->MacModel = RADEON_MAC_POWERBOOK_INTERNAL;
+	else if (!strncmp("powerbook-vga", optstr, strlen("powerbook-vga")))
+	    info->MacModel = RADEON_MAC_POWERBOOK_VGA;
+	else if (!strncmp("powerbook", optstr, strlen("powerbook"))) /* alias */
+	    info->MacModel = RADEON_MAC_POWERBOOK_INTERNAL;
 	else if (!strncmp("mini-internal", optstr, strlen("mini-internal")))
 	    info->MacModel = RADEON_MAC_MINI_INTERNAL;
-	else if (!strncmp("mini", optstr, strlen("mini")))
-	    info->MacModel = RADEON_MAC_MINI;
+	else if (!strncmp("mini-external", optstr, strlen("mini-external")))
+	    info->MacModel = RADEON_MAC_MINI_EXTERNAL;
+	else if (!strncmp("mini", optstr, strlen("mini"))) /* alias */
+	    info->MacModel = RADEON_MAC_MINI_EXTERNAL;
 	else {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid Mac Model: %s\n", optstr);
 	}
commit 9840a0fd4fc8c980533fcd4a02c55cd0d5634b6d
Author: Alex Deucher <alex at botch2.(none)>
Date:   Thu Nov 29 13:27:37 2007 -0500

    RADEON: add MacModel "mini-internal" for minis with internal TMDS
    
    Some macs (minis and powerbooks) use internal tmds, others use external tmds
    and not just for dual-link TMDS, it shows up with single-link as well.
    Unforunately, there doesn't seem to be any good way to figure it out.

diff --git a/man/radeon.man b/man/radeon.man
index f302ade..8f7b551 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -414,8 +414,10 @@ The default is
 .TP
 .BI "Option \*qMacModel\*q \*q" string \*q
 .br
-Used to specify Mac models for connector tables and quirks.  Only valid
- on PowerPC.
+Used to specify Mac models for connector tables and quirks.  If you have
+a powerbook or mini with DVI that does not work properly, try the alternate
+ options as Apple does not seem to provide a good way of knowing whether
+ they use internal or external TMDS for DVI.  Only valid on PowerPC.
 .br
 ibook                \-\- ibooks
 .br
@@ -423,7 +425,9 @@ powerbook-duallink   \-\- Powerbooks with external DVI
 .br
 powerbook            \-\- Powerbooks with integrated DVI
 .br
-mini                 \-\- Mac Mini
+mini                 \-\- Mac Mini with external DVI
+.br
+mini-internal        \-\- Mac Mini with integrated DVI
 .br
 The default value is
 .B undefined.
diff --git a/src/radeon.h b/src/radeon.h
index 5b91d00..4180752 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -433,7 +433,8 @@ typedef enum {
        RADEON_MAC_IBOOK             = 0x00000001,
        RADEON_MAC_POWERBOOK_DL      = 0x00000002,
        RADEON_MAC_POWERBOOK         = 0x00000004,
-       RADEON_MAC_MINI              = 0x00000008
+       RADEON_MAC_MINI              = 0x00000008,
+       RADEON_MAC_MINI_INTERNAL     = 0x00000016
 } RADEONMacModel;
 #endif
 
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 08c690c..1645b5a 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -2718,6 +2718,19 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[1].DDCType = DDC_NONE_DETECTED;
 	info->BiosConnector[1].valid = TRUE;
 	return TRUE;
+    case RADEON_MAC_MINI_INTERNAL:
+	info->BiosConnector[0].DDCType = DDC_CRT2;
+	info->BiosConnector[0].DACType = DAC_TVDAC;
+	info->BiosConnector[0].TMDSType = TMDS_INT;
+	info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I;
+	info->BiosConnector[0].valid = TRUE;
+
+	info->BiosConnector[1].ConnectorType = CONNECTOR_STV;
+	info->BiosConnector[1].DACType = DAC_TVDAC;
+	info->BiosConnector[1].TMDSType = TMDS_NONE;
+	info->BiosConnector[1].DDCType = DDC_NONE_DETECTED;
+	info->BiosConnector[1].valid = TRUE;
+	return TRUE;
     default:
 	return FALSE;
     }
@@ -2840,6 +2853,11 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn)
     char cpuline[50];  /* 50 should be sufficient for our purposes */
     FILE *f = fopen ("/proc/cpuinfo", "r");
 
+    /* Some macs (minis and powerbooks) use internal tmds, others use external tmds
+     * and not just for dual-link TMDS, it shows up with single-link as well.
+     * Unforunately, there doesn't seem to be any good way to figure it out.
+     */
+
     if (f != NULL) {
 	while (fgets(cpuline, sizeof cpuline, f)) {
 	    if (!strncmp(cpuline, "machine", strlen ("machine"))) {
@@ -2851,8 +2869,11 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn)
 		    break;
 		}
 
-		if (strstr(cpuline, "PowerMac10,1") ||
-		    strstr(cpuline, "PowerMac10,2")) {
+		if (strstr(cpuline, "PowerMac10,1")) {
+		    ret = RADEON_MAC_MINI_INTERNAL;
+		    break;
+		}
+		if (strstr(cpuline, "PowerMac10,2")) {
 		    ret = RADEON_MAC_MINI;
 		    break;
 		}
@@ -2880,8 +2901,8 @@ static RADEONMacModel RADEONDetectMacModel(ScrnInfoPtr pScrn)
 
     if (ret) {
 	xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT, "Detected %s.\n",
-		   ret == RADEON_MAC_POWERBOOK_DL ? "PowerBook with dual link DVI" :
-		   ret == RADEON_MAC_POWERBOOK ? "PowerBook with single link DVI" :
+		   ret == RADEON_MAC_POWERBOOK_DL ? "PowerBook with external DVI" :
+		   ret == RADEON_MAC_POWERBOOK ? "PowerBook with integrated DVI" :
 		   ret == RADEON_MAC_IBOOK ? "iBook" :
 		   "Mac Mini");
 	xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -2934,6 +2955,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
 	    info->MacModel = RADEON_MAC_POWERBOOK_DL;
 	else if (!strncmp("powerbook", optstr, strlen("powerbook")))
 	    info->MacModel = RADEON_MAC_POWERBOOK;
+	else if (!strncmp("mini-internal", optstr, strlen("mini-internal")))
+	    info->MacModel = RADEON_MAC_MINI_INTERNAL;
 	else if (!strncmp("mini", optstr, strlen("mini")))
 	    info->MacModel = RADEON_MAC_MINI;
 	else {
commit 6f080d00e6f4f84d5e0d6b4eff302bf42c230e81
Author: Arkadiusz Miskiewicz <arekm at maven.pl>
Date:   Mon Nov 26 12:43:30 2007 -0500

    RADEON: fix backlight control on some laptops
    
    It seems the bios scratch regs are involved in backlight control
    on some laptops.  This patch fixes the problematic laptops and doesn't
    seem to break the previous bios lid and output control fixes.

diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index de24273..b1d216d 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -769,8 +769,8 @@ RADEONInitBIOSRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save)
     RADEONInfoPtr  info      = RADEONPTR(pScrn);
 
     /* tell the bios not to muck with the hardware on events */
-    save->bios_4_scratch = 0;
-    save->bios_5_scratch = 0xff00;
+    save->bios_4_scratch = 0x4; /* 0x4 needed for backlight */
+    save->bios_5_scratch = (info->SavedReg.bios_5_scratch & 0xff) | 0xff00; /* bits 0-3 keep backlight level */
     save->bios_6_scratch = info->SavedReg.bios_6_scratch | 0x40000000;
 
 }
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index c55b5a5..0465497 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -4041,10 +4041,13 @@ void RADEONRestoreBIOSRegisters(ScrnInfoPtr pScrn, RADEONSavePtr restore)
 {
     RADEONInfoPtr  info       = RADEONPTR(pScrn);
     unsigned char *RADEONMMIO = info->MMIO;
+    CARD32 bios_5_scratch = INREG(RADEON_BIOS_5_SCRATCH);
     CARD32 bios_6_scratch = INREG(RADEON_BIOS_6_SCRATCH);
 
     OUTREG(RADEON_BIOS_4_SCRATCH, restore->bios_4_scratch);
-    OUTREG(RADEON_BIOS_5_SCRATCH, restore->bios_5_scratch);
+    bios_5_scratch &= 0xF;
+    bios_5_scratch |= (restore->bios_5_scratch & ~0xF);
+    OUTREG(RADEON_BIOS_5_SCRATCH, bios_5_scratch);
     if (restore->bios_6_scratch & 0x40000000)
 	bios_6_scratch |= 0x40000000;
     else
commit dcf22aed87366f4625fb5042cb84fecccd9ceece
Author: Alex Deucher <alex at botch2.(none)>
Date:   Mon Nov 26 11:10:03 2007 -0500

    RADEON: only return status unknown for XPRESS chips
    
    this seems to cause more issues than it attempted to fix
    so limit it to XPRESS chips for now.

diff --git a/src/radeon_output.c b/src/radeon_output.c
index 54c27cd..08c690c 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -1672,11 +1672,13 @@ radeon_detect(xf86OutputPtr output)
 	  /* default to unknown for flaky chips/connectors
 	   * so we can get something on the screen
 	   */
-	  if (((radeon_output->type == OUTPUT_VGA || radeon_output->type == OUTPUT_DVI) &&
-	       radeon_output->DACType == DAC_TVDAC)) {
+	  if ((radeon_output->type == OUTPUT_VGA || radeon_output->type == OUTPUT_DVI) &&
+	      (radeon_output->DACType == DAC_TVDAC) &&
+	      (info->ChipFamily == CHIP_FAMILY_RS400)) {
 	      radeon_output->MonType = MT_CRT;
 	      return XF86OutputStatusUnknown;
-	  } else if  (info->IsIGP && radeon_output->type == OUTPUT_DVI) {
+	  } else if  ((info->ChipFamily == CHIP_FAMILY_RS400) &&
+		      radeon_output->type == OUTPUT_DVI) {
 	      radeon_output->MonType = MT_DFP; /* MT_LCD ??? */
 	      return XF86OutputStatusUnknown;
 	  }
commit 206e280f02324641b4fe5a1986e26adf0e021fd4
Author: Alex Deucher <alex at botch2.(none)>
Date:   Mon Nov 26 09:39:27 2007 -0500

    RADEON: fix typo in man page

diff --git a/man/radeon.man b/man/radeon.man
index 5d31eb1..f302ade 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -383,14 +383,14 @@ case.  This is only useful for LVDS panels (laptop internal panels).
 The default is
 .B on.
 .TP
-.BI "Option \*TVDACLoadDetect\*q \*q" boolean \*q
+.BI "Option \*qTVDACLoadDetect\*q \*q" boolean \*q
 Enable load detection on the TV DAC.  The TV DAC is used to drive both 
 TV-OUT and analog monitors. Load detection is often unreliable in the 
 TV DAC so it is disabled by default.
 The default is
 .B off.
 .TP
-.BI "Option \*DefaultTMDSPLL\*q \*q" boolean \*q
+.BI "Option \*qDefaultTMDSPLL\*q \*q" boolean \*q
 Use the default driver provided TMDS PLL values rather than the ones
 provided by the bios. This option has no effect on Mac cards.  Enable 
 this option if you are having problems with a DVI monitor using the 
commit 197a62704742a4a19736c2637ac92d1dc5ab34ed
Author: Adam Jackson <ajackson at redhat.com>
Date:   Thu Nov 22 20:26:23 2007 +1000

    radeon: fix openoffice/render bug on r100 chips

diff --git a/src/radeon_render.c b/src/radeon_render.c
index 5074fe1..490dec1 100644
--- a/src/radeon_render.c
+++ b/src/radeon_render.c
@@ -392,7 +392,7 @@ static Bool FUNC_NAME(R100SetupTexture)(
 #endif
     ACCEL_PREAMBLE();
 
-    if ((width > 2048) || (height > 2048))
+    if ((width > 2047) || (height > 2047))
 	return FALSE;
 
     txformat = RadeonGetTextureFormat(format);
@@ -424,7 +424,7 @@ static Bool FUNC_NAME(R100SetupTexture)(
 	txformat |= ATILog2(width) << RADEON_TXFORMAT_WIDTH_SHIFT;
 	txformat |= ATILog2(height) << RADEON_TXFORMAT_HEIGHT_SHIFT;
     } else {
-	tex_size = ((height - 1) << 16) | (width - 1);
+	tex_size = (height << 16) | width;
 	txformat |= RADEON_TXFORMAT_NON_POWER2;
     }
 
commit 64010fc4eae8359c01e430f64252931242c91435
Author: Dave Airlie <airlied at linux.ie>
Date:   Thu Nov 22 20:25:31 2007 +1000

    Revert "Disable RENDER acceleration by default on some RV200 chips."
    
    This reverts commit 145da701bf4fb9c0ad9f95620b20914ae0126852.
    
    pull in fix from ajax next commit

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index c939a5c..c55b5a5 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1704,9 +1704,7 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn)
 #ifdef RENDER
     info->RenderAccel = xf86ReturnOptValBool(info->Options, OPTION_RENDER_ACCEL,
 					     info->Chipset != PCI_CHIP_RN50_515E &&
-					     info->Chipset != PCI_CHIP_RN50_5969 &&
-					     info->Chipset != PCI_CHIP_RV200_QW &&
-					     info->Chipset != PCI_CHIP_RADEON_LW);
+					     info->Chipset != PCI_CHIP_RN50_5969);
 #endif
 
     return TRUE;
commit 145da701bf4fb9c0ad9f95620b20914ae0126852
Author: Stefan Dirsch <sndirsch at suse.de>
Date:   Thu Nov 22 08:38:09 2007 +0100

    Disable RENDER acceleration by default on some RV200 chips.
    
    Novell Bug #341699: Render acceleration is known to be broken
    on at least "Radeon 7500 QW" and "Radeon Mobility M7 LW".

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index c55b5a5..c939a5c 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1704,7 +1704,9 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn)
 #ifdef RENDER
     info->RenderAccel = xf86ReturnOptValBool(info->Options, OPTION_RENDER_ACCEL,
 					     info->Chipset != PCI_CHIP_RN50_515E &&
-					     info->Chipset != PCI_CHIP_RN50_5969);
+					     info->Chipset != PCI_CHIP_RN50_5969 &&
+					     info->Chipset != PCI_CHIP_RV200_QW &&
+					     info->Chipset != PCI_CHIP_RADEON_LW);
 #endif
 
     return TRUE;
commit e810c3ae9908cd57e95b1b091cded87cbfc12fdc
Author: Roland Scheidegger <sroland at tungstengraphics.com>
Date:   Thu Nov 22 02:37:55 2007 +0100

    really do not set up surface regs for depth buf on r100-class igps (bug #13080)
    
    fix the if condition testing for these chips...

diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 790a3dc..c55b5a5 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -4700,9 +4700,9 @@ void RADEONChangeSurfaces(ScrnInfoPtr pScrn)
 	retvalue = drmCommandWrite(info->drmFD, DRM_RADEON_SURF_FREE,
 	    &drmsurffree, sizeof(drmsurffree));
 
-	if ((info->ChipFamily != CHIP_FAMILY_RV100) || 
-	    (info->ChipFamily != CHIP_FAMILY_RS100) ||
-	    (info->ChipFamily != CHIP_FAMILY_RS200)) {
+	if (!((info->ChipFamily == CHIP_FAMILY_RV100) ||
+	    (info->ChipFamily == CHIP_FAMILY_RS100) ||
+	    (info->ChipFamily == CHIP_FAMILY_RS200))) {
 	    drmsurffree.address = info->depthOffset;
 	    retvalue = drmCommandWrite(info->drmFD, DRM_RADEON_SURF_FREE,
 		&drmsurffree, sizeof(drmsurffree));
@@ -4757,9 +4757,10 @@ void RADEONChangeSurfaces(ScrnInfoPtr pScrn)
 	}
 
 	/* rv100 and probably the derivative igps don't have depth tiling on all the time? */
-	if (info->have3DWindows && ((info->ChipFamily != CHIP_FAMILY_RV100) || 
-	    (info->ChipFamily != CHIP_FAMILY_RS100) ||
-	    (info->ChipFamily != CHIP_FAMILY_RS200))) {
+	if (info->have3DWindows &&
+	    (!((info->ChipFamily == CHIP_FAMILY_RV100) ||
+	    (info->ChipFamily == CHIP_FAMILY_RS100) ||
+	    (info->ChipFamily == CHIP_FAMILY_RS200)))) {
 	    drmRadeonSurfaceAlloc drmsurfalloc;
 	    drmsurfalloc.size = depthBufferSize;
 	    drmsurfalloc.address = info->depthOffset;


More information about the xorg-commit mailing list