/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_pll.c | 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() [all …]
|
/drivers/clk/mmp/ |
D | clk-frac.c | 36 rate = (((*prate / 10000) * factor->ftbl[i].den) / in clk_factor_round_rate() 56 unsigned int val, num, den; in clk_factor_recalc_rate() local 64 den = (val >> masks->den_shift) & masks->den_mask; in clk_factor_recalc_rate() 66 if (!den) in clk_factor_recalc_rate() 69 return (((parent_rate / 10000) * den) / in clk_factor_recalc_rate() 86 rate = (((prate / 10000) * factor->ftbl[i].den) / in clk_factor_set_rate() 103 val |= (factor->ftbl[i].den & masks->den_mask) << masks->den_shift; in clk_factor_set_rate() 117 u32 val, num, den; in clk_factor_init() local 130 den = (val >> masks->den_shift) & masks->den_mask; in clk_factor_init() 133 if (den == factor->ftbl[i].den && num == factor->ftbl[i].num) in clk_factor_init() [all …]
|
D | clk-of-pxa1928.c | 65 {.num = 832, .den = 234}, /*58.5MHZ */ 66 {.num = 1, .den = 1}, /*26MHZ */
|
D | clk-of-mmp2.c | 102 {.num = 8125, .den = 1536}, /*14.745MHZ */ 103 {.num = 3521, .den = 689}, /*19.23MHZ */
|
D | clk-mmp2.c | 67 {.num = 8125, .den = 1536}, /*14.745MHZ */ 68 {.num = 3521, .den = 689}, /*19.23MHZ */
|
D | clk.h | 22 unsigned int den; member
|
/drivers/clk/spear/ |
D | clk-aux-synth.c | 69 unsigned int num = 1, den = 1, val, eqn; in clk_aux_recalc_rate() local 82 den = 2; in clk_aux_recalc_rate() 89 den *= (val >> aux->masks->yscale_sel_shift) & in clk_aux_recalc_rate() 92 if (!den) in clk_aux_recalc_rate() 95 return (((parent_rate / 10000) * num) / den) * 10000; in clk_aux_recalc_rate()
|
D | clk-vco-pll.c | 197 unsigned int num = 2, den = 0, val, mode = 0; in clk_vco_recalc_rate() local 209 den = (val >> PLL_DIV_N_SHIFT) & PLL_DIV_N_MASK; in clk_vco_recalc_rate() 218 den *= 256; in clk_vco_recalc_rate() 221 if (!den) { in clk_vco_recalc_rate() 226 return (((parent_rate / 10000) * num) / den) * 10000; in clk_vco_recalc_rate()
|
/drivers/media/i2c/m5mols/ |
D | m5mols_capture.c | 43 u32 num, den; in m5mols_read_rational() local 47 ret = m5mols_read_u32(sd, addr_den, &den); in m5mols_read_rational() 50 *val = den == 0 ? 0 : num / den; in m5mols_read_rational()
|
/drivers/iio/adc/ |
D | qcom-spmi-vadc.c | 138 u32 den; member 190 {.num = 1, .den = 1}, 191 {.num = 1, .den = 3}, 192 {.num = 1, .den = 4}, 193 {.num = 1, .den = 6}, 194 {.num = 1, .den = 20}, 195 {.num = 1, .den = 8}, 196 {.num = 10, .den = 81}, 197 {.num = 1, .den = 10} 489 voltage = voltage * prescale->den; in vadc_calibrate() [all …]
|
/drivers/clk/qcom/ |
D | clk-rcg2.c | 389 int den; member 433 request *= frac->den; in clk_edp_pixel_set_rate() 445 f.n = frac->den; in clk_edp_pixel_set_rate() 483 request *= frac->den; in clk_edp_pixel_determine_rate() 495 frac->num, frac->den, in clk_edp_pixel_determine_rate() 496 !!frac->den, hid_div); in clk_edp_pixel_determine_rate() 658 request = (req->rate * frac->den) / frac->num; in clk_pixel_determine_rate() 666 req->rate = (src_rate * frac->num) / frac->den; in clk_pixel_determine_rate() 696 request = (rate * frac->den) / frac->num; in clk_pixel_set_rate() 708 f.n = frac->den; in clk_pixel_set_rate()
|
D | clk-rcg.c | 591 int den; member 609 request = (req->rate * frac->den) / frac->num; in clk_rcg_pixel_determine_rate() 618 req->rate = (src_rate * frac->num) / frac->den; in clk_rcg_pixel_determine_rate() 652 request = (rate * frac->den) / frac->num; in clk_rcg_pixel_set_rate() 659 f.n = frac->den; in clk_rcg_pixel_set_rate()
|
/drivers/media/v4l2-core/ |
D | v4l2-dv-timings.c | 635 u32 den; in v4l2_detect_gtf() local 639 den = (hfreq * (100 - GTF_D_C_PRIME) + GTF_D_M_PRIME * 1000) * in v4l2_detect_gtf() 641 h_blank = div_u64((num + (den >> 1)), den); in v4l2_detect_gtf() 645 u32 den; in v4l2_detect_gtf() local 649 den = (hfreq * (100 - GTF_S_C_PRIME) + GTF_S_M_PRIME * 1000) * in v4l2_detect_gtf() 651 h_blank = div_u64((num + (den >> 1)), den); in v4l2_detect_gtf()
|
/drivers/video/fbdev/core/ |
D | fbcvt.c | 76 u32 den; in fb_cvt_hperiod() local 80 den = 2 * (cvt->yres/cvt->interlace + 2 * cvt->v_margin); in fb_cvt_hperiod() 83 den = 2 * (cvt->yres/cvt->interlace + cvt->v_margin * 2 in fb_cvt_hperiod() 87 return 2 * (num/den); in fb_cvt_hperiod()
|
/drivers/gpu/drm/radeon/ |
D | radeon_display.c | 915 static void avivo_reduce_ratio(unsigned *nom, unsigned *den, in avivo_reduce_ratio() argument 921 tmp = gcd(*nom, *den); in avivo_reduce_ratio() 923 *den /= tmp; in avivo_reduce_ratio() 929 *den *= tmp; in avivo_reduce_ratio() 933 if (*den < den_min) { in avivo_reduce_ratio() 934 tmp = DIV_ROUND_UP(den_min, *den); in avivo_reduce_ratio() 936 *den *= tmp; in avivo_reduce_ratio() 954 static void avivo_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div, in avivo_get_fb_ref_div() argument 962 *ref_div = min(max(DIV_ROUND_CLOSEST(den, post_div), 1u), ref_div_max); in avivo_get_fb_ref_div() 963 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in avivo_get_fb_ref_div() [all …]
|
/drivers/video/fbdev/riva/ |
D | fbdev.c | 866 int nom, int den) in rivafb_do_maximize() argument 886 if (modes[i].xres * nom / den * modes[i].yres < in rivafb_do_maximize() 903 var->xres_virtual = (info->fix.smem_len * den / in rivafb_do_maximize() 909 var->yres_virtual = info->fix.smem_len * den / in rivafb_do_maximize() 915 if (var->xres_virtual * nom / den * var->yres_virtual > info->fix.smem_len) { in rivafb_do_maximize() 924 if (var->xres_virtual * nom / den >= 8192) { in rivafb_do_maximize() 927 var->xres_virtual, 8192 * den / nom - 16); in rivafb_do_maximize() 928 var->xres_virtual = 8192 * den / nom - 16; in rivafb_do_maximize() 1087 int nom, den; /* translating from pixels->bytes */ in rivafb_check_var() local 1099 nom = den = 1; in rivafb_check_var() [all …]
|
/drivers/video/fbdev/aty/ |
D | radeonfb.h | 438 static inline int round_div(int num, int den) in round_div() argument 440 return (num + (den / 2)) / den; in round_div()
|
D | radeon_base.c | 844 int nom, den; in radeonfb_check_var() local 872 nom = den = 1; in radeonfb_check_var() 879 den = 1; in radeonfb_check_var() 888 den = 1; in radeonfb_check_var() 899 den = 1; in radeonfb_check_var() 908 den = 1; in radeonfb_check_var() 939 if (((v.xres_virtual * v.yres_virtual * nom) / den) > rinfo->mapped_vram) in radeonfb_check_var()
|
/drivers/video/fbdev/matrox/ |
D | matroxfb_maven.c | 200 unsigned int den; member 215 .den = 50 220 .den = 60 230 unsigned int fmin = pll->vco_freq_min / ctl->den; in matroxfb_PLL_mavenclock() 240 fmax = pll->vco_freq_max / ctl->den; in matroxfb_PLL_mavenclock() 294 return fxtal * (*feed) / (*in) * ctl->den; in matroxfb_PLL_mavenclock()
|
/drivers/media/platform/soc_camera/ |
D | mx2_camera.c | 1011 unsigned int num, den; in mx2_emmaprp_resize() local 1037 den = out / m; in mx2_emmaprp_resize() 1041 if ((num >= 2 * den) && (den == 1) && in mx2_emmaprp_resize() 1074 int in_pos_inc = 2 * den; in mx2_emmaprp_resize() 1077 int init_carry = num - den; in mx2_emmaprp_resize() 1081 v = den + in_pos_inc; in mx2_emmaprp_resize()
|
D | mx3_camera.c | 743 unsigned int num, den; in configure_geometry() local 744 int ret = soc_mbus_samples_per_pixel(fmt, &num, &den); in configure_geometry() 746 width = width * num / den; in configure_geometry()
|
/drivers/video/fbdev/ |
D | cirrusfb.c | 408 static void bestclock(long freq, int *nom, int *den, int *div); 669 int nom, den, div; in cirrusfb_set_par_foo() local 845 bestclock(freq, &nom, &den, &div); in cirrusfb_set_par_foo() 848 freq, nom, den, div); in cirrusfb_set_par_foo() 885 tmp = den << 1; in cirrusfb_set_par_foo() 2739 static void bestclock(long freq, int *nom, int *den, int *div) in bestclock() argument 2745 assert(den != NULL); in bestclock() 2749 *den = 0; in bestclock() 2773 *den = temp; in bestclock() 2788 *den = d; in bestclock()
|
/drivers/dma/sh/ |
D | sudmac.c | 94 u32 den = sudmac_readl(sc, SUDMAC_CH0DEN + sc->offset); in sudmac_is_busy() local 96 if (den) in sudmac_is_busy()
|
/drivers/net/wireless/b43/ |
D | phy_ht.c | 729 s32 num, den, pwr; in b43_phy_ht_tx_power_ctl_setup() local 734 den = 32768 + a1[c] * i; in b43_phy_ht_tx_power_ctl_setup() 735 pwr = max((4 * num + den / 2) / den, -8); in b43_phy_ht_tx_power_ctl_setup()
|
/drivers/media/platform/exynos4-is/ |
D | fimc-is-param.h | 818 u32 den; member 823 s32 den; member
|