/linux/drivers/macintosh/ |
H A D | windfarm_cpufreq_clamp.c | 66 struct wf_control *clamp; in wf_cpufreq_clamp_init() local 97 clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL); in wf_cpufreq_clamp_init() 98 if (clamp == NULL) { in wf_cpufreq_clamp_init() 103 clamp->ops = &clamp_ops; in wf_cpufreq_clamp_init() 104 clamp->name = "cpufreq-clamp"; in wf_cpufreq_clamp_init() 105 ret = wf_register_control(clamp); in wf_cpufreq_clamp_init() 109 clamp_control = clamp; in wf_cpufreq_clamp_init() 113 kfree(clamp); in wf_cpufreq_clamp_init() 132 MODULE_DESCRIPTION("CPU frequency clamp for PowerMacs thermal control");
|
/linux/samples/bpf/ |
H A D | tcp_clamp_kern.c | 7 * Sample BPF program to set send and receive buffers to 150KB, sndcwnd clamp 30 int clamp = 100; in bpf_clamp() local 71 &clamp, sizeof(clamp)); in bpf_clamp() 77 &clamp, sizeof(clamp)); in bpf_clamp()
|
/linux/Documentation/scheduler/ |
H A D | sched-util-clamp.rst | 10 Utilization clamping, also known as util clamp or uclamp, is a scheduler 18 used, util clamp will influence the CPU frequency selection as well. 21 util clamp acts on that to achieve its goal by clamping the signal to a certain 25 The right way to view util clamp is as a mechanism to make request or hint on 42 As an example, a game can use util clamp to form a feedback loop with its 57 foreground, top-app, etc. Util clamp can be used to constrain how much 115 :ref:`3.4.1 <sched-util-clamp-min-rt-default>` on how to change RT tasks 121 Util clamp is a property of every task in the system. It sets the boundaries of 130 Since the goal of util clamp is to allow requesting a minimum and maximum 142 To be able to aggregate the util clamp value of all the tasks attached to the [all …]
|
/linux/drivers/hid/ |
H A D | hid-lgff.c | 65 #define CLAMP(x) if (x < 0) x = 0; if (x > 0xff) x = 0xff in hid_lgff_play() macro 71 CLAMP(x); in hid_lgff_play() 72 CLAMP(y); in hid_lgff_play() 86 CLAMP(left); in hid_lgff_play() 87 CLAMP(right); in hid_lgff_play()
|
/linux/arch/arm/mach-qcom/ |
H A D | platsmp.c | 33 #define CLAMP BIT(0) macro 103 reg_val = CORE_RST | COREPOR_RST | CLAMP | CORE_MEM_CLAMP; in cortex_a7_release_secondary() 117 reg_val = (reg_val | BIT(17)) & ~CLAMP; in cortex_a7_release_secondary() 176 val = PLL_CLAMP | L2DT_SLP | CLAMP; in kpssv1_release_secondary() 188 val &= ~CLAMP; in kpssv1_release_secondary() 279 reg_val = COREPOR_RST | CLAMP; in kpssv2_release_secondary() 284 reg_val &= ~CLAMP; in kpssv2_release_secondary()
|
/linux/drivers/staging/media/atomisp/pci/isp/kernels/xnr/xnr_3.0/ |
H A D | ia_css_xnr3.host.c | 102 return clamp(isp_coring, 0, isp_scale - 1); in compute_coring() 162 to->alpha.ydiff = clamp(alpha_ydiff, min_diff, max_diff); in ia_css_xnr3_encode() 163 to->alpha.udiff = clamp(alpha_udiff, min_diff, max_diff); in ia_css_xnr3_encode() 164 to->alpha.vdiff = clamp(alpha_vdiff, min_diff, max_diff); in ia_css_xnr3_encode() 169 to->coring.udiff = clamp(coring_udiff, min_diff, max_diff); in ia_css_xnr3_encode() 170 to->coring.vdiff = clamp(coring_vdiff, min_diff, max_diff); in ia_css_xnr3_encode()
|
/linux/drivers/media/platform/ti/omap3isp/ |
H A D | ispccdc.h | 109 * @obclamp: Optical-black clamp enabled (1) or disabled (0) 112 * @clamp: Optical-black or digital clamp configuration 142 struct omap3isp_ccdc_bclamp clamp; member
|
H A D | ispccdc.c | 83 CCDC_PRINT_REGISTER(isp, CLAMP); in ccdc_print_status() 530 * The CCDC performs either optical-black or digital clamp. Configure and enable 531 * the selected clamp method. 536 u32 clamp; in ccdc_configure_clamp() local 539 clamp = ccdc->clamp.obgain << ISPCCDC_CLAMP_OBGAIN_SHIFT; in ccdc_configure_clamp() 540 clamp |= ccdc->clamp.oblen << ISPCCDC_CLAMP_OBSLEN_SHIFT; in ccdc_configure_clamp() 541 clamp |= ccdc->clamp.oblines << ISPCCDC_CLAMP_OBSLN_SHIFT; in ccdc_configure_clamp() 542 clamp |= ccdc->clamp.obstpixel << ISPCCDC_CLAMP_OBST_SHIFT; in ccdc_configure_clamp() 543 isp_reg_writel(isp, clamp, OMAP3_ISP_IOMEM_CCDC, ISPCCDC_CLAMP); in ccdc_configure_clamp() 545 isp_reg_writel(isp, ccdc->clamp.dcsubval, in ccdc_configure_clamp() [all …]
|
/linux/drivers/media/usb/pwc/ |
H A D | pwc-dec23.c | 278 #define CLAMP(x) (pwc_crop_table[MAX_OUTER_CROP_VALUE+(x)]) macro 280 #define CLAMP(x) ((x)>255?255:((x)<0?0:x)) macro 333 /* Build the static table to clamp value [0-255] */ in pwc_dec23_init() 383 *d++ = CLAMP((*c) >> scalebits); in copy_image_block_Y() 387 *d++ = CLAMP((*c) >> scalebits); in copy_image_block_Y() 391 *d++ = CLAMP((*c) >> scalebits); in copy_image_block_Y() 395 *d++ = CLAMP((*c) >> scalebits); in copy_image_block_Y() 436 *d++ = CLAMP((*c1) >> scalebits); in copy_image_block_CrCb() 437 *d++ = CLAMP((*c2) >> scalebits); in copy_image_block_CrCb() 442 *d++ = CLAMP((*c1) >> scalebits); in copy_image_block_CrCb() [all …]
|
/linux/include/linux/ |
H A D | minmax.h | 11 * min()/max()/clamp() macros must accomplish several things: 189 "clamp() low limit " #lo " greater than high limit " #hi); \ 191 "clamp("#val", "#lo", "#hi") signedness error"); \ 198 * clamp - return a value clamped to a given range with typechecking macro 206 #define clamp(val, lo, hi) __careful_clamp(__auto_type, val, lo, hi)
|
/linux/drivers/platform/x86/ |
H A D | intel_ips.c | 24 * we scale back the clamp. Aside from trigger events (when we're critically 29 * are updated by the ME firmware. The ME should also take the clamp values 356 * ips_cpu_raise - raise CPU power clamp 359 * Raise the CPU power clamp by %IPS_CPU_STEP, in accordance with TDP for 378 /* Clamp to SKU TDP limit */ in ips_cpu_raise() 394 * ips_cpu_lower - lower CPU power clamp 397 * Lower CPU power clamp b %IPS_CPU_STEP if possible. 413 /* Clamp to SKU TDP limit */ in ips_cpu_lower() 523 * ips_gpu_raise - raise GPU power clamp 541 * ips_gpu_lower - lower GPU power clamp [all …]
|
/linux/drivers/net/can/spi/mcp251xfd/ |
H A D | mcp251xfd-ram.c | 18 return clamp(val, obj->min, max); in can_ram_clamp() 120 num_rx_coalesce = clamp(ec->rx_max_coalesced_frames_irq, in can_ram_get_layout() 143 num_tx_coalesce = clamp(ec->tx_max_coalesced_frames_irq, in can_ram_get_layout()
|
/linux/drivers/media/pci/solo6x10/ |
H A D | solo6x10-offsets.h | 60 clamp(__solo->sdram_size - SOLO_MP4E_EXT_ADDR(__solo) - \ 68 clamp(__solo->sdram_size - SOLO_JPEG_EXT_ADDR(__solo), \
|
/linux/drivers/power/supply/ |
H A D | bq256xx_charger.c | 517 ichg = clamp(ichg, BQ256XX_ICHG_MIN_uA, ichg_max); in bq256xx_set_ichg_curr() 530 ichg = clamp(ichg, BQ25618_ICHG_MIN_uA, ichg_max); in bq25618_619_set_ichg_curr() 630 vbatreg = clamp(vbatreg, BQ25618_VBATREG_MIN_uV, vbatreg_max); in bq25618_619_set_chrg_volt() 652 vbatreg = clamp(vbatreg, BQ25611D_VBATREG_MIN_uV, vbatreg_max); in bq25611d_set_chrg_volt() 673 vbatreg = clamp(vbatreg, BQ2560X_VBATREG_MIN_uV, vbatreg_max); in bq2560x_set_chrg_volt() 688 vbatreg = clamp(vbatreg, BQ25601D_VBATREG_MIN_uV, vbatreg_max); in bq25601d_set_chrg_volt() 726 iprechg = clamp(iprechg, BQ256XX_IPRECHG_MIN_uA, in bq256xx_set_prechrg_curr() 758 iprechg = clamp(iprechg, BQ25618_IPRECHG_MIN_uA, in bq25618_619_set_prechrg_curr() 789 iterm = clamp(iterm, BQ256XX_ITERM_MIN_uA, BQ256XX_ITERM_MAX_uA); in bq256xx_set_term_curr() 819 iterm = clamp(iterm, BQ25618_ITERM_MIN_uA, BQ25618_ITERM_MAX_uA); in bq25618_619_set_term_curr() [all …]
|
/linux/drivers/media/platform/renesas/vsp1/ |
H A D | vsp1_uds.c | 180 fmt->width = clamp(fmt->width, UDS_MIN_SIZE, UDS_MAX_SIZE); in uds_try_format() 181 fmt->height = clamp(fmt->height, UDS_MIN_SIZE, UDS_MAX_SIZE); in uds_try_format() 190 fmt->width = clamp(fmt->width, minimum, maximum); in uds_try_format() 192 fmt->height = clamp(fmt->height, minimum, maximum); in uds_try_format() 340 * To support overlapping partition windows we clamp at units of 256 and in uds_max_width()
|
/linux/drivers/staging/media/atomisp/pci/isp/kernels/eed1_8/ |
H A D | ia_css_eed1_8.host.c | 166 to->e_dew_enh_x[0][base + j] = clamp(from->dew_enhance_seg_x[j], in ia_css_eed1_8_vmem_encode() 168 to->e_dew_enh_y[0][base + j] = clamp(from->dew_enhance_seg_y[j], in ia_css_eed1_8_vmem_encode() 173 to->e_dew_enh_a[0][base + j] = clamp(from->dew_enhance_seg_slope[j], in ia_css_eed1_8_vmem_encode() 179 to->e_dew_enh_f[0][base + j] = clamp(from->dew_enhance_seg_exp[j], in ia_css_eed1_8_vmem_encode() 266 to->e_dew_enh_asr = 13 - clamp(min_exp, 0, 13); in ia_css_eed1_8_encode()
|
/linux/drivers/clk/ |
H A D | clk-plldig.c | 132 div = clamp(div, 1UL, MAX_RFDPHI1); in plldig_calc_target_div() 143 req->rate = clamp(req->rate, PHI1_MIN_FREQ, PHI1_MAX_FREQ); in plldig_determine_rate() 157 rate = clamp(rate, PHI1_MIN_FREQ, PHI1_MAX_FREQ); in plldig_set_rate()
|
/linux/drivers/iio/chemical/ |
H A D | sgp40.c | 178 ticks16 = (u16)clamp(ticks, 0u, 65535u); /* clamp between 0 .. 100 %rH */ in sgp40_measure_resistance_raw() 183 ticks16 = (u16)clamp(ticks, 0u, 65535u); /* clamp between -45 .. +130 °C */ in sgp40_measure_resistance_raw()
|
/linux/mm/ |
H A D | memtest.c | 80 this_start = clamp(this_start, start, end); in do_one_pass() 81 this_end = clamp(this_end, start, end); in do_one_pass()
|
/linux/fs/btrfs/ |
H A D | space-info.h | 131 int clamp; /* Used to scale our threshold for preemptive member 132 flushing. The value is >> clamp, so turns 133 out to be a 2^clamp divisor. */
|
/linux/drivers/clk/mxs/ |
H A D | clk-ref.c | 69 frac = clamp(tmp, 18, 35); in clk_ref_round_rate() 89 frac = clamp(tmp, 18, 35); in clk_ref_set_rate()
|
/linux/drivers/gpu/drm/amd/display/dc/dce/ |
H A D | dce_transform.c | 575 * @param depth : bit depth to set the clamp to (should match denorm) 578 * Programs clamp according to panel bit depth. 587 /* At the clamp block the data will be MSB aligned, so we set the max in set_clamp() 588 * clamp accordingly. in set_clamp() 611 BREAK_TO_DEBUGGER(); /* Invalid clamp bit depth */ in set_clamp() 782 * Programs the DCP bit depth reduction registers (Clamp, Round/Truncate, 785 * @param depth : bit depth to set the clamp to (should match denorm) 797 ASSERT(depth <= COLOR_DEPTH_121212); /* Invalid clamp bit depth */ in program_bit_depth_reduction() 842 * Programs the DCP bit depth reduction registers (Clamp, Round/Truncate, 845 * @param depth : bit depth to set the clamp to (should match denorm) [all …]
|
/linux/sound/soc/codecs/ |
H A D | arizona-jack.c | 98 bool clamp) in arizona_extcon_hp_clamp() argument 114 if (clamp) { in arizona_extcon_hp_clamp() 131 if (clamp) in arizona_extcon_hp_clamp() 138 arizona->hpdet_clamp = clamp; in arizona_extcon_hp_clamp() 140 /* Keep the HP output stages disabled while doing the clamp */ in arizona_extcon_hp_clamp() 141 if (clamp) { in arizona_extcon_hp_clamp() 154 dev_warn(arizona->dev, "Failed to do clamp: %d\n", ret); in arizona_extcon_hp_clamp() 159 dev_warn(arizona->dev, "Failed to do clamp: %d\n", ret); in arizona_extcon_hp_clamp() 162 /* Restore the desired state while not doing the clamp */ in arizona_extcon_hp_clamp() 163 if (!clamp) { in arizona_extcon_hp_clamp() [all …]
|
/linux/kernel/time/ |
H A D | ntp.c | 292 offset = clamp(offset, -USEC_PER_SEC, USEC_PER_SEC); in ntp_update_offset() 296 /* Scale the phase adjustment and clamp to the operating range. */ in ntp_update_offset() 297 offset = clamp(offset, -MAXPHASE, MAXPHASE); in ntp_update_offset() 314 * Clamp update interval to reduce PLL gain with low in ntp_update_offset() 734 ntpdata->time_maxerror = clamp(txc->maxerror, 0, NTP_PHASE_LIMIT); in process_adjtimex_modes() 737 ntpdata->time_esterror = clamp(txc->esterror, 0, NTP_PHASE_LIMIT); in process_adjtimex_modes() 740 ntpdata->time_constant = clamp(txc->constant, 0, MAXTC); in process_adjtimex_modes() 743 ntpdata->time_constant = clamp(ntpdata->time_constant, 0, MAXTC); in process_adjtimex_modes()
|
/linux/drivers/media/platform/sunxi/sun4i-csi/ |
H A D | sun4i_v4l2.c | 116 /* Clamp the width and height to our capabilities */ in _sun4i_csi_try_fmt() 117 pix->width = clamp(width, _fmt->hsub, CSI_MAX_WIDTH); in _sun4i_csi_try_fmt() 118 pix->height = clamp(height, _fmt->vsub, CSI_MAX_HEIGHT); in _sun4i_csi_try_fmt()
|