Lines Matching refs:post_div
925 static void avivo_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div, in avivo_get_fb_ref_div() argument
930 ref_div_max = max(min(100 / post_div, ref_div_max), 1u); in avivo_get_fb_ref_div()
933 *ref_div = min(max(den/post_div, 1u), ref_div_max); in avivo_get_fb_ref_div()
934 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in avivo_get_fb_ref_div()
969 unsigned post_div_min, post_div_max, post_div; in radeon_compute_pll_avivo() local
1000 post_div_min = pll->post_div; in radeon_compute_pll_avivo()
1001 post_div_max = pll->post_div; in radeon_compute_pll_avivo()
1045 for (post_div = post_div_min; post_div <= post_div_max; ++post_div) { in radeon_compute_pll_avivo()
1047 avivo_get_fb_ref_div(nom, den, post_div, fb_div_max, in radeon_compute_pll_avivo()
1050 (ref_div * post_div)); in radeon_compute_pll_avivo()
1055 post_div_best = post_div; in radeon_compute_pll_avivo()
1059 post_div = post_div_best; in radeon_compute_pll_avivo()
1062 avivo_get_fb_ref_div(nom, den, post_div, fb_div_max, ref_div_max, in radeon_compute_pll_avivo()
1090 (ref_div * post_div * 10); in radeon_compute_pll_avivo()
1092 *post_div_p = post_div; in radeon_compute_pll_avivo()
1096 ref_div, post_div); in radeon_compute_pll_avivo()
1130 uint32_t post_div; in radeon_compute_pll_legacy() local
1163 min_post_div = max_post_div = pll->post_div; in radeon_compute_pll_legacy()
1170 for (post_div = max_post_div; post_div >= min_post_div; --post_div) { in radeon_compute_pll_legacy()
1173 if ((pll->flags & RADEON_PLL_NO_ODD_POST_DIV) && (post_div & 1)) in radeon_compute_pll_legacy()
1178 if ((post_div == 5) || in radeon_compute_pll_legacy()
1179 (post_div == 7) || in radeon_compute_pll_legacy()
1180 (post_div == 9) || in radeon_compute_pll_legacy()
1181 (post_div == 10) || in radeon_compute_pll_legacy()
1182 (post_div == 11) || in radeon_compute_pll_legacy()
1183 (post_div == 13) || in radeon_compute_pll_legacy()
1184 (post_div == 14) || in radeon_compute_pll_legacy()
1185 (post_div == 15)) in radeon_compute_pll_legacy()
1222 current_freq = radeon_div(tmp, ref_div * post_div); in radeon_compute_pll_legacy()
1237 best_post_div = post_div; in radeon_compute_pll_legacy()
1246 best_post_div = post_div; in radeon_compute_pll_legacy()
1257 ((pll->flags & RADEON_PLL_PREFER_LOW_POST_DIV) && (post_div < best_post_div)) || in radeon_compute_pll_legacy()
1258 ((pll->flags & RADEON_PLL_PREFER_HIGH_POST_DIV) && (post_div > best_post_div))) { in radeon_compute_pll_legacy()
1259 best_post_div = post_div; in radeon_compute_pll_legacy()