Lines Matching refs:fb_div
86 unsigned int *fb_div, unsigned int *ref_div) in amdgpu_pll_get_fb_ref_div() argument
97 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in amdgpu_pll_get_fb_ref_div()
100 if (*fb_div > fb_div_max) { in amdgpu_pll_get_fb_ref_div()
101 *ref_div = DIV_ROUND_CLOSEST(*ref_div * fb_div_max, *fb_div); in amdgpu_pll_get_fb_ref_div()
102 *fb_div = fb_div_max; in amdgpu_pll_get_fb_ref_div()
132 unsigned fb_div_min, fb_div_max, fb_div; in amdgpu_pll_compute() local
209 ref_div_max, &fb_div, &ref_div); in amdgpu_pll_compute()
210 diff = abs(target_clock - (pll->reference_freq * fb_div) / in amdgpu_pll_compute()
224 &fb_div, &ref_div); in amdgpu_pll_compute()
228 amdgpu_pll_reduce_ratio(&fb_div, &ref_div, fb_div_min, ref_div_min); in amdgpu_pll_compute()
231 if (pll->flags & AMDGPU_PLL_USE_FRAC_FB_DIV && (fb_div % 10)) { in amdgpu_pll_compute()
232 fb_div_min = max(fb_div_min, (9 - (fb_div % 10)) * 20 + 60); in amdgpu_pll_compute()
233 if (fb_div < fb_div_min) { in amdgpu_pll_compute()
234 unsigned tmp = DIV_ROUND_UP(fb_div_min, fb_div); in amdgpu_pll_compute()
235 fb_div *= tmp; in amdgpu_pll_compute()
242 *fb_div_p = fb_div / 10; in amdgpu_pll_compute()
243 *frac_fb_div_p = fb_div % 10; in amdgpu_pll_compute()
245 *fb_div_p = fb_div; in amdgpu_pll_compute()