summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/radeon.h6
-rw-r--r--src/radeon_crtc.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/src/radeon.h b/src/radeon.h
index 10710a83..adc848d4 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -277,10 +277,12 @@ typedef struct {
#define RADEON_PLL_PREFER_HIGH_POST_DIV (1 << 9)
#define RADEON_PLL_USE_FRAC_FB_DIV (1 << 10)
#define RADEON_PLL_PREFER_CLOSEST_LOWER (1 << 11)
+#define RADEON_PLL_USE_POST_DIV (1 << 12)
typedef struct {
- uint16_t reference_freq;
- uint16_t reference_div;
+ uint32_t reference_freq;
+ uint32_t reference_div;
+ uint32_t post_div;
uint32_t pll_in_min;
uint32_t pll_in_max;
uint32_t pll_out_min;
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index 4e8b490b..fd2c38cf 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -144,6 +144,8 @@ RADEONComputePLL(RADEONPLLPtr pll,
{
uint32_t min_ref_div = pll->min_ref_div;
uint32_t max_ref_div = pll->max_ref_div;
+ uint32_t min_post_div = pll->min_post_div;
+ uint32_t max_post_div = pll->max_post_div;
uint32_t min_fractional_feed_div = 0;
uint32_t max_fractional_feed_div = 0;
uint32_t best_vco = pll->best_vco;
@@ -174,12 +176,15 @@ RADEONComputePLL(RADEONPLLPtr pll,
}
}
+ if (flags & RADEON_PLL_USE_POST_DIV)
+ min_post_div = max_post_div = pll->post_div;
+
if (flags & RADEON_PLL_USE_FRAC_FB_DIV) {
min_fractional_feed_div = pll->min_frac_feedback_div;
max_fractional_feed_div = pll->max_frac_feedback_div;
}
- for (post_div = pll->min_post_div; post_div <= pll->max_post_div; ++post_div) {
+ for (post_div = min_post_div; post_div <= max_post_div; ++post_div) {
uint32_t ref_div;
if ((flags & RADEON_PLL_NO_ODD_POST_DIV) && (post_div & 1))