/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_pll.c | 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() [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 */
|
/drivers/thermal/qcom/ |
D | tsens-common.c | 57 int num, den; in compute_intercept_slope() local 72 den = CAL_DEGC_PT2 - CAL_DEGC_PT1; in compute_intercept_slope() 73 tmdev->sensor[i].slope = num / den; in compute_intercept_slope() 85 int degc, num, den; in code_to_degc() local 88 den = s->slope; in code_to_degc() 91 degc = num + (den / 2); in code_to_degc() 93 degc = num - (den / 2); in code_to_degc() 97 degc /= den; in code_to_degc()
|
/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 | 135 {.num = 1, .den = 1}, 136 {.num = 1, .den = 3}, 137 {.num = 1, .den = 4}, 138 {.num = 1, .den = 6}, 139 {.num = 1, .den = 20}, 140 {.num = 1, .den = 8}, 141 {.num = 10, .den = 81}, 142 {.num = 1, .den = 10} 416 static int vadc_prescaling_from_dt(u32 num, u32 den) in vadc_prescaling_from_dt() argument 422 vadc_prescale_ratios[pre].den == den) in vadc_prescaling_from_dt()
|
D | qcom-vadc-common.c | 119 voltage = voltage * prescale->den; in qcom_vadc_scale_volt() 162 temp = voltage * prescale->den; in qcom_vadc_scale_die_temp() 184 voltage = voltage * prescale->den; in qcom_vadc_scale_chg_temp()
|
D | qcom-vadc-common.h | 80 u32 den; member
|
/drivers/clk/qcom/ |
D | clk-rcg2.c | 447 int den; member 491 request *= frac->den; in clk_edp_pixel_set_rate() 503 f.n = frac->den; in clk_edp_pixel_set_rate() 541 request *= frac->den; in clk_edp_pixel_determine_rate() 553 frac->num, frac->den, in clk_edp_pixel_determine_rate() 554 !!frac->den, hid_div); in clk_edp_pixel_determine_rate() 716 request = (req->rate * frac->den) / frac->num; in clk_pixel_determine_rate() 724 req->rate = (src_rate * frac->num) / frac->den; in clk_pixel_determine_rate() 754 request = (rate * frac->den) / frac->num; in clk_pixel_set_rate() 766 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() 654 request = (rate * frac->den) / frac->num; in clk_rcg_pixel_set_rate() 661 f.n = frac->den; in clk_rcg_pixel_set_rate()
|
/drivers/media/v4l2-core/ |
D | v4l2-dv-timings.c | 706 u32 den; in v4l2_detect_gtf() local 710 den = (hfreq * (100 - GTF_D_C_PRIME) + GTF_D_M_PRIME * 1000) * in v4l2_detect_gtf() 712 h_blank = div_u64((num + (den >> 1)), den); in v4l2_detect_gtf() 716 u32 den; in v4l2_detect_gtf() local 720 den = (hfreq * (100 - GTF_S_C_PRIME) + GTF_S_M_PRIME * 1000) * in v4l2_detect_gtf() 722 h_blank = div_u64((num + (den >> 1)), den); in v4l2_detect_gtf()
|
/drivers/staging/vc04_services/bcm2835-camera/ |
D | controls.c | 184 rational_value.den = 100; in ctrl_set_rational() 520 gains.r_gain.den = gains.b_gain.den = 1000; in ctrl_set_awb_gains() 1207 fps_range.fps_low.den = 1; in set_framerate_params() 1209 fps_range.fps_high.den = dev->capture.timeperframe.numerator; in set_framerate_params() 1214 fps_range.fps_low.den = fps_range.fps_high.den = in set_framerate_params() 1221 fps_range.fps_low.den, in set_framerate_params() 1223 fps_range.fps_high.den); in set_framerate_params()
|
D | mmal-msg-common.h | 47 s32 den; /**< Denominator */ member
|
D | bcm2835-camera.c | 1070 camera_port->es.video.frame_rate.den = 1; in mmal_setup_components() 1107 preview_port->es.video.frame_rate.den = in mmal_setup_components() 1161 port->es.video.frame_rate.den = in mmal_setup_components() 1399 fps_param.den = 1; in vidioc_s_parm() 1607 format->es->video.frame_rate.den = 1; in mmal_init() 1621 format->es->video.frame_rate.den = 1; in mmal_init() 1639 format->es->video.frame_rate.den = 1; in mmal_init()
|
/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 | 881 static void avivo_reduce_ratio(unsigned *nom, unsigned *den, in avivo_reduce_ratio() argument 887 tmp = gcd(*nom, *den); in avivo_reduce_ratio() 889 *den /= tmp; in avivo_reduce_ratio() 895 *den *= tmp; in avivo_reduce_ratio() 899 if (*den < den_min) { in avivo_reduce_ratio() 900 tmp = DIV_ROUND_UP(den_min, *den); in avivo_reduce_ratio() 902 *den *= tmp; in avivo_reduce_ratio() 920 static void avivo_get_fb_ref_div(unsigned nom, unsigned den, unsigned post_div, in avivo_get_fb_ref_div() argument 928 *ref_div = min(max(den/post_div, 1u), ref_div_max); in avivo_get_fb_ref_div() 929 *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 1096 nom = den = 1; in rivafb_check_var() [all …]
|
/drivers/video/fbdev/aty/ |
D | radeonfb.h | 439 static inline int round_div(int num, int den) in round_div() argument 441 return (num + (den / 2)) / den; in round_div()
|
/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/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/src/ |
D | pipe_binarydesc.c | 191 unsigned den = bds_factors_list[i].denominator; in binarydesc_calculate_bds_factor() local 195 bool cond = (out_w * num / den + delta > in_w) && in binarydesc_calculate_bds_factor() 196 (out_w * num / den <= in_w) && in binarydesc_calculate_bds_factor() 197 (out_h * num / den + delta > in_h) && in binarydesc_calculate_bds_factor() 198 (out_h * num / den <= in_h); in binarydesc_calculate_bds_factor()
|
/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()
|