Home
last modified time | relevance | path

Searched refs:ratio (Results 1 – 25 of 90) sorted by relevance

1234

/drivers/gpu/drm/amd/display/dc/dce/
Ddce_scl_filters.c1341 const uint16_t *get_filter_3tap_16p(struct fixed31_32 ratio) in get_filter_3tap_16p() argument
1343 if (ratio.value < dc_fixpt_one.value) in get_filter_3tap_16p()
1345 else if (ratio.value < dc_fixpt_from_fraction(4, 3).value) in get_filter_3tap_16p()
1347 else if (ratio.value < dc_fixpt_from_fraction(5, 3).value) in get_filter_3tap_16p()
1353 const uint16_t *get_filter_3tap_64p(struct fixed31_32 ratio) in get_filter_3tap_64p() argument
1355 if (ratio.value < dc_fixpt_one.value) in get_filter_3tap_64p()
1357 else if (ratio.value < dc_fixpt_from_fraction(4, 3).value) in get_filter_3tap_64p()
1359 else if (ratio.value < dc_fixpt_from_fraction(5, 3).value) in get_filter_3tap_64p()
1365 const uint16_t *get_filter_4tap_16p(struct fixed31_32 ratio) in get_filter_4tap_16p() argument
1367 if (ratio.value < dc_fixpt_one.value) in get_filter_4tap_16p()
[all …]
/drivers/gpu/drm/amd/display/dc/dcn20/
Ddcn20_dwb_scl.c530 const uint16_t *wbscl_get_filter_3tap_16p(struct fixed31_32 ratio) in wbscl_get_filter_3tap_16p() argument
532 if (ratio.value < dc_fixpt_one.value) in wbscl_get_filter_3tap_16p()
534 else if (ratio.value < dc_fixpt_from_fraction(4, 3).value) in wbscl_get_filter_3tap_16p()
536 else if (ratio.value < dc_fixpt_from_fraction(5, 3).value) in wbscl_get_filter_3tap_16p()
542 const uint16_t *wbscl_get_filter_4tap_16p(struct fixed31_32 ratio) in wbscl_get_filter_4tap_16p() argument
544 if (ratio.value < dc_fixpt_one.value) in wbscl_get_filter_4tap_16p()
546 else if (ratio.value < dc_fixpt_from_fraction(4, 3).value) in wbscl_get_filter_4tap_16p()
548 else if (ratio.value < dc_fixpt_from_fraction(5, 3).value) in wbscl_get_filter_4tap_16p()
554 static const uint16_t *wbscl_get_filter_5tap_16p(struct fixed31_32 ratio) in wbscl_get_filter_5tap_16p() argument
556 if (ratio.value < dc_fixpt_one.value) in wbscl_get_filter_5tap_16p()
[all …]
/drivers/thermal/intel/
Dintel_powerclamp.c262 static unsigned int get_compensation(int ratio) in get_compensation() argument
270 if (ratio == 1 && in get_compensation()
271 cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
272 cal_data[ratio + 1].confidence >= CONFIDENCE_OK && in get_compensation()
273 cal_data[ratio + 2].confidence >= CONFIDENCE_OK) { in get_compensation()
274 comp = (cal_data[ratio].steady_comp + in get_compensation()
275 cal_data[ratio + 1].steady_comp + in get_compensation()
276 cal_data[ratio + 2].steady_comp) / 3; in get_compensation()
277 } else if (ratio == MAX_TARGET_RATIO - 1 && in get_compensation()
278 cal_data[ratio].confidence >= CONFIDENCE_OK && in get_compensation()
[all …]
/drivers/gpu/drm/i915/display/
Dintel_cdclk.c1183 { .refclk = 19200, .cdclk = 144000, .divider = 8, .ratio = 60 },
1184 { .refclk = 19200, .cdclk = 288000, .divider = 4, .ratio = 60 },
1185 { .refclk = 19200, .cdclk = 384000, .divider = 3, .ratio = 60 },
1186 { .refclk = 19200, .cdclk = 576000, .divider = 2, .ratio = 60 },
1187 { .refclk = 19200, .cdclk = 624000, .divider = 2, .ratio = 65 },
1192 { .refclk = 19200, .cdclk = 79200, .divider = 8, .ratio = 33 },
1193 { .refclk = 19200, .cdclk = 158400, .divider = 4, .ratio = 33 },
1194 { .refclk = 19200, .cdclk = 316800, .divider = 2, .ratio = 33 },
1199 { .refclk = 19200, .cdclk = 172800, .divider = 2, .ratio = 18 },
1200 { .refclk = 19200, .cdclk = 192000, .divider = 2, .ratio = 20 },
[all …]
/drivers/media/dvb-frontends/
Dves1x93.c165 u32 ratio; in ves1x93_set_symbolrate() local
184 ratio = tmp / FIN; in ves1x93_set_symbolrate()
187 ratio = (ratio << 8) + tmp / FIN; in ves1x93_set_symbolrate()
190 ratio = (ratio << 8) + tmp / FIN; in ves1x93_set_symbolrate()
194 if (ratio < MUL/3) FNR = 0; in ves1x93_set_symbolrate()
195 if (ratio < (MUL*11)/50) FNR = 1; in ves1x93_set_symbolrate()
196 if (ratio < MUL/6) FNR = 2; in ves1x93_set_symbolrate()
197 if (ratio < MUL/9) FNR = 3; in ves1x93_set_symbolrate()
198 if (ratio < MUL/12) FNR = 4; in ves1x93_set_symbolrate()
199 if (ratio < (MUL*11)/200) FNR = 5; in ves1x93_set_symbolrate()
[all …]
Dz0194a.h13 u32 srate, u32 ratio) in sharp_z0194a_set_symbol_rate() argument
33 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); in sharp_z0194a_set_symbol_rate()
34 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); in sharp_z0194a_set_symbol_rate()
35 stv0299_writereg(fe, 0x21, (ratio) & 0xf0); in sharp_z0194a_set_symbol_rate()
Dtda8083.c124 u32 ratio; in tda8083_set_symbolrate() local
140 ratio = tmp / srate; in tda8083_set_symbolrate()
143 ratio = (ratio << 8) + tmp / srate; in tda8083_set_symbolrate()
146 ratio = (ratio << 8) + tmp / srate; in tda8083_set_symbolrate()
148 dprintk("tda8083: ratio == %08x\n", (unsigned int) ratio); in tda8083_set_symbolrate()
151 tda8083_writereg (state, 0x02, (ratio >> 16) & 0xff); in tda8083_set_symbolrate()
152 tda8083_writereg (state, 0x03, (ratio >> 8) & 0xff); in tda8083_set_symbolrate()
153 tda8083_writereg (state, 0x04, (ratio ) & 0xff); in tda8083_set_symbolrate()
Dcx24110.c230 u32 ratio; in cx24110_set_symbolrate() local
276 ratio=(tmp/BDRI); in cx24110_set_symbolrate()
279 ratio=(ratio<<8)+(tmp/BDRI); in cx24110_set_symbolrate()
282 ratio=(ratio<<8)+(tmp/BDRI); in cx24110_set_symbolrate()
285 ratio=(ratio<<1)+(tmp/BDRI); in cx24110_set_symbolrate()
289 dprintk("ratio= %08x\n", ratio); in cx24110_set_symbolrate()
291 cx24110_writereg(state, 0x1, (ratio>>16)&0xff); in cx24110_set_symbolrate()
292 cx24110_writereg(state, 0x2, (ratio>>8)&0xff); in cx24110_set_symbolrate()
293 cx24110_writereg(state, 0x3, (ratio)&0xff); in cx24110_set_symbolrate()
Dbsbe1.h34 static int alps_bsbe1_set_symbol_rate(struct dvb_frontend* fe, u32 srate, u32 ratio) in alps_bsbe1_set_symbol_rate() argument
48 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); in alps_bsbe1_set_symbol_rate()
49 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); in alps_bsbe1_set_symbol_rate()
50 stv0299_writereg(fe, 0x21, (ratio ) & 0xf0); in alps_bsbe1_set_symbol_rate()
Dbsru6.h53 static int alps_bsru6_set_symbol_rate(struct dvb_frontend *fe, u32 srate, u32 ratio) in alps_bsru6_set_symbol_rate() argument
80 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); in alps_bsru6_set_symbol_rate()
81 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); in alps_bsru6_set_symbol_rate()
82 stv0299_writereg(fe, 0x21, ratio & 0xf0); in alps_bsru6_set_symbol_rate()
Dves1820.c108 u32 ratio; in ves1820_set_symbolrate() local
153 ratio = (symbolrate << 4) / fin; in ves1820_set_symbolrate()
155 ratio = (ratio << 8) + tmp / fin; in ves1820_set_symbolrate()
157 ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, fin); in ves1820_set_symbolrate()
159 BDR = ratio; in ves1820_set_symbolrate()
Dtda10021.c142 u32 tmp, ratio; in tda10021_set_symbolrate() local
172 ratio = (symbolrate << 4) / FIN; in tda10021_set_symbolrate()
174 ratio = (ratio << 8) + tmp / FIN; in tda10021_set_symbolrate()
176 ratio = (ratio << 8) + DIV_ROUND_CLOSEST(tmp, FIN); in tda10021_set_symbolrate()
178 BDR = ratio; in tda10021_set_symbolrate()
/drivers/media/platform/omap3isp/
Dispresizer.c310 const struct resizer_ratio *ratio) in resizer_set_ratio() argument
318 rgval |= ((ratio->horz - 1) << ISPRSZ_CNT_HRSZ_SHIFT) in resizer_set_ratio()
320 rgval |= ((ratio->vert - 1) << ISPRSZ_CNT_VRSZ_SHIFT) in resizer_set_ratio()
325 if (ratio->horz > MID_RESIZE_VALUE) in resizer_set_ratio()
331 if (ratio->vert > MID_RESIZE_VALUE) in resizer_set_ratio()
783 struct resizer_ratio *ratio) in resizer_calc_ratios() argument
808 ratio->vert = ((input->height - 4) * 256 + 255 - 16 - 32 * spv) in resizer_calc_ratios()
810 if (ratio->vert > MID_RESIZE_VALUE) in resizer_calc_ratios()
811 ratio->vert = ((input->height - 7) * 256 + 255 - 32 - 64 * spv) in resizer_calc_ratios()
813 ratio->vert = clamp_t(unsigned int, ratio->vert, in resizer_calc_ratios()
[all …]
/drivers/gpu/drm/amd/display/dc/inc/hw/
Dtransform.h266 const uint16_t *get_filter_3tap_16p(struct fixed31_32 ratio);
267 const uint16_t *get_filter_3tap_64p(struct fixed31_32 ratio);
268 const uint16_t *get_filter_4tap_16p(struct fixed31_32 ratio);
269 const uint16_t *get_filter_4tap_64p(struct fixed31_32 ratio);
270 const uint16_t *get_filter_5tap_64p(struct fixed31_32 ratio);
271 const uint16_t *get_filter_6tap_64p(struct fixed31_32 ratio);
272 const uint16_t *get_filter_7tap_64p(struct fixed31_32 ratio);
273 const uint16_t *get_filter_8tap_64p(struct fixed31_32 ratio);
/drivers/clk/
Dclk-cs2000-cp.c194 u64 ratio; in cs2000_rate_to_ratio() local
202 ratio = (u64)rate_out << 20; in cs2000_rate_to_ratio()
203 do_div(ratio, rate_in); in cs2000_rate_to_ratio()
205 return ratio; in cs2000_rate_to_ratio()
208 static unsigned long cs2000_ratio_to_rate(u32 ratio, u32 rate_in) in cs2000_ratio_to_rate() argument
219 rate_out = (u64)ratio * rate_in; in cs2000_ratio_to_rate()
293 u32 ratio; in cs2000_recalc_rate() local
295 ratio = cs2000_ratio_get(priv, ch); in cs2000_recalc_rate()
297 return cs2000_ratio_to_rate(ratio, parent_rate); in cs2000_recalc_rate()
303 u32 ratio; in cs2000_round_rate() local
[all …]
/drivers/media/platform/vsp1/
Dvsp1_uds.c54 static unsigned int uds_output_size(unsigned int input, unsigned int ratio) in uds_output_size() argument
56 if (ratio > 4096) { in uds_output_size()
60 mp = ratio / 4096; in uds_output_size()
63 return (input - 1) / mp * mp * 4096 / ratio + 1; in uds_output_size()
66 return (input - 1) * 4096 / ratio + 1; in uds_output_size()
87 static unsigned int uds_passband_width(unsigned int ratio) in uds_passband_width() argument
89 if (ratio >= 4096) { in uds_passband_width()
93 mp = ratio / 4096; in uds_passband_width()
96 return 64 * 4096 * mp / ratio; in uds_passband_width()
/drivers/media/v4l2-core/
Dv4l2-dv-timings.c380 struct v4l2_fract ratio = { 1, 1 }; in v4l2_dv_timings_aspect_ratio() local
384 return ratio; in v4l2_dv_timings_aspect_ratio()
386 return ratio; in v4l2_dv_timings_aspect_ratio()
388 ratio.numerator = t->bt.width * t->bt.picture_aspect.denominator; in v4l2_dv_timings_aspect_ratio()
389 ratio.denominator = t->bt.height * t->bt.picture_aspect.numerator; in v4l2_dv_timings_aspect_ratio()
391 rational_best_approximation(ratio.numerator, ratio.denominator, in v4l2_dv_timings_aspect_ratio()
392 ratio.numerator, ratio.denominator, &n, &d); in v4l2_dv_timings_aspect_ratio()
393 ratio.numerator = n; in v4l2_dv_timings_aspect_ratio()
394 ratio.denominator = d; in v4l2_dv_timings_aspect_ratio()
395 return ratio; in v4l2_dv_timings_aspect_ratio()
[all …]
/drivers/media/pci/mantis/
Dmantis_vp1033.c107 u32 srate, u32 ratio) in lgtdqcs001f_set_symbol_rate() argument
134 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff); in lgtdqcs001f_set_symbol_rate()
135 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff); in lgtdqcs001f_set_symbol_rate()
136 stv0299_writereg(fe, 0x21, ratio & 0xf0); in lgtdqcs001f_set_symbol_rate()
/drivers/video/backlight/
Dktd253-backlight.c35 u16 ratio; member
80 u16 current_ratio = ktd253->ratio; in ktd253_backlight_update_status()
98 ktd253->ratio = 0; in ktd253_backlight_update_status()
131 ktd253->ratio = current_ratio; in ktd253_backlight_update_status()
/drivers/ata/
Dpata_pdc2027x.c518 long ratio = pout_required / pll_clock_khz; in pdc_adjust_pll() local
542 if (ratio < 8600L) { /* 8.6x */ in pdc_adjust_pll()
545 } else if (ratio < 12900L) { /* 12.9x */ in pdc_adjust_pll()
548 } else if (ratio < 16100L) { /* 16.1x */ in pdc_adjust_pll()
551 } else if (ratio < 64000L) { /* 64x */ in pdc_adjust_pll()
555 printk(KERN_ERR DRV_NAME ": Invalid ratio %ld, give up!\n", ratio); in pdc_adjust_pll()
559 F = (ratio * (R+2)) / 1000 - 2; in pdc_adjust_pll()
567 PDPRINTK("F[%d] R[%d] ratio*1000[%ld]\n", F, R, ratio); in pdc_adjust_pll()
/drivers/video/fbdev/
Dasiliantfb.c118 unsigned ratio; in asiliant_calc_dclk2() local
123 ratio = 1000000 / pixclock; in asiliant_calc_dclk2()
125 Ftarget = 1000000 * ratio + (1000000 * remainder) / pixclock; in asiliant_calc_dclk2()
132 ratio = Ftarget / Fref; in asiliant_calc_dclk2()
138 unsigned m = n * ratio + (n * remainder) / Fref; in asiliant_calc_dclk2()
228 unsigned long Ftarget, ratio, remainder; in asiliantfb_check_var() local
233 ratio = 1000000 / var->pixclock; in asiliantfb_check_var()
235 Ftarget = 1000000 * ratio + (1000000 * remainder) / var->pixclock; in asiliantfb_check_var()
/drivers/iio/light/
Dtsl2583.c69 unsigned int ratio; member
168 u32 ratio; in tsl2583_get_lux() local
237 ratio = (ch1 << 15) / ch0; in tsl2583_get_lux()
241 p->ratio != 0 && p->ratio < ratio; p++) in tsl2583_get_lux()
244 if (p->ratio == 0) { in tsl2583_get_lux()
537 chip->als_settings.als_device_lux[i].ratio, in in_illuminance_lux_table_show()
540 if (chip->als_settings.als_device_lux[i].ratio == 0) { in in_illuminance_lux_table_show()
/drivers/staging/fbtft/
Dfb_uc1611.c35 static unsigned int ratio = 2; variable
36 module_param(ratio, uint, 0000);
37 MODULE_PARM_DESC(ratio, "BR[1:0] Bias voltage ratio: 0-3 (default: 2)");
84 write_reg(par, 0xE8 | (ratio & 0x03)); in init_display()
/drivers/cpufreq/
Dpmac32-cpufreq.c482 const u32 *freqs, *ratio; in pmac_cpufreq_init_MacRISC3() local
490 ratio = of_get_property(cpunode, "processor-to-bus-ratio*2", in pmac_cpufreq_init_MacRISC3()
492 if (ratio == NULL) { in pmac_cpufreq_init_MacRISC3()
510 low_freq = (low_freq * (*ratio)) / 2000; in pmac_cpufreq_init_MacRISC3()
511 hi_freq = (hi_freq * (*ratio)) / 2000; in pmac_cpufreq_init_MacRISC3()
/drivers/clk/analogbits/
Dwrpll-cln28hpc.c228 unsigned long ratio; in wrpll_configure_for_rate() local
265 ratio = div64_u64((target_vco_rate << ROUND_SHIFT), parent_rate); in wrpll_configure_for_rate()
277 f_pre_div = ratio * r; in wrpll_configure_for_rate()

1234