Home
last modified time | relevance | path

Searched refs:clamp_t (Results 1 – 25 of 239) sorted by relevance

12345678910

/linux-6.12.1/drivers/staging/media/atomisp/pci/
Dsh_css_frac.h42 return clamp_t(int, v, sISP_VAL_MIN, sISP_VAL_MAX); in sDIGIT_FITTING()
52 return clamp_t(unsigned int, v, uISP_VAL_MIN, uISP_VAL_MAX); in uDIGIT_FITTING()
Datomisp_csi2.c104 actual_ffmt->width = clamp_t(u32, ffmt->width, in atomisp_csi2_set_ffmt()
107 actual_ffmt->height = clamp_t(u32, ffmt->height, in atomisp_csi2_set_ffmt()
/linux-6.12.1/drivers/media/platform/renesas/vsp1/
Dvsp1_uif.c153 sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1); in uif_set_selection()
154 sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1); in uif_set_selection()
155 sel->r.width = clamp_t(unsigned int, sel->r.width, UIF_MIN_SIZE, in uif_set_selection()
157 sel->r.height = clamp_t(unsigned int, sel->r.height, UIF_MIN_SIZE, in uif_set_selection()
Dvsp1_hsit.c94 format->width = clamp_t(unsigned int, fmt->format.width, in hsit_set_format()
96 format->height = clamp_t(unsigned int, fmt->format.height, in hsit_set_format()
Dvsp1_histo.c263 sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1); in histo_set_crop()
264 sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1); in histo_set_crop()
265 sel->r.width = clamp_t(unsigned int, sel->r.width, HISTO_MIN_SIZE, in histo_set_crop()
267 sel->r.height = clamp_t(unsigned int, sel->r.height, HISTO_MIN_SIZE, in histo_set_crop()
Dvsp1_rwpf.c89 format->width = clamp_t(unsigned int, fmt->format.width, in vsp1_rwpf_set_format()
91 format->height = clamp_t(unsigned int, fmt->format.height, in vsp1_rwpf_set_format()
/linux-6.12.1/drivers/media/dvb-frontends/
Dts2020.c358 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()
/linux-6.12.1/drivers/power/supply/
Dpm8916_lbc.c88 chg->charge_voltage_max = clamp_t(u32, chg->charge_voltage_max, in pm8916_lbc_charger_configure()
101 tmp = clamp_t(u32, chg->charge_current_max, in pm8916_lbc_charger_configure()
209 chg->charge_voltage_safe = clamp_t(u32, chg->charge_voltage_safe, in pm8916_lbc_charger_probe_dt()
224 chg->charge_current_safe = clamp_t(u32, chg->charge_current_safe, in pm8916_lbc_charger_probe_dt()
/linux-6.12.1/arch/x86/kernel/
Dcheck.c117 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()
/linux-6.12.1/drivers/platform/x86/dell/
Ddell-wmi-led.c143 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()
/linux-6.12.1/drivers/staging/media/omap4iss/
Diss_ipipeif.c401 fmt->width = clamp_t(u32, width, 1, 8192); in ipipeif_try_format()
402 fmt->height = clamp_t(u32, height, 1, 8192); in ipipeif_try_format()
416 fmt->width = clamp_t(u32, width, 32, (fmt->width + 15) & ~15); in ipipeif_try_format()
418 fmt->height = clamp_t(u32, height, 32, fmt->height); in ipipeif_try_format()
427 fmt->width = clamp_t(u32, width, 32, fmt->width); in ipipeif_try_format()
428 fmt->height = clamp_t(u32, height, 32, fmt->height); in ipipeif_try_format()
Diss_ipipe.c219 fmt->width = clamp_t(u32, width, 1, 8192); in ipipe_try_format()
220 fmt->height = clamp_t(u32, height, 1, 8192); in ipipe_try_format()
230 fmt->width = clamp_t(u32, width, 32, fmt->width); in ipipe_try_format()
231 fmt->height = clamp_t(u32, height, 32, fmt->height); in ipipe_try_format()
Diss_resizer.c458 fmt->width = clamp_t(u32, width, 1, 8192); in resizer_try_format()
459 fmt->height = clamp_t(u32, height, 1, 8192); in resizer_try_format()
478 fmt->width = clamp_t(u32, width, 32, (fmt->width + 15) & ~15); in resizer_try_format()
480 fmt->height = clamp_t(u32, height, 32, fmt->height); in resizer_try_format()
/linux-6.12.1/drivers/clk/zynqmp/
Dpll.c119 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()
/linux-6.12.1/drivers/media/platform/ti/omap3isp/
Dispresizer.c812 ratio->vert = clamp_t(unsigned int, ratio->vert, in resizer_calc_ratios()
883 ratio->horz = clamp_t(unsigned int, ratio->horz, in resizer_calc_ratios()
1202 crop->width = clamp_t(u32, crop->width, min_width, max_width); in resizer_try_crop()
1203 crop->height = clamp_t(u32, crop->height, min_height, max_height); in resizer_try_crop()
1206 crop->left = clamp_t(u32, crop->left, 0, sink->width - MIN_IN_WIDTH); in resizer_try_crop()
1207 crop->width = clamp_t(u32, crop->width, MIN_IN_WIDTH, in resizer_try_crop()
1209 crop->top = clamp_t(u32, crop->top, 0, sink->height - MIN_IN_HEIGHT); in resizer_try_crop()
1210 crop->height = clamp_t(u32, crop->height, MIN_IN_HEIGHT, in resizer_try_crop()
1392 fmt->width = clamp_t(u32, fmt->width, MIN_IN_WIDTH, in resizer_try_format()
1394 fmt->height = clamp_t(u32, fmt->height, MIN_IN_HEIGHT, in resizer_try_format()
Dispccp2.c263 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()
655 fmt->width = clamp_t(u32, fmt->width, in ccp2_try_format()
658 fmt->height = clamp_t(u32, fmt->height, in ccp2_try_format()
662 fmt->width = clamp_t(u32, fmt->width, in ccp2_try_format()
665 fmt->height = clamp_t(u32, fmt->height, in ccp2_try_format()
/linux-6.12.1/drivers/net/ethernet/wangxun/ngbe/
Dngbe_ethtool.c57 new_tx_count = clamp_t(u32, ring->tx_pending, WX_MIN_TXD, WX_MAX_TXD); in ngbe_set_ringparam()
60 new_rx_count = clamp_t(u32, ring->rx_pending, WX_MIN_RXD, WX_MAX_RXD); in ngbe_set_ringparam()
/linux-6.12.1/drivers/media/platform/qcom/camss/
Dcamss-video.c447 bytesperline[i] = clamp_t(u32, p->bytesperline, in __video_try_fmt()
449 sizeimage[i] = clamp_t(u32, p->sizeimage, in __video_try_fmt()
468 pix_mp->width = clamp_t(u32, width, 1, CAMSS_FRAME_MAX_WIDTH); in __video_try_fmt()
469 pix_mp->height = clamp_t(u32, height, 1, CAMSS_FRAME_MAX_HEIGHT_RDI); in __video_try_fmt()
491 p->bytesperline = clamp_t(u32, p->bytesperline, in __video_try_fmt()
493 p->sizeimage = clamp_t(u32, p->sizeimage, in __video_try_fmt()
/linux-6.12.1/drivers/media/platform/xilinx/
Dxilinx-vip.c152 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()
/linux-6.12.1/drivers/media/platform/renesas/rzg2l-cru/
Drzg2l-ip.c121 sink_format->width = clamp_t(u32, fmt->format.width, in rzg2l_cru_ip_set_format()
123 sink_format->height = clamp_t(u32, fmt->format.height, in rzg2l_cru_ip_set_format()
/linux-6.12.1/arch/powerpc/platforms/85xx/
Dp1022_rdk.c76 pxclk = clamp_t(u32, pxclk, 2, 255); in p1022rdk_set_pixel_clock()
Dt1042rdb_diu.c110 pxclk = clamp_t(u32, pxclk, 2, 255); in t1042rdb_set_pixel_clock()
/linux-6.12.1/include/linux/
Dminmax.h276 #define clamp_t(type, val, lo, hi) __careful_clamp((type)(val), (type)(lo), (type)(hi)) macro
289 #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
/linux-6.12.1/lib/
Dnotifier-error-inject.c8 *(int *)data = clamp_t(int, val, -MAX_ERRNO, 0); in debugfs_errno_set()
/linux-6.12.1/drivers/media/i2c/
Dov5693.c827 width = clamp_t(unsigned int, ALIGN(format->format.width, 2), in ov5693_set_fmt()
829 height = clamp_t(unsigned int, ALIGN(format->format.height, 2), in ov5693_set_fmt()
836 hratio = clamp_t(unsigned int, in ov5693_set_fmt()
838 vratio = clamp_t(unsigned int, in ov5693_set_fmt()
938 rect.width = clamp_t(unsigned int, ALIGN(sel->r.width, 2), in ov5693_set_selection()
940 rect.height = clamp_t(unsigned int, ALIGN(sel->r.height, 2), in ov5693_set_selection()

12345678910