Home
last modified time | relevance | path

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

1234567

/Linux-v4.19/drivers/media/platform/vsp1/
Dvsp1_uif.c154 sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1); in uif_set_selection()
155 sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1); in uif_set_selection()
156 sel->r.width = clamp_t(unsigned int, sel->r.width, UIF_MIN_SIZE, in uif_set_selection()
158 sel->r.height = clamp_t(unsigned int, sel->r.height, UIF_MIN_SIZE, in uif_set_selection()
Dvsp1_hsit.c93 format->width = clamp_t(unsigned int, fmt->format.width, in hsit_set_format()
95 format->height = clamp_t(unsigned int, fmt->format.height, in hsit_set_format()
Dvsp1_histo.c269 sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1); in histo_set_crop()
270 sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1); in histo_set_crop()
271 sel->r.width = clamp_t(unsigned int, sel->r.width, HISTO_MIN_SIZE, in histo_set_crop()
273 sel->r.height = clamp_t(unsigned int, sel->r.height, HISTO_MIN_SIZE, in histo_set_crop()
Dvsp1_rwpf.c95 format->width = clamp_t(unsigned int, fmt->format.width, in vsp1_rwpf_set_format()
97 format->height = clamp_t(unsigned int, fmt->format.height, in vsp1_rwpf_set_format()
Dvsp1_brx.c247 sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1); in brx_set_selection()
248 sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1); in brx_set_selection()
/Linux-v4.19/drivers/media/dvb-frontends/
Dts2020.c367 gain1 = clamp_t(long, gain1, 0, 15); in ts2020_read_tuner_gain()
368 gain2 = clamp_t(long, gain2, 0, 13); in ts2020_read_tuner_gain()
369 v_agc = clamp_t(long, v_agc, 400, 1100); in ts2020_read_tuner_gain()
384 gain1 = clamp_t(long, gain1, 0, 15); in ts2020_read_tuner_gain()
385 gain2 = clamp_t(long, gain2, 2, 16); in ts2020_read_tuner_gain()
386 gain3 = clamp_t(long, gain3, 0, 6); in ts2020_read_tuner_gain()
387 v_agc = clamp_t(long, v_agc, 600, 1600); in ts2020_read_tuner_gain()
/Linux-v4.19/drivers/gpu/drm/
Ddrm_rect.c90 src->x1 = clamp_t(int64_t, src->x2 - new_src_w, INT_MIN, INT_MAX); in drm_rect_clip_scaled()
98 src->y1 = clamp_t(int64_t, src->y2 - new_src_h, INT_MIN, INT_MAX); in drm_rect_clip_scaled()
106 src->x2 = clamp_t(int64_t, src->x1 + new_src_w, INT_MIN, INT_MAX); in drm_rect_clip_scaled()
114 src->y2 = clamp_t(int64_t, src->y1 + new_src_h, INT_MIN, INT_MAX); in drm_rect_clip_scaled()
/Linux-v4.19/arch/x86/kernel/
Dcheck.c97 start = clamp_t(phys_addr_t, round_up(start, PAGE_SIZE), in setup_bios_corruption_check()
99 end = clamp_t(phys_addr_t, round_down(end, PAGE_SIZE), in setup_bios_corruption_check()
/Linux-v4.19/drivers/platform/x86/
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-v4.19/drivers/staging/media/omap4iss/
Diss_ipipeif.c405 fmt->width = clamp_t(u32, width, 1, 8192); in ipipeif_try_format()
406 fmt->height = clamp_t(u32, height, 1, 8192); in ipipeif_try_format()
419 fmt->width = clamp_t(u32, width, 32, (fmt->width + 15) & ~15); in ipipeif_try_format()
421 fmt->height = clamp_t(u32, height, 32, fmt->height); in ipipeif_try_format()
429 fmt->width = clamp_t(u32, width, 32, fmt->width); in ipipeif_try_format()
430 fmt->height = clamp_t(u32, height, 32, fmt->height); in ipipeif_try_format()
Diss_ipipe.c223 fmt->width = clamp_t(u32, width, 1, 8192); in ipipe_try_format()
224 fmt->height = clamp_t(u32, height, 1, 8192); in ipipe_try_format()
233 fmt->width = clamp_t(u32, width, 32, fmt->width); in ipipe_try_format()
234 fmt->height = clamp_t(u32, height, 32, fmt->height); in ipipe_try_format()
Diss_resizer.c462 fmt->width = clamp_t(u32, width, 1, 8192); in resizer_try_format()
463 fmt->height = clamp_t(u32, height, 1, 8192); in resizer_try_format()
481 fmt->width = clamp_t(u32, width, 32, (fmt->width + 15) & ~15); in resizer_try_format()
483 fmt->height = clamp_t(u32, height, 32, fmt->height); in resizer_try_format()
/Linux-v4.19/drivers/media/platform/omap3isp/
Dispresizer.c813 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()
1391 fmt->width = clamp_t(u32, fmt->width, MIN_IN_WIDTH, in resizer_try_format()
1393 fmt->height = clamp_t(u32, fmt->height, MIN_IN_HEIGHT, in resizer_try_format()
Dispccp2.c266 vpclk_div = clamp_t(unsigned int, vpclk_div, 1, 65536); in ccp2_vp_config()
271 vpclk_div = clamp_t(unsigned int, vpclk_div, 1, 4); in ccp2_vp_config()
654 fmt->width = clamp_t(u32, fmt->width, in ccp2_try_format()
657 fmt->height = clamp_t(u32, fmt->height, in ccp2_try_format()
661 fmt->width = clamp_t(u32, fmt->width, in ccp2_try_format()
664 fmt->height = clamp_t(u32, fmt->height, in ccp2_try_format()
/Linux-v4.19/drivers/media/platform/xilinx/
Dxilinx-vip.c153 format->width = clamp_t(unsigned int, fmt->format.width, in xvip_set_format_size()
155 format->height = clamp_t(unsigned int, fmt->format.height, in xvip_set_format_size()
/Linux-v4.19/drivers/media/platform/qcom/camss/
Dcamss-video.c592 bytesperline[i] = clamp_t(u32, p->bytesperline, in __video_try_fmt()
594 sizeimage[i] = clamp_t(u32, p->sizeimage, in __video_try_fmt()
613 pix_mp->width = clamp_t(u32, width, 1, 8191); in __video_try_fmt()
614 pix_mp->height = clamp_t(u32, height, 1, 8191); in __video_try_fmt()
636 p->bytesperline = clamp_t(u32, p->bytesperline, in __video_try_fmt()
638 p->sizeimage = clamp_t(u32, p->sizeimage, in __video_try_fmt()
/Linux-v4.19/arch/powerpc/platforms/85xx/
Dp1022_rdk.c75 pxclk = clamp_t(u32, pxclk, 2, 255); in p1022rdk_set_pixel_clock()
Dt1042rdb_diu.c114 pxclk = clamp_t(u32, pxclk, 2, 255); in t1042rdb_set_pixel_clock()
/Linux-v4.19/lib/
Dnotifier-error-inject.c7 *(int *)data = clamp_t(int, val, -MAX_ERRNO, 0); in debugfs_errno_set()
/Linux-v4.19/drivers/gpu/drm/msm/
Dmsm_submitqueue.c114 clamp_t(uint32_t, 2, 0, priv->gpu->nr_rings - 1) : 0; in msm_submitqueue_init()
/Linux-v4.19/drivers/iio/magnetometer/
Dak8975.c718 *val = clamp_t(s16, buff, -def->range, def->range); in ak8975_read_axis()
841 buff[0] = clamp_t(s16, le16_to_cpu(fval[0]), -def->range, def->range); in ak8975_fill_buffer()
842 buff[1] = clamp_t(s16, le16_to_cpu(fval[1]), -def->range, def->range); in ak8975_fill_buffer()
843 buff[2] = clamp_t(s16, le16_to_cpu(fval[2]), -def->range, def->range); in ak8975_fill_buffer()
/Linux-v4.19/drivers/watchdog/
Dstmp3xxx_rtc_wdt.c96 stmp3xxx_wdd.timeout = clamp_t(unsigned, heartbeat, 1, STMP3XXX_MAX_TIMEOUT); in stmp3xxx_wdt_probe()
/Linux-v4.19/drivers/media/i2c/
Dmt9t001.c393 width = clamp_t(unsigned int, ALIGN(format->format.width, 2), in mt9t001_set_format()
397 height = clamp_t(unsigned int, ALIGN(format->format.height, 2), in mt9t001_set_format()
449 rect.width = clamp_t(unsigned int, ALIGN(sel->r.width, 2), in mt9t001_set_selection()
452 rect.height = clamp_t(unsigned int, ALIGN(sel->r.height, 2), in mt9t001_set_selection()
/Linux-v4.19/drivers/media/platform/vivid/
Dvivid-vid-out.c858 win->w.left = clamp_t(int, win->w.left, in vidioc_try_fmt_vid_out_overlay()
860 win->w.top = clamp_t(int, win->w.top, in vidioc_try_fmt_vid_out_overlay()
880 r->top = clamp_t(s32, r->top, 0, dev->display_height - 1); in vidioc_try_fmt_vid_out_overlay()
881 r->height = clamp_t(s32, r->height, 1, dev->display_height - r->top); in vidioc_try_fmt_vid_out_overlay()
882 r->left = clamp_t(u32, r->left, 0, dev->display_width - 1); in vidioc_try_fmt_vid_out_overlay()
883 r->width = clamp_t(u32, r->width, 1, dev->display_width - r->left); in vidioc_try_fmt_vid_out_overlay()
Dvivid-vid-cap.c1094 win->w.left = clamp_t(int, win->w.left, in vidioc_try_fmt_vid_overlay()
1096 win->w.top = clamp_t(int, win->w.top, in vidioc_try_fmt_vid_overlay()
1115 r->top = clamp_t(s32, r->top, 0, dev->fb_cap.fmt.height - 1); in vidioc_try_fmt_vid_overlay()
1116 r->height = clamp_t(s32, r->height, 1, dev->fb_cap.fmt.height - r->top); in vidioc_try_fmt_vid_overlay()
1117 r->left = clamp_t(u32, r->left, 0, dev->fb_cap.fmt.width - 1); in vidioc_try_fmt_vid_overlay()
1118 r->width = clamp_t(u32, r->width, 1, dev->fb_cap.fmt.width - r->left); in vidioc_try_fmt_vid_overlay()
1249 dev->overlay_cap_left = clamp_t(int, dev->overlay_cap_left, in vivid_vid_cap_s_fbuf()
1251 dev->overlay_cap_top = clamp_t(int, dev->overlay_cap_top, in vivid_vid_cap_s_fbuf()
1444 dev->tv_freq = clamp_t(unsigned, vf->frequency, MIN_TV_FREQ, MAX_TV_FREQ); in vivid_video_s_frequency()

1234567