Lines Matching refs:den
43 static void amdgpu_pll_reduce_ratio(unsigned *nom, unsigned *den, in amdgpu_pll_reduce_ratio() argument
49 tmp = gcd(*nom, *den); in amdgpu_pll_reduce_ratio()
51 *den /= tmp; in amdgpu_pll_reduce_ratio()
57 *den *= tmp; in amdgpu_pll_reduce_ratio()
61 if (*den < den_min) { in amdgpu_pll_reduce_ratio()
62 tmp = DIV_ROUND_UP(den_min, *den); in amdgpu_pll_reduce_ratio()
64 *den *= tmp; in amdgpu_pll_reduce_ratio()
82 static void amdgpu_pll_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div, in amdgpu_pll_get_fb_ref_div() argument
90 *ref_div = min(max(DIV_ROUND_CLOSEST(den, post_div), 1u), ref_div_max); in amdgpu_pll_get_fb_ref_div()
91 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in amdgpu_pll_get_fb_ref_div()
128 unsigned nom, den; in amdgpu_pll_compute() local
186 den = pll->reference_freq; in amdgpu_pll_compute()
189 amdgpu_pll_reduce_ratio(&nom, &den, fb_div_min, post_div_min); in amdgpu_pll_compute()
200 amdgpu_pll_get_fb_ref_div(nom, den, post_div, fb_div_max, in amdgpu_pll_compute()
215 amdgpu_pll_get_fb_ref_div(nom, den, post_div, fb_div_max, ref_div_max, in amdgpu_pll_compute()