/openbmc/linux/drivers/staging/media/atomisp/pci/ |
H A D | sh_css_frac.h | 40 return clamp_t(int, v, sISP_VAL_MIN, sISP_VAL_MAX); in sDIGIT_FITTING() 50 return clamp_t(unsigned int, v, uISP_VAL_MIN, uISP_VAL_MAX); in uDIGIT_FITTING()
|
H A D | atomisp_csi2.c | 105 actual_ffmt->width = clamp_t(u32, ffmt->width, in atomisp_csi2_set_ffmt() 108 actual_ffmt->height = clamp_t(u32, ffmt->height, in atomisp_csi2_set_ffmt()
|
/openbmc/linux/drivers/media/platform/renesas/vsp1/ |
H A D | vsp1_uif.c | 157 sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1); in uif_set_selection() 158 sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1); in uif_set_selection() 159 sel->r.width = clamp_t(unsigned int, sel->r.width, UIF_MIN_SIZE, in uif_set_selection() 161 sel->r.height = clamp_t(unsigned int, sel->r.height, UIF_MIN_SIZE, in uif_set_selection()
|
H A D | vsp1_hsit.c | 95 format->width = clamp_t(unsigned int, fmt->format.width, in hsit_set_format() 97 format->height = clamp_t(unsigned int, fmt->format.height, in hsit_set_format()
|
H A D | vsp1_histo.c | 268 sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1); in histo_set_crop() 269 sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1); in histo_set_crop() 270 sel->r.width = clamp_t(unsigned int, sel->r.width, HISTO_MIN_SIZE, in histo_set_crop() 272 sel->r.height = clamp_t(unsigned int, sel->r.height, HISTO_MIN_SIZE, in histo_set_crop()
|
H A D | vsp1_rwpf.c | 97 format->width = clamp_t(unsigned int, fmt->format.width, in vsp1_rwpf_set_format() 99 format->height = clamp_t(unsigned int, fmt->format.height, in vsp1_rwpf_set_format()
|
/openbmc/linux/drivers/media/dvb-frontends/ |
H A D | ts2020.c | 358 gain1 = clamp_t(long, gain1, 0, 15); in ts2020_read_tuner_gain() 359 gain2 = clamp_t(long, gain2, 0, 13); in ts2020_read_tuner_gain() 360 v_agc = clamp_t(long, v_agc, 400, 1100); in ts2020_read_tuner_gain() 375 gain1 = clamp_t(long, gain1, 0, 15); in ts2020_read_tuner_gain() 376 gain2 = clamp_t(long, gain2, 2, 16); in ts2020_read_tuner_gain() 377 gain3 = clamp_t(long, gain3, 0, 6); in ts2020_read_tuner_gain() 378 v_agc = clamp_t(long, v_agc, 600, 1600); in ts2020_read_tuner_gain()
|
/openbmc/linux/arch/x86/kernel/ |
H A D | check.c | 117 start = clamp_t(phys_addr_t, round_up(start, PAGE_SIZE), in setup_bios_corruption_check() 119 end = clamp_t(phys_addr_t, round_down(end, PAGE_SIZE), in setup_bios_corruption_check()
|
/openbmc/linux/drivers/platform/x86/dell/ |
H A D | dell-wmi-led.c | 143 on_eighths = clamp_t(unsigned long, on_eighths, 1, 255); in dell_led_blink() 147 off_eighths = clamp_t(unsigned long, off_eighths, 1, 255); in dell_led_blink()
|
/openbmc/linux/drivers/staging/media/omap4iss/ |
H A D | iss_ipipeif.c | 402 fmt->width = clamp_t(u32, width, 1, 8192); in ipipeif_try_format() 403 fmt->height = clamp_t(u32, height, 1, 8192); in ipipeif_try_format() 417 fmt->width = clamp_t(u32, width, 32, (fmt->width + 15) & ~15); in ipipeif_try_format() 419 fmt->height = clamp_t(u32, height, 32, fmt->height); in ipipeif_try_format() 428 fmt->width = clamp_t(u32, width, 32, fmt->width); in ipipeif_try_format() 429 fmt->height = clamp_t(u32, height, 32, fmt->height); in ipipeif_try_format()
|
H A D | iss_ipipe.c | 220 fmt->width = clamp_t(u32, width, 1, 8192); in ipipe_try_format() 221 fmt->height = clamp_t(u32, height, 1, 8192); in ipipe_try_format() 231 fmt->width = clamp_t(u32, width, 32, fmt->width); in ipipe_try_format() 232 fmt->height = clamp_t(u32, height, 32, fmt->height); in ipipe_try_format()
|
H A D | iss_resizer.c | 459 fmt->width = clamp_t(u32, width, 1, 8192); in resizer_try_format() 460 fmt->height = clamp_t(u32, height, 1, 8192); in resizer_try_format() 479 fmt->width = clamp_t(u32, width, 32, (fmt->width + 15) & ~15); in resizer_try_format() 481 fmt->height = clamp_t(u32, height, 32, fmt->height); in resizer_try_format()
|
/openbmc/linux/drivers/clk/zynqmp/ |
H A D | pll.c | 119 fbdiv = clamp_t(u32, fbdiv, PLL_FBDIV_MIN, PLL_FBDIV_MAX); in zynqmp_pll_round_rate() 193 m = clamp_t(u32, m, (PLL_FBDIV_MIN), (PLL_FBDIV_MAX)); in zynqmp_pll_set_rate() 210 fbdiv = clamp_t(u32, fbdiv, PLL_FBDIV_MIN, PLL_FBDIV_MAX); in zynqmp_pll_set_rate()
|
/openbmc/linux/drivers/media/platform/ti/omap3isp/ |
H A D | ispresizer.c | 813 ratio->vert = clamp_t(unsigned int, ratio->vert, in resizer_calc_ratios() 884 ratio->horz = clamp_t(unsigned int, ratio->horz, in resizer_calc_ratios() 1203 crop->width = clamp_t(u32, crop->width, min_width, max_width); in resizer_try_crop() 1204 crop->height = clamp_t(u32, crop->height, min_height, max_height); in resizer_try_crop() 1207 crop->left = clamp_t(u32, crop->left, 0, sink->width - MIN_IN_WIDTH); in resizer_try_crop() 1208 crop->width = clamp_t(u32, crop->width, MIN_IN_WIDTH, in resizer_try_crop() 1210 crop->top = clamp_t(u32, crop->top, 0, sink->height - MIN_IN_HEIGHT); in resizer_try_crop() 1211 crop->height = clamp_t(u32, crop->height, MIN_IN_HEIGHT, in resizer_try_crop() 1393 fmt->width = clamp_t(u32, fmt->width, MIN_IN_WIDTH, in resizer_try_format() 1395 fmt->height = clamp_t(u32, fmt->height, MIN_IN_HEIGHT, in resizer_try_format()
|
H A D | ispccp2.c | 263 vpclk_div = clamp_t(unsigned int, vpclk_div, 1, 65536); in ccp2_vp_config() 268 vpclk_div = clamp_t(unsigned int, vpclk_div, 1, 4); in ccp2_vp_config() 656 fmt->width = clamp_t(u32, fmt->width, in ccp2_try_format() 659 fmt->height = clamp_t(u32, fmt->height, in ccp2_try_format() 663 fmt->width = clamp_t(u32, fmt->width, in ccp2_try_format() 666 fmt->height = clamp_t(u32, fmt->height, in ccp2_try_format()
|
/openbmc/linux/drivers/media/platform/xilinx/ |
H A D | xilinx-vip.c | 152 format->width = clamp_t(unsigned int, fmt->format.width, in xvip_set_format_size() 154 format->height = clamp_t(unsigned int, fmt->format.height, in xvip_set_format_size()
|
/openbmc/linux/drivers/media/platform/qcom/camss/ |
H A D | camss-video.c | 707 bytesperline[i] = clamp_t(u32, p->bytesperline, in __video_try_fmt() 709 sizeimage[i] = clamp_t(u32, p->sizeimage, in __video_try_fmt() 728 pix_mp->width = clamp_t(u32, width, 1, CAMSS_FRAME_MAX_WIDTH); in __video_try_fmt() 729 pix_mp->height = clamp_t(u32, height, 1, CAMSS_FRAME_MAX_HEIGHT_RDI); in __video_try_fmt() 751 p->bytesperline = clamp_t(u32, p->bytesperline, in __video_try_fmt() 753 p->sizeimage = clamp_t(u32, p->sizeimage, in __video_try_fmt()
|
H A D | camss-csid.c | 312 fmt->width = clamp_t(u32, fmt->width, 1, 8191); in csid_try_format() 313 fmt->height = clamp_t(u32, fmt->height, 1, 8191); in csid_try_format() 341 fmt->width = clamp_t(u32, fmt->width, 1, 8191); in csid_try_format() 342 fmt->height = clamp_t(u32, fmt->height, 1, 8191); in csid_try_format()
|
/openbmc/linux/include/linux/ |
H A D | minmax.h | 224 #define clamp_t(type, val, lo, hi) __careful_clamp((type)(val), (type)(lo), (type)(hi)) macro 237 #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
|
/openbmc/u-boot/include/linux/ |
H A D | kernel.h | 236 #define clamp_t(type, val, lo, hi) min_t(type, max_t(type, val, lo), hi) macro 249 #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
|
/openbmc/linux/drivers/media/platform/renesas/rzg2l-cru/ |
H A D | rzg2l-ip.c | 129 sink_format->width = clamp_t(u32, fmt->format.width, in rzg2l_cru_ip_set_format() 131 sink_format->height = clamp_t(u32, fmt->format.height, in rzg2l_cru_ip_set_format()
|
/openbmc/linux/arch/powerpc/platforms/85xx/ |
H A D | p1022_rdk.c | 76 pxclk = clamp_t(u32, pxclk, 2, 255); in p1022rdk_set_pixel_clock()
|
H A D | t1042rdb_diu.c | 110 pxclk = clamp_t(u32, pxclk, 2, 255); in t1042rdb_set_pixel_clock()
|
/openbmc/linux/lib/ |
H A D | notifier-error-inject.c | 8 *(int *)data = clamp_t(int, val, -MAX_ERRNO, 0); in debugfs_errno_set()
|
/openbmc/linux/drivers/media/i2c/ |
H A D | ov5693.c | 831 width = clamp_t(unsigned int, ALIGN(format->format.width, 2), in ov5693_set_fmt() 833 height = clamp_t(unsigned int, ALIGN(format->format.height, 2), in ov5693_set_fmt() 840 hratio = clamp_t(unsigned int, in ov5693_set_fmt() 842 vratio = clamp_t(unsigned int, in ov5693_set_fmt() 942 rect.width = clamp_t(unsigned int, ALIGN(sel->r.width, 2), in ov5693_set_selection() 944 rect.height = clamp_t(unsigned int, ALIGN(sel->r.height, 2), in ov5693_set_selection()
|