pll_3.diff (1592B)
1 commit 3b333c55485fef0089ae7398906599d000df195e 2 Author: Christian König <christian.koenig@amd.com> 3 Date: Thu Apr 24 18:39:59 2014 +0200 4 5 drm/radeon: avoid high jitter with small frac divs 6 7 Signed-off-by: Christian König <christian.koenig@amd.com> 8 9 diff --git b/drivers/gpu/drm/radeon/radeon_display.c a/drivers/gpu/drm/radeon/radeon_display.c 10 index 9ff0e2f1be6a..14bd701e316c 100644 11 --- b/drivers/gpu/drm/radeon/radeon_display.c 12 +++ a/drivers/gpu/drm/radeon/radeon_display.c 13 @@ -830,14 +830,14 @@ static void avivo_reduce_ratio(unsigned *nom, unsigned *den, 14 15 /* make sure nominator is large enough */ 16 if (*nom < nom_min) { 17 - tmp = DIV_ROUND_UP(nom_min, *nom); 18 + tmp = (nom_min + *nom - 1) / *nom; 19 *nom *= tmp; 20 *den *= tmp; 21 } 22 23 /* make sure the denominator is large enough */ 24 if (*den < den_min) { 25 - tmp = DIV_ROUND_UP(den_min, *den); 26 + tmp = (den_min + *den - 1) / *den; 27 *nom *= tmp; 28 *den *= tmp; 29 } 30 @@ -997,16 +997,6 @@ void radeon_compute_pll_avivo(struct radeon_pll *pll, 31 /* this also makes sure that the reference divider is large enough */ 32 avivo_reduce_ratio(&fb_div, &ref_div, fb_div_min, ref_div_min); 33 34 - /* avoid high jitter with small fractional dividers */ 35 - if (pll->flags & RADEON_PLL_USE_FRAC_FB_DIV && (fb_div % 10)) { 36 - fb_div_min = max(fb_div_min, (9 - (fb_div % 10)) * 20 + 60); 37 - if (fb_div < fb_div_min) { 38 - unsigned tmp = DIV_ROUND_UP(fb_div_min, fb_div); 39 - fb_div *= tmp; 40 - ref_div *= tmp; 41 - } 42 - } 43 - 44 /* and finally save the result */ 45 if (pll->flags & RADEON_PLL_USE_FRAC_FB_DIV) { 46 *fb_div_p = fb_div / 10;