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

Alex Deucher agd5f at kemper.freedesktop.org
Tue Nov 27 12:28:19 PST 2007


 src/radeon_output.c |   85 +++++++++++++++++++++++++++++-----------------------
 1 file changed, 49 insertions(+), 36 deletions(-)

New commits:
commit 6c56e3d7655b17e93e8823aefe34b05291104695
Author: Alex Deucher <alex at botch2.(none)>
Date:   Tue Nov 27 15:27:36 2007 -0500

    RADEON: switch r4xx to atombios load detection
    
    works great

diff --git a/src/radeon_output.c b/src/radeon_output.c
index 6e0d0d0..d8ded6d 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -678,33 +678,25 @@ void RADEONConnectorFindMonitor(ScrnInfoPtr pScrn, xf86OutputPtr output)
 
     if (radeon_output->MonType == MT_UNKNOWN) {
 	if (IS_AVIVO_VARIANT) {
-	    if (OUTPUT_IS_TV)
-		radeon_output->MonType = MT_NONE;
-	    else {
-		radeon_output->MonType = avivo_display_ddc_connected(pScrn, output);
-		if (!radeon_output->MonType) {
-		    if (radeon_output->type == OUTPUT_LVDS)
-			radeon_output->MonType = MT_LCD;
-		    else
-			radeon_output->MonType = atombios_dac_detect(pScrn, output);
-		}
+	    radeon_output->MonType = avivo_display_ddc_connected(pScrn, output);
+	    if (!radeon_output->MonType) {
+		if (radeon_output->type == OUTPUT_LVDS)
+		    radeon_output->MonType = MT_LCD;
+		else if (OUTPUT_IS_TV)
+		    radeon_output->MonType = MT_NONE;
+		else
+		    radeon_output->MonType = atombios_dac_detect(pScrn, output);
 	    }
 	} else {
-	    if (OUTPUT_IS_TV) {
-		if (info->InternalTVOut) {
-		    if (radeon_output->load_detection)
-			radeon_output->MonType = legacy_dac_detect(pScrn, output);
-		    else
-			radeon_output->MonType = MT_NONE;
-		}
-	    } else {
-		radeon_output->MonType = RADEONDisplayDDCConnected(pScrn, output);
+	    radeon_output->MonType = RADEONDisplayDDCConnected(pScrn, output);
+	    if (!radeon_output->MonType) {
+		if (radeon_output->type == OUTPUT_LVDS || OUTPUT_IS_DVI)
+		    radeon_output->MonType = RADEONPortCheckNonDDC(pScrn, output);
 		if (!radeon_output->MonType) {
-		    if (radeon_output->type == OUTPUT_LVDS || OUTPUT_IS_DVI)
-			radeon_output->MonType = RADEONPortCheckNonDDC(pScrn, output);
-		    if (!radeon_output->MonType) {
+		    if (info->IsAtomBios)
+			radeon_output->MonType = atombios_dac_detect(pScrn, output);
+		    else
 			radeon_output->MonType = legacy_dac_detect(pScrn, output);
-		    }
 		}
 	    }
 	}
commit 7561242e5b79bc2798ca3aace2b79e1a36949488
Author: Alex Deucher <alex at botch2.(none)>
Date:   Tue Nov 27 14:50:36 2007 -0500

    RADEON: re-org load detection for legacy chips

diff --git a/src/radeon_output.c b/src/radeon_output.c
index 16aa1b8..6e0d0d0 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -636,6 +636,38 @@ RADEONCrtIsPhysicallyConnected(ScrnInfoPtr pScrn, int IsCrtDac)
 }
 #endif
 
+static RADEONMonitorType
+legacy_dac_detect(ScrnInfoPtr pScrn, xf86OutputPtr output)
+{
+    RADEONInfoPtr info      = RADEONPTR(pScrn);
+    RADEONOutputPrivatePtr radeon_output = output->driver_private;
+    RADEONMonitorType found = MT_NONE;
+
+    if (OUTPUT_IS_TV) {
+	if (info->InternalTVOut) {
+	    if (radeon_output->load_detection)
+		found = radeon_detect_tv(pScrn);
+	    else
+		found = MT_NONE;
+	}
+    } else {
+	if (radeon_output->DACType == DAC_PRIMARY) {
+	    if (radeon_output->load_detection)
+		found = radeon_detect_primary_dac(pScrn, TRUE);
+	} else if (radeon_output->DACType == DAC_TVDAC) {
+	    if (radeon_output->load_detection) {
+		if (info->ChipFamily == CHIP_FAMILY_R200)
+		    found = radeon_detect_ext_dac(pScrn);
+		else
+		    found = radeon_detect_tv_dac(pScrn, TRUE);
+	    } else
+		found = MT_NONE;
+	}
+    }
+
+    return found;
+}
+
 /* Primary Head (DVI or Laptop Int. panel)*/
 /* A ddc capable display connected on DVI port */
 /* Secondary Head (mostly VGA, can be DVI on some OEM boards)*/
@@ -661,7 +693,7 @@ void RADEONConnectorFindMonitor(ScrnInfoPtr pScrn, xf86OutputPtr output)
 	    if (OUTPUT_IS_TV) {
 		if (info->InternalTVOut) {
 		    if (radeon_output->load_detection)
-			radeon_output->MonType = radeon_detect_tv(pScrn);
+			radeon_output->MonType = legacy_dac_detect(pScrn, output);
 		    else
 			radeon_output->MonType = MT_NONE;
 		}
@@ -671,18 +703,7 @@ void RADEONConnectorFindMonitor(ScrnInfoPtr pScrn, xf86OutputPtr output)
 		    if (radeon_output->type == OUTPUT_LVDS || OUTPUT_IS_DVI)
 			radeon_output->MonType = RADEONPortCheckNonDDC(pScrn, output);
 		    if (!radeon_output->MonType) {
-			if (radeon_output->DACType == DAC_PRIMARY) {
-			    if (radeon_output->load_detection)
-				radeon_output->MonType = radeon_detect_primary_dac(pScrn, TRUE);
-			} else if (radeon_output->DACType == DAC_TVDAC) {
-			    if (radeon_output->load_detection) {
-				if (info->ChipFamily == CHIP_FAMILY_R200)
-				    radeon_output->MonType = radeon_detect_ext_dac(pScrn);
-				else
-				    radeon_output->MonType = radeon_detect_tv_dac(pScrn, TRUE);
-			    } else
-				radeon_output->MonType = MT_NONE;
-			}
+			radeon_output->MonType = legacy_dac_detect(pScrn, output);
 		    }
 		}
 	    }
@@ -1216,7 +1237,7 @@ legacy_mode_set(xf86OutputPtr output, DisplayModePtr mode,
 	    ErrorF("restore FP2\n");
 	    if (info->IsAtomBios)
 		atombios_external_tmds_setup(output, mode);
-	    else 
+	    else
 		RADEONRestoreDVOChip(pScrn, output);
 	    RADEONRestoreFP2Registers(pScrn, &info->ModeReg);
 	}


More information about the xorg-commit mailing list