Searched refs:frac_bits (Results 1 – 6 of 6) sorted by relevance
/Linux-v6.6/kernel/sched/ |
D | loadavg.c | 109 fixed_power_int(unsigned long x, unsigned int frac_bits, unsigned int n) in fixed_power_int() argument 111 unsigned long result = 1UL << frac_bits; in fixed_power_int() 117 result += 1UL << (frac_bits - 1); in fixed_power_int() 118 result >>= frac_bits; in fixed_power_int() 124 x += 1UL << (frac_bits - 1); in fixed_power_int() 125 x >>= frac_bits; in fixed_power_int()
|
/Linux-v6.6/drivers/clk/bcm/ |
D | clk-bcm2835.c | 497 u32 frac_bits; member 943 GENMASK(CM_DIV_FRAC_BITS - data->frac_bits, 0) >> 1; in bcm2835_clock_choose_div() 962 CM_DIV_FRAC_BITS - data->frac_bits); in bcm2835_clock_choose_div() 979 if (data->int_bits == 0 && data->frac_bits == 0) in bcm2835_clock_rate_from_divisor() 986 div >>= CM_DIV_FRAC_BITS - data->frac_bits; in bcm2835_clock_rate_from_divisor() 987 div &= (1 << (data->int_bits + data->frac_bits)) - 1; in bcm2835_clock_rate_from_divisor() 992 temp = (u64)parent_rate << data->frac_bits; in bcm2835_clock_rate_from_divisor() 1029 if (data->int_bits == 0 && data->frac_bits == 0) in bcm2835_clock_get_rate() 1180 if (data->frac_bits) in bcm2835_clock_choose_div_and_prate() 1947 .frac_bits = 0, [all …]
|
/Linux-v6.6/drivers/md/ |
D | dm-ps-historical-service-time.c | 86 static u64 fixed_power(u64 x, unsigned int frac_bits, unsigned int n) in fixed_power() argument 88 unsigned long result = 1UL << frac_bits; in fixed_power() 94 result += 1UL << (frac_bits - 1); in fixed_power() 95 result >>= frac_bits; in fixed_power() 101 x += 1UL << (frac_bits - 1); in fixed_power() 102 x >>= frac_bits; in fixed_power()
|
/Linux-v6.6/drivers/gpu/drm/amd/display/include/ |
D | fixed31_32.h | 517 static inline struct fixed31_32 dc_fixpt_truncate(struct fixed31_32 arg, unsigned int frac_bits) in dc_fixpt_truncate() argument 521 if (frac_bits >= FIXED31_32_BITS_PER_FRACTIONAL_PART) { in dc_fixpt_truncate() 522 ASSERT(frac_bits == FIXED31_32_BITS_PER_FRACTIONAL_PART); in dc_fixpt_truncate() 528 arg.value &= (~0ULL) << (FIXED31_32_BITS_PER_FRACTIONAL_PART - frac_bits); in dc_fixpt_truncate()
|
/Linux-v6.6/sound/soc/fsl/ |
D | fsl_easrc.c | 179 unsigned int frac_bits; in fsl_easrc_set_rs_ratio() local 186 frac_bits = 39; in fsl_easrc_set_rs_ratio() 190 frac_bits = 38; in fsl_easrc_set_rs_ratio() 194 frac_bits = 37; in fsl_easrc_set_rs_ratio() 200 val = (u64)in_rate << frac_bits; in fsl_easrc_set_rs_ratio()
|
/Linux-v6.6/drivers/gpu/drm/i915/display/ |
D | intel_color.c | 571 static u16 ctm_to_twos_complement(u64 coeff, int int_bits, int frac_bits) in ctm_to_twos_complement() argument 576 c >>= 32 - frac_bits - 1; in ctm_to_twos_complement() 584 c = clamp(c, -(s64)BIT(int_bits + frac_bits - 1), in ctm_to_twos_complement() 585 (s64)(BIT(int_bits + frac_bits - 1) - 1)); in ctm_to_twos_complement() 587 return c & (BIT(int_bits + frac_bits) - 1); in ctm_to_twos_complement()
|