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

Alex Deucher agd5f at kemper.freedesktop.org
Mon Dec 17 17:32:55 PST 2007


 src/radeon.h        |    1 +
 src/radeon_crtc.c   |   12 +++++++++++-
 src/radeon_driver.c |    2 +-
 3 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit d93a0e10b8bc6e3797a3cf6c1e28ca413a7c38e4
Author: Alex Deucher <alex at samba.(none)>
Date:   Mon Dec 17 20:32:45 2007 -0500

    RADEON: post div tweaks for legacy radeon

diff --git a/src/radeon.h b/src/radeon.h
index a5717a0..7d57ca5 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -203,6 +203,7 @@ typedef struct {
 #define RADEON_PLL_USE_BIOS_DIVS   (1 << 0)
 #define RADEON_PLL_NO_ODD_POST_DIV (1 << 1)
 #define RADEON_PLL_USE_REF_DIV     (1 << 2)
+#define RADEON_PLL_LEGACY          (1 << 3)
 
 typedef struct {
     CARD16            reference_freq;
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index 5e9db39..ea12556 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -659,6 +659,16 @@ RADEONComputePLL(RADEONPLLPtr pll,
 	if ((flags & RADEON_PLL_NO_ODD_POST_DIV) && (post_div & 1))
 	    continue;
 
+	/* legacy radeons only have a few post_divs */
+	if (flags & RADEON_PLL_LEGACY) {
+	    if ((post_div == 5) ||
+		(post_div == 7) ||
+		(post_div == 9) ||
+		(post_div == 10) ||
+		(post_div == 11))
+		continue;
+	}
+
 	if (vco < pll->pll_out_min || vco > pll->pll_out_max)
 	    continue;
 
@@ -893,7 +903,7 @@ legacy_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
     Bool           tilingOld   = info->tilingEnabled;
     int i = 0;
     double dot_clock = 0;
-    int pll_flags = 0;
+    int pll_flags = RADEON_PLL_LEGACY;
     Bool update_tv_routing = FALSE;
 
 
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 3eecedb..2002dd3 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1239,7 +1239,7 @@ static void RADEONGetClockInfo(ScrnInfoPtr pScrn)
 	pll->min_post_div = 2;
 	pll->max_post_div = 0x7f;
     } else {
-	pll->min_post_div = 2;
+	pll->min_post_div = 1;
 	pll->max_post_div = 12; //16 on crtc0
     }
     pll->min_ref_div = 2;


More information about the xorg-commit mailing list