Lines Matching refs:val
15 u32 val; member
18 #define FP_16_16_MAX ((uint_fixed_16_16_t){ .val = UINT_MAX })
20 static inline bool is_fixed16_zero(uint_fixed_16_16_t val) in is_fixed16_zero() argument
22 return val.val == 0; in is_fixed16_zero()
25 static inline uint_fixed_16_16_t u32_to_fixed16(u32 val) in u32_to_fixed16() argument
27 uint_fixed_16_16_t fp = { .val = val << 16 }; in u32_to_fixed16()
29 WARN_ON(val > U16_MAX); in u32_to_fixed16()
36 return DIV_ROUND_UP(fp.val, 1 << 16); in fixed16_to_u32_round_up()
41 return fp.val >> 16; in fixed16_to_u32()
47 uint_fixed_16_16_t min = { .val = min(min1.val, min2.val) }; in min_fixed16()
55 uint_fixed_16_16_t max = { .val = max(max1.val, max2.val) }; in max_fixed16()
60 static inline uint_fixed_16_16_t clamp_u64_to_fixed16(u64 val) in clamp_u64_to_fixed16() argument
62 uint_fixed_16_16_t fp = { .val = (u32)val }; in clamp_u64_to_fixed16()
64 WARN_ON(val > U32_MAX); in clamp_u64_to_fixed16()
69 static inline u32 div_round_up_fixed16(uint_fixed_16_16_t val, in div_round_up_fixed16() argument
72 return DIV_ROUND_UP(val.val, d.val); in div_round_up_fixed16()
75 static inline u32 mul_round_up_u32_fixed16(u32 val, uint_fixed_16_16_t mul) in mul_round_up_u32_fixed16() argument
79 tmp = mul_u32_u32(val, mul.val); in mul_round_up_u32_fixed16()
86 static inline uint_fixed_16_16_t mul_fixed16(uint_fixed_16_16_t val, in mul_fixed16() argument
91 tmp = mul_u32_u32(val.val, mul.val); in mul_fixed16()
97 static inline uint_fixed_16_16_t div_fixed16(u32 val, u32 d) in div_fixed16() argument
101 tmp = (u64)val << 16; in div_fixed16()
107 static inline u32 div_round_up_u32_fixed16(u32 val, uint_fixed_16_16_t d) in div_round_up_u32_fixed16() argument
111 tmp = (u64)val << 16; in div_round_up_u32_fixed16()
112 tmp = DIV_ROUND_UP_ULL(tmp, d.val); in div_round_up_u32_fixed16()
118 static inline uint_fixed_16_16_t mul_u32_fixed16(u32 val, uint_fixed_16_16_t mul) in mul_u32_fixed16() argument
122 tmp = mul_u32_u32(val, mul.val); in mul_u32_fixed16()
132 tmp = (u64)add1.val + add2.val; in add_fixed16()
143 tmp = (u64)add1.val + tmp_add2.val; in add_fixed16_u32()