| /kernel/linux/linux-5.10/drivers/rtc/ |
| H A D | rtc-rv3032.c | 398 offset = clamp(offset, -7629L, 7391L) * 1000; in rv3032_set_offset() 598 return RV3032_HFD_STEP * clamp(hfd, 0, 8192); in rv3032_clkout_round_rate() 616 hfd = clamp(hfd, 1, 8192) - 1; in rv3032_clkout_set_rate()
|
| /kernel/linux/linux-6.6/drivers/rtc/ |
| H A D | rtc-rv3032.c | 391 offset = clamp(offset, -7629L, 7391L) * 1000; in rv3032_set_offset() 662 return RV3032_HFD_STEP * clamp(hfd, 0, 8192); in rv3032_clkout_round_rate() 680 hfd = clamp(hfd, 1, 8192) - 1; in rv3032_clkout_set_rate()
|
| /kernel/linux/linux-6.6/sound/pci/hda/ |
| H A D | tas2781_hda_i2c.c | 195 val = clamp(nr_profile, 0, max); in tasdevice_set_profile_id() 252 val = clamp(nr_program, 0, max); in tasdevice_program_put() 281 val = clamp(nr_config, 0, max); in tasdevice_config_put()
|
| /kernel/linux/linux-6.6/sound/usb/ |
| H A D | mixer_scarlett.c | 325 val = clamp(val / 256, -128, (int)kctl->private_value) + in scarlett_ctl_get() 420 val = clamp(val - opt->start, 0, opt->len-1); in scarlett_ctl_enum_get() 474 ucontrol->value.enumerated.item[0] = clamp((int)buf[0], 0, 1); in scarlett_ctl_meter_get()
|
| /third_party/skia/src/core/ |
| H A D | SkVMBlitter.cpp | 166 c.r = clamp(c.r, 0.0f, c.a); 167 c.g = clamp(c.g, 0.0f, c.a); 168 c.b = clamp(c.b, 0.0f, c.a); 328 // TODO: Below, we also clamp after the blend step. If we can prove that none of the work here in BuildProgram() 330 // able to skip the second clamp. For now, we clamp twice. in BuildProgram()
|
| /third_party/vk-gl-cts/framework/common/ |
| H A D | tcuVectorUtil.hpp | 76 float t = de::clamp((x - edge0) / (edge1 - edge0), 0.0f, 1.0f); in smoothStep() 485 TCU_DECLARE_VECTOR_TERNARY_FUNC(clamp, de::clamp)
|
| /kernel/linux/linux-5.10/drivers/media/dvb-frontends/ |
| H A D | af9013.c | 626 utmp1 = clamp(stmp1 + 90000, 0, 60000); in af9013_read_status() 672 utmp1 = clamp(utmp1, 653799U, 1689999U); in af9013_read_status() 683 utmp1 = clamp(utmp1, 371105U, 827999U); in af9013_read_status() 694 utmp1 = clamp(utmp1, 193246U, 424999U); in af9013_read_status()
|
| /kernel/linux/linux-5.10/drivers/media/i2c/ |
| H A D | mt9v032.c | 510 width = clamp(ALIGN(format->format.width, 2), in mt9v032_set_format() 514 height = clamp(ALIGN(format->format.height, 2), in mt9v032_set_format() 566 rect.left = clamp(ALIGN(sel->r.left + 1, 2) - 1, in mt9v032_set_selection() 569 rect.top = clamp(ALIGN(sel->r.top + 1, 2) - 1, in mt9v032_set_selection()
|
| /kernel/linux/linux-5.10/drivers/media/platform/mtk-vcodec/ |
| H A D | mtk_vcodec_enc.c | 265 pix_fmt_mp->height = clamp(pix_fmt_mp->height, in vidioc_try_fmt() 268 pix_fmt_mp->width = clamp(pix_fmt_mp->width, in vidioc_try_fmt() 478 pix_fmt_mp->height = clamp(pix_fmt_mp->height, in vidioc_venc_s_fmt_out() 481 pix_fmt_mp->width = clamp(pix_fmt_mp->width, in vidioc_venc_s_fmt_out()
|
| /kernel/linux/linux-5.10/sound/soc/codecs/ |
| H A D | sgtl5000.c | 557 l = clamp(l, 0x3c, 0xfc); in dac_get_volsw() 558 r = clamp(r, 0x3c, 0xfc); in dac_get_volsw() 605 l = clamp(l, 0, 0xfc - 0x3c); in dac_put_volsw() 606 r = clamp(r, 0, 0xfc - 0x3c); in dac_put_volsw()
|
| /kernel/linux/linux-5.10/mm/ |
| H A D | memblock.c | 218 this_start = clamp(this_start, start, end); in __memblock_find_range_bottom_up() 219 this_end = clamp(this_end, start, end); in __memblock_find_range_bottom_up() 254 this_start = clamp(this_start, start, end); in __memblock_find_range_top_down() 255 this_end = clamp(this_end, start, end); in __memblock_find_range_top_down()
|
| /kernel/linux/linux-6.6/drivers/media/i2c/ |
| H A D | mt9v032.c | 515 width = clamp(ALIGN(format->format.width, 2), in mt9v032_set_format() 519 height = clamp(ALIGN(format->format.height, 2), in mt9v032_set_format() 572 rect.left = clamp(ALIGN(sel->r.left + 1, 2) - 1, in mt9v032_set_selection() 575 rect.top = clamp(ALIGN(sel->r.top + 1, 2) - 1, in mt9v032_set_selection()
|
| H A D | ar0521.c | 204 u16 x = clamp((AR0521_WIDTH_MAX - sensor->fmt.width) / 2, in ar0521_set_geometry() 206 u16 y = clamp(((AR0521_HEIGHT_MAX - sensor->fmt.height) / 2) & ~1, in ar0521_set_geometry() 429 fmt->width = clamp(ALIGN(fmt->width, 4), AR0521_WIDTH_MIN, in ar0521_adj_fmt() 431 fmt->height = clamp(ALIGN(fmt->height, 4), AR0521_HEIGHT_MIN, in ar0521_adj_fmt()
|
| /kernel/linux/linux-6.6/drivers/media/dvb-frontends/ |
| H A D | af9013.c | 626 utmp1 = clamp(stmp1 + 90000, 0, 60000); in af9013_read_status() 672 utmp1 = clamp(utmp1, 653799U, 1689999U); in af9013_read_status() 683 utmp1 = clamp(utmp1, 371105U, 827999U); in af9013_read_status() 694 utmp1 = clamp(utmp1, 193246U, 424999U); in af9013_read_status()
|
| /kernel/linux/linux-6.6/sound/soc/codecs/ |
| H A D | sgtl5000.c | 557 l = clamp(l, 0x3c, 0xfc); in dac_get_volsw() 558 r = clamp(r, 0x3c, 0xfc); in dac_get_volsw() 605 l = clamp(l, 0, 0xfc - 0x3c); in dac_put_volsw() 606 r = clamp(r, 0, 0xfc - 0x3c); in dac_put_volsw()
|
| /third_party/mesa3d/src/amd/vulkan/ |
| H A D | radv_meta.c | 148 state->dynamic.depth_bias.clamp = cmd_buffer->state.dynamic.depth_bias.clamp; in radv_meta_save() 278 cmd_buffer->state.dynamic.depth_bias.clamp = state->dynamic.depth_bias.clamp; in radv_meta_restore()
|
| /third_party/mesa3d/src/amd/compiler/ |
| H A D | aco_ir.cpp | 218 if (vop3.clamp && instr->isVOPC() && gfx_level != GFX8) in can_use_SDWA() 289 sdwa.clamp = vop3.clamp; in convert_to_SDWA() 337 if (vop3->clamp || vop3->omod || vop3->opsel) in can_use_DPP()
|
| /third_party/skia/third_party/externals/swiftshader/src/Pipeline/ |
| H A D | SetupRoutine.cpp | 442 // TODO(b/139341727): When there's a fixed-point depth buffer and no depth bias clamp, in generate() 483 Float clamp = *Pointer<Float>(data + OFFSET(DrawData, depthBiasClamp)); in generate() local 485 bias = IfThenElse(clamp > 0.0f, Min(bias, clamp), Max(bias, clamp)); in generate()
|
| /kernel/linux/linux-5.10/drivers/extcon/ |
| H A D | extcon-arizona.c | 141 bool clamp) in arizona_extcon_hp_clamp() 157 if (clamp) { in arizona_extcon_hp_clamp() 175 if (clamp) in arizona_extcon_hp_clamp() 182 arizona->hpdet_clamp = clamp; in arizona_extcon_hp_clamp() 184 /* Keep the HP output stages disabled while doing the clamp */ in arizona_extcon_hp_clamp() 185 if (clamp) { in arizona_extcon_hp_clamp() 200 dev_warn(arizona->dev, "Failed to do clamp: %d\n", in arizona_extcon_hp_clamp() 206 dev_warn(arizona->dev, "Failed to do clamp: %d\n", in arizona_extcon_hp_clamp() 210 /* Restore the desired state while not doing the clamp */ in arizona_extcon_hp_clamp() 211 if (!clamp) { in arizona_extcon_hp_clamp() 140 arizona_extcon_hp_clamp(struct arizona_extcon_info *info, bool clamp) arizona_extcon_hp_clamp() argument [all...] |
| /third_party/vk-gl-cts/external/openglcts/modules/glesext/gpu_shader5/ |
| H A D | esextcGPUShader5TextureGatherOffset.cpp | 1009 /* Set border color when "clamp to border" mode is selected */ in prepareTexture() 1186 /** Provides color that will be used as border color for "clamp to border" mode 1816 void clamp(T& value, const T min, const T max) in clamp() function 1916 clamp(expected_values_0[i], 0, ((glw::GLint)texture_size) - 1); in checkResult() 1917 clamp(expected_values_1[i], 0, ((glw::GLint)texture_size) - 1); in checkResult() 1918 clamp(expected_values_2[i], 0, ((glw::GLint)texture_size) - 1); in checkResult() 1919 clamp(expected_values_3[i], 0, ((glw::GLint)texture_size) - 1); in checkResult() 2124 /** Provides color that will be used as border color for "clamp to border" mode 2944 clamp(expected_values[i], 0, ((glw::GLint)texture_size) - 1); in checkResult()
|
| /kernel/linux/linux-5.10/drivers/clk/qcom/ |
| H A D | clk-hfpll.c | 135 rate = clamp(rate, hd->min_rate, hd->max_rate); in clk_hfpll_round_rate()
|
| /kernel/linux/linux-5.10/drivers/clk/meson/ |
| H A D | sclk-div.c | 46 return clamp(div, 2, maxdiv); in sclk_div_getdiv()
|
| /kernel/linux/linux-6.6/include/linux/ |
| H A D | minmax.h | 11 * min()/max()/clamp() macros must accomplish three things: 69 "clamp() low limit " #lo " greater than high limit " #hi); \ 70 static_assert(__types_ok(val, lo), "clamp() 'lo' signedness error"); \ 71 static_assert(__types_ok(val, hi), "clamp() 'hi' signedness error"); \ 138 * clamp - return a value clamped to a given range with strict typechecking 146 #define clamp(val, lo, hi) __careful_clamp(val, lo, hi) macro 152 * Or not use min/max/clamp at all, of course.
|
| /kernel/linux/linux-6.6/drivers/clk/meson/ |
| H A D | sclk-div.c | 46 return clamp(div, 2, maxdiv); in sclk_div_getdiv()
|
| /kernel/linux/linux-6.6/net/handshake/ |
| H A D | netlink.c | 186 hn->hn_pending_max = clamp(tmp, 3UL, 50UL); in handshake_net_init()
|