Home
last modified time | relevance | path

Searched refs:mantissa (Results 1 - 25 of 98) sorted by relevance

1234

/kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/dc/calcs/
H A Dcustom_float.c33 uint32_t *mantissa, in build_custom_float()
49 *mantissa = 0; in build_custom_float()
78 *mantissa = 0; in build_custom_float()
117 *mantissa = dc_fixpt_floor(mantiss); in build_custom_float()
125 uint32_t mantissa, in setup_custom_float()
144 if (mantissa & ~mantissa_mask) { in setup_custom_float()
146 mantissa = mantissa_mask; in setup_custom_float()
159 if (mantissa & mask) in setup_custom_float()
187 uint32_t mantissa; in convert_to_custom_float_format() local
192 value, format, &negative, &mantissa, in convert_to_custom_float_format()
29 build_custom_float( struct fixed31_32 value, const struct custom_float_format *format, bool *negative, uint32_t *mantissa, uint32_t *exponenta) build_custom_float() argument
122 setup_custom_float( const struct custom_float_format *format, bool negative, uint32_t mantissa, uint32_t exponenta, uint32_t *result) setup_custom_float() argument
[all...]
/kernel/linux/linux-6.6/drivers/gpu/drm/amd/display/dc/dml/calcs/
H A Dcustom_float.c33 uint32_t *mantissa, in build_custom_float()
49 *mantissa = 0; in build_custom_float()
78 *mantissa = 0; in build_custom_float()
117 *mantissa = dc_fixpt_floor(mantiss); in build_custom_float()
125 uint32_t mantissa, in setup_custom_float()
144 if (mantissa & ~mantissa_mask) { in setup_custom_float()
146 mantissa = mantissa_mask; in setup_custom_float()
159 if (mantissa & mask) in setup_custom_float()
187 uint32_t mantissa; in convert_to_custom_float_format() local
192 value, format, &negative, &mantissa, in convert_to_custom_float_format()
29 build_custom_float( struct fixed31_32 value, const struct custom_float_format *format, bool *negative, uint32_t *mantissa, uint32_t *exponenta) build_custom_float() argument
122 setup_custom_float( const struct custom_float_format *format, bool negative, uint32_t mantissa, uint32_t exponenta, uint32_t *result) setup_custom_float() argument
[all...]
/kernel/linux/linux-5.10/drivers/iio/light/
H A Dmax44009.c174 int mantissa; in max44009_lux_raw() local
178 * The mantissa consists of the low nibble of the Lux High Byte in max44009_lux_raw()
181 mantissa = ((hi & 0xf) << 4) | (lo & 0xf); in max44009_lux_raw()
191 return exponent * mantissa; in max44009_lux_raw()
301 int mantissa, exp; in max44009_threshold_byte_from_fraction() local
309 mantissa = integral * MAX44009_SCALE_DENOMINATOR; in max44009_threshold_byte_from_fraction()
310 mantissa /= MAX44009_SCALE_NUMERATOR; in max44009_threshold_byte_from_fraction()
313 mantissa += fractional / MAX44009_FRACT_MULT * in max44009_threshold_byte_from_fraction()
316 for (exp = 0; mantissa > 0xff; exp++) in max44009_threshold_byte_from_fraction()
317 mantissa >> in max44009_threshold_byte_from_fraction()
367 int mantissa, exponent; max44009_read_threshold() local
[all...]
H A Dopt3001.c171 u16 mantissa, int *val, int *val2) in opt3001_to_iio_ret()
175 lux = 10 * (mantissa << exponent); in opt3001_to_iio_ret()
227 u16 mantissa; in opt3001_get_lux() local
340 mantissa = OPT3001_REG_MANTISSA(opt->result); in opt3001_get_lux()
342 opt3001_to_iio_ret(opt, exponent, mantissa, val, val2); in opt3001_get_lux()
479 u16 mantissa; in opt3001_write_event_value() local
496 mantissa = (((val * 1000) + (val2 / 1000)) / 10) >> exponent; in opt3001_write_event_value()
497 value = (exponent << 12) | mantissa; in opt3001_write_event_value()
502 opt->high_thresh_mantissa = mantissa; in opt3001_write_event_value()
507 opt->low_thresh_mantissa = mantissa; in opt3001_write_event_value()
170 opt3001_to_iio_ret(struct opt3001 *opt, u8 exponent, u16 mantissa, int *val, int *val2) opt3001_to_iio_ret() argument
[all...]
/kernel/linux/linux-6.6/drivers/iio/light/
H A Dmax44009.c174 int mantissa; in max44009_lux_raw() local
178 * The mantissa consists of the low nibble of the Lux High Byte in max44009_lux_raw()
181 mantissa = ((hi & 0xf) << 4) | (lo & 0xf); in max44009_lux_raw()
191 return exponent * mantissa; in max44009_lux_raw()
301 int mantissa, exp; in max44009_threshold_byte_from_fraction() local
309 mantissa = integral * MAX44009_SCALE_DENOMINATOR; in max44009_threshold_byte_from_fraction()
310 mantissa /= MAX44009_SCALE_NUMERATOR; in max44009_threshold_byte_from_fraction()
313 mantissa += fractional / MAX44009_FRACT_MULT * in max44009_threshold_byte_from_fraction()
316 for (exp = 0; mantissa > 0xff; exp++) in max44009_threshold_byte_from_fraction()
317 mantissa >> in max44009_threshold_byte_from_fraction()
367 int mantissa, exponent; max44009_read_threshold() local
[all...]
H A Dopt3001.c171 u16 mantissa, int *val, int *val2) in opt3001_to_iio_ret()
175 lux = 10 * (mantissa << exponent); in opt3001_to_iio_ret()
227 u16 mantissa; in opt3001_get_lux() local
340 mantissa = OPT3001_REG_MANTISSA(opt->result); in opt3001_get_lux()
342 opt3001_to_iio_ret(opt, exponent, mantissa, val, val2); in opt3001_get_lux()
479 u16 mantissa; in opt3001_write_event_value() local
496 mantissa = (((val * 1000) + (val2 / 1000)) / 10) >> exponent; in opt3001_write_event_value()
497 value = (exponent << 12) | mantissa; in opt3001_write_event_value()
502 opt->high_thresh_mantissa = mantissa; in opt3001_write_event_value()
507 opt->low_thresh_mantissa = mantissa; in opt3001_write_event_value()
170 opt3001_to_iio_ret(struct opt3001 *opt, u8 exponent, u16 mantissa, int *val, int *val2) opt3001_to_iio_ret() argument
[all...]
/kernel/linux/linux-5.10/drivers/hwmon/pmbus/
H A Dzl6100.c56 s32 mantissa; in zl6100_l2d() local
60 mantissa = ((s16)((l & 0x7ff) << 5)) >> 5; in zl6100_l2d()
62 val = mantissa; in zl6100_l2d()
80 s16 exponent = 0, mantissa; in zl6100_d2l() local
92 /* Reduce large mantissa until it fits into 10 bit */ in zl6100_d2l()
97 /* Increase small mantissa to improve precision */ in zl6100_d2l()
103 /* Convert mantissa from milli-units to units */ in zl6100_d2l()
104 mantissa = DIV_ROUND_CLOSEST(val, 1000); in zl6100_d2l()
107 if (mantissa > 0x3ff) in zl6100_d2l()
108 mantissa in zl6100_d2l()
[all...]
H A Dxdpe12284.c27 s32 mantissa; in xdpe122_read_word_data() local
39 mantissa = ((s16)((ret & GENMASK(10, 0)) << 5)) >> 5; in xdpe122_read_word_data()
40 val = mantissa * 1000L; in xdpe122_read_word_data()
/kernel/linux/linux-5.10/arch/m68k/fpsp040/
H A Dsgetem.S10 | The entry point sGETMAN extracts the mantissa of the
11 | input argument. The mantissa is converted to an
73 | For normalized numbers, leave the mantissa alone, simply load
89 | For denormalized numbers, shift the mantissa until the j-bit = 1,
96 bsr shft |shift mantissa bits till msbit is set
104 | Shifts the mantissa bits until msbit is set.
106 | ms mantissa part in d0
107 | ls mantissa part in d1
H A Dfpsp.h132 .set WBTEMP_HI,WBTEMP+4 | wbtemp mantissa [63:32] (4 bytes)
133 .set WBTEMP_LO,WBTEMP+8 | wbtemp mantissa [31:00] (4 bytes)
165 .set wbtemp66_bit,2 | wbtemp mantissa bit #66
166 .set wbtemp1_bit,1 | wbtemp mantissa bit #1
167 .set wbtemp0_bit,0 | wbtemp mantissa bit #0
201 .set FPTEMP_HI,FPTEMP+4 | fptemp mantissa [63:32] (4 bytes)
202 .set FPTEMP_LO,FPTEMP+8 | fptemp mantissa [31:00] (4 bytes)
208 .set ETEMP_HI,ETEMP+4 | etemp mantissa [63:32] (4 bytes)
209 .set ETEMP_LO,ETEMP+8 | etemp mantissa [31:00] (4 bytes)
302 .set signan_bit,6 | signalling nan bit in mantissa
[all...]
H A Dround.S154 tstl LOCAL_LO(%a0) |test lower mantissa
163 movel LOCAL_LO(%a0),%d2 |get lower mantissa for s-bit test
195 bccs scc_clr |no mantissa overflow
272 | is done by shifting the mantissa left while decrementing the
276 | bit of the mantissa (msb in d1).
279 | bit of the mantissa (msb in d1) unless this would mean the exponent
281 | exponent (d0) is set to 0 and the mantissa (d1 & d2) is not
289 | Distance to first 1 bit in mantissa = X
295 | shift mantissa by Y
299 | FP_SCR1 = exponent, ms mantissa par
[all...]
H A Ddecbin.S26 | for the mantissa which is to be interpreted as 17 integer
30 | A2. Convert the bcd mantissa to binary by successive
32 | The mantissa digits will be converted with the decimal point
41 | mantissa the equivalent of forcing in the bcd value:
56 | A5. Form the final binary number by scaling the mantissa by
58 | mantissa in FP0 by the factor in FP1 if the adjusted
171 | Calculate mantissa:
172 | 1. Calculate absolute value of mantissa in fp0 by mul and add.
173 | 2. Correct for mantissa sign.
186 | (*) fp0: mantissa accumulato
[all...]
/kernel/linux/linux-6.6/arch/m68k/fpsp040/
H A Dsgetem.S10 | The entry point sGETMAN extracts the mantissa of the
11 | input argument. The mantissa is converted to an
73 | For normalized numbers, leave the mantissa alone, simply load
89 | For denormalized numbers, shift the mantissa until the j-bit = 1,
96 bsr shft |shift mantissa bits till msbit is set
104 | Shifts the mantissa bits until msbit is set.
106 | ms mantissa part in d0
107 | ls mantissa part in d1
H A Dfpsp.h132 .set WBTEMP_HI,WBTEMP+4 | wbtemp mantissa [63:32] (4 bytes)
133 .set WBTEMP_LO,WBTEMP+8 | wbtemp mantissa [31:00] (4 bytes)
165 .set wbtemp66_bit,2 | wbtemp mantissa bit #66
166 .set wbtemp1_bit,1 | wbtemp mantissa bit #1
167 .set wbtemp0_bit,0 | wbtemp mantissa bit #0
201 .set FPTEMP_HI,FPTEMP+4 | fptemp mantissa [63:32] (4 bytes)
202 .set FPTEMP_LO,FPTEMP+8 | fptemp mantissa [31:00] (4 bytes)
208 .set ETEMP_HI,ETEMP+4 | etemp mantissa [63:32] (4 bytes)
209 .set ETEMP_LO,ETEMP+8 | etemp mantissa [31:00] (4 bytes)
302 .set signan_bit,6 | signalling nan bit in mantissa
[all...]
H A Dround.S154 tstl LOCAL_LO(%a0) |test lower mantissa
163 movel LOCAL_LO(%a0),%d2 |get lower mantissa for s-bit test
195 bccs scc_clr |no mantissa overflow
272 | is done by shifting the mantissa left while decrementing the
276 | bit of the mantissa (msb in d1).
279 | bit of the mantissa (msb in d1) unless this would mean the exponent
281 | exponent (d0) is set to 0 and the mantissa (d1 & d2) is not
289 | Distance to first 1 bit in mantissa = X
295 | shift mantissa by Y
299 | FP_SCR1 = exponent, ms mantissa par
[all...]
H A Ddecbin.S26 | for the mantissa which is to be interpreted as 17 integer
30 | A2. Convert the bcd mantissa to binary by successive
32 | The mantissa digits will be converted with the decimal point
41 | mantissa the equivalent of forcing in the bcd value:
56 | A5. Form the final binary number by scaling the mantissa by
58 | mantissa in FP0 by the factor in FP1 if the adjusted
171 | Calculate mantissa:
172 | 1. Calculate absolute value of mantissa in fp0 by mul and add.
173 | 2. Correct for mantissa sign.
186 | (*) fp0: mantissa accumulato
[all...]
/kernel/linux/linux-6.6/drivers/hwmon/pmbus/
H A Dzl6100.c63 s32 mantissa; in zl6100_l2d() local
67 mantissa = ((s16)((l & 0x7ff) << 5)) >> 5; in zl6100_l2d()
69 val = mantissa; in zl6100_l2d()
87 s16 exponent = 0, mantissa; in zl6100_d2l() local
99 /* Reduce large mantissa until it fits into 10 bit */ in zl6100_d2l()
104 /* Increase small mantissa to improve precision */ in zl6100_d2l()
110 /* Convert mantissa from milli-units to units */ in zl6100_d2l()
111 mantissa = DIV_ROUND_CLOSEST(val, 1000); in zl6100_d2l()
114 if (mantissa > 0x3ff) in zl6100_d2l()
115 mantissa in zl6100_d2l()
[all...]
H A Dbpa-rs600.c44 * mantissa as unsigned. Deal with this here to allow the PMBus core
49 int ret, exponent, mantissa; in bpa_rs600_read_vin() local
57 mantissa = ret & 0x7ff; in bpa_rs600_read_vin()
60 mantissa >>= 1; in bpa_rs600_read_vin()
62 ret = (exponent << 11) | mantissa; in bpa_rs600_read_vin()
H A Dxdpe12284.c29 s32 mantissa; in xdpe122_read_word_data() local
41 mantissa = ((s16)((ret & GENMASK(10, 0)) << 5)) >> 5; in xdpe122_read_word_data()
42 val = mantissa * 1000L; in xdpe122_read_word_data()
/kernel/linux/linux-6.6/drivers/hid/amd-sfh-hid/sfh1_1/
H A Damd_sfh_desc.c137 int fraction, shift, mantissa, sign, exp, zeropre; in float_to_int() local
139 mantissa = flt32_val & GENMASK(22, 0); in float_to_int()
143 if (!exp && !mantissa) in float_to_int()
155 zeropre = (((BIT(23) + mantissa) * 100) >> 23) >> exp; in float_to_int()
165 flt32_val = BIT(exp) + (mantissa << shift); in float_to_int()
168 flt32_val = BIT(exp) + (mantissa >> shift); in float_to_int()
171 fraction = (shift == 0) ? 0 : mantissa & GENMASK(shift - 1, 0); in float_to_int()
/kernel/linux/linux-6.6/drivers/usb/serial/
H A Dpl2303.c612 unsigned int baseline, mantissa, exponent; in pl2303_encode_baud_rate_divisor() local
616 * baudrate = 12M * 32 / (mantissa * 4^exponent) in pl2303_encode_baud_rate_divisor()
618 * mantissa = buf[8:0] in pl2303_encode_baud_rate_divisor()
622 mantissa = baseline / baud; in pl2303_encode_baud_rate_divisor()
623 if (mantissa == 0) in pl2303_encode_baud_rate_divisor()
624 mantissa = 1; /* Avoid dividing by zero if baud > 32*12M. */ in pl2303_encode_baud_rate_divisor()
626 while (mantissa >= 512) { in pl2303_encode_baud_rate_divisor()
628 mantissa >>= 2; /* divide by 4 */ in pl2303_encode_baud_rate_divisor()
631 /* Exponent is maxed. Trim mantissa and leave. */ in pl2303_encode_baud_rate_divisor()
632 mantissa in pl2303_encode_baud_rate_divisor()
651 unsigned int baseline, mantissa, exponent; pl2303_encode_baud_rate_divisor_alt() local
[all...]
/kernel/linux/linux-6.6/drivers/iio/chemical/
H A Dsps30.c42 int mantissa = val & GENMASK(22, 0); in sps30_float_to_int_clamped() local
48 if (!exp && !mantissa) in sps30_float_to_int_clamped()
54 return ((((1 << 23) + mantissa) * 100) >> 23) >> (-exp); in sps30_float_to_int_clamped()
59 val = (1 << exp) + (mantissa >> shift); in sps30_float_to_int_clamped()
63 fraction = mantissa & GENMASK(shift - 1, 0); in sps30_float_to_int_clamped()
/kernel/linux/linux-5.10/sound/isa/gus/
H A Dgus_volume.c151 unsigned int mantissa, f1, f2;
165 mantissa = sensitivity % 8192;
172 bend = (int) ((((f2 - f1) * mantissa) >> 13) + f1);
/kernel/linux/linux-6.6/sound/isa/gus/
H A Dgus_volume.c151 unsigned int mantissa, f1, f2;
165 mantissa = sensitivity % 8192;
172 bend = (int) ((((f2 - f1) * mantissa) >> 13) + f1);
/kernel/linux/linux-5.10/drivers/net/wireless/mediatek/mt76/mt76x0/
H A Dphy.c667 u32 mantissa = val << 4; in mt76x0_phy_lin2db() local
671 while (mantissa < BIT(15)) { in mt76x0_phy_lin2db()
672 mantissa <<= 1; in mt76x0_phy_lin2db()
676 while (mantissa > 0xffff) { in mt76x0_phy_lin2db()
677 mantissa >>= 1; in mt76x0_phy_lin2db()
683 if (mantissa <= 47104) in mt76x0_phy_lin2db()
684 data = mantissa + (mantissa >> 3) + (mantissa >> 4) - 38400; in mt76x0_phy_lin2db()
686 data = mantissa in mt76x0_phy_lin2db()
[all...]

Completed in 13 milliseconds

1234