Lines Matching refs:den
44 static void amdgpu_pll_reduce_ratio(unsigned *nom, unsigned *den, in amdgpu_pll_reduce_ratio() argument
50 tmp = gcd(*nom, *den); in amdgpu_pll_reduce_ratio()
52 *den /= tmp; in amdgpu_pll_reduce_ratio()
58 *den *= tmp; in amdgpu_pll_reduce_ratio()
62 if (*den < den_min) { in amdgpu_pll_reduce_ratio()
63 tmp = DIV_ROUND_UP(den_min, *den); in amdgpu_pll_reduce_ratio()
65 *den *= tmp; in amdgpu_pll_reduce_ratio()
83 static void amdgpu_pll_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div, in amdgpu_pll_get_fb_ref_div() argument
91 *ref_div = min(max(DIV_ROUND_CLOSEST(den, post_div), 1u), ref_div_max); in amdgpu_pll_get_fb_ref_div()
92 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in amdgpu_pll_get_fb_ref_div()
129 unsigned nom, den; in amdgpu_pll_compute() local
187 den = pll->reference_freq; in amdgpu_pll_compute()
190 amdgpu_pll_reduce_ratio(&nom, &den, fb_div_min, post_div_min); in amdgpu_pll_compute()
201 amdgpu_pll_get_fb_ref_div(nom, den, post_div, fb_div_max, in amdgpu_pll_compute()
216 amdgpu_pll_get_fb_ref_div(nom, den, post_div, fb_div_max, ref_div_max, in amdgpu_pll_compute()