Symbol: DIV_ROUND_CLOSEST
sys/dev/pci/drm/amd/amdgpu/amdgpu_pll.c
102
*ref_div = DIV_ROUND_CLOSEST(*ref_div * fb_div_max, *fb_div);
sys/dev/pci/drm/amd/amdgpu/amdgpu_pll.c
97
*ref_div = clamp(DIV_ROUND_CLOSEST(den, post_div), 1u, ref_div_max);
sys/dev/pci/drm/amd/amdgpu/amdgpu_pll.c
98
*fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
4999
lum = DIV_ROUND_CLOSEST(caps->luminance_data[0].luminance * brightness,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5036
lum = lower_lum + DIV_ROUND_CLOSEST((upper_lum - lower_lum) *
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5041
DIV_ROUND_CLOSEST(lum * brightness, 101));
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5238
props.brightness = DIV_ROUND_CLOSEST((max - min) * caps->ac_level, 100);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5240
props.brightness = DIV_ROUND_CLOSEST((max - min) * caps->dc_level, 100);
sys/dev/pci/drm/display/drm_dp_helper.c
4167
fxp = DIV_ROUND_CLOSEST(1000 * DP_EDP_BACKLIGHT_FREQ_BASE_KHZ, driver_pwm_freq_hz);
sys/dev/pci/drm/display/drm_dp_helper.c
4192
fxp_min = DIV_ROUND_CLOSEST(fxp * 3, 4);
sys/dev/pci/drm/display/drm_dp_helper.c
4193
fxp_max = DIV_ROUND_CLOSEST(fxp * 5, 4);
sys/dev/pci/drm/display/drm_dp_helper.c
4202
f = clamp(DIV_ROUND_CLOSEST(fxp, 1 << pn), 1, 255);
sys/dev/pci/drm/drm_edid.c
3352
return DIV_ROUND_CLOSEST(mode->clock, mode->htotal);
sys/dev/pci/drm/drm_edid.c
4312
clock = DIV_ROUND_CLOSEST(clock * 1001, 1000);
sys/dev/pci/drm/drm_edid.c
4314
clock = DIV_ROUND_CLOSEST(clock * 1000, 1001);
sys/dev/pci/drm/drm_edid.c
5470
q = DIV_ROUND_CLOSEST(min_cll, 255);
sys/dev/pci/drm/drm_edid.c
5471
min = max * DIV_ROUND_CLOSEST((q * q), 100);
sys/dev/pci/drm/i915/display/g4x_hdmi.c
191
dotclock = DIV_ROUND_CLOSEST(pipe_config->port_clock * 2, 3);
sys/dev/pci/drm/i915/display/i9xx_wm.c
102
DIV_ROUND_CLOSEST(dram_info->fsb_freq, 1000) == latency->fsb_freq &&
sys/dev/pci/drm/i915/display/i9xx_wm.c
103
DIV_ROUND_CLOSEST(dram_info->mem_freq, 1000) == latency->mem_freq)
sys/dev/pci/drm/i915/display/icl_dsi.c
356
return DIV_ROUND_CLOSEST(intel_dsi->pclk * bpp, intel_dsi->lane_count);
sys/dev/pci/drm/i915/display/intel_backlight.c
1048
return DIV_ROUND_CLOSEST(KHz(DISPLAY_RUNTIME_INFO(display)->rawclk_freq),
sys/dev/pci/drm/i915/display/intel_backlight.c
1057
return DIV_ROUND_CLOSEST(KHz(19200), pwm_freq_hz);
sys/dev/pci/drm/i915/display/intel_backlight.c
1075
return DIV_ROUND_CLOSEST(MHz(24), pwm_freq_hz * mul);
sys/dev/pci/drm/i915/display/intel_backlight.c
1099
return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * mul);
sys/dev/pci/drm/i915/display/intel_backlight.c
1110
return DIV_ROUND_CLOSEST(KHz(DISPLAY_RUNTIME_INFO(display)->rawclk_freq),
sys/dev/pci/drm/i915/display/intel_backlight.c
1132
return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * 32);
sys/dev/pci/drm/i915/display/intel_backlight.c
1150
return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * 128);
sys/dev/pci/drm/i915/display/intel_backlight.c
1174
return DIV_ROUND_CLOSEST(clock, pwm_freq_hz * mul);
sys/dev/pci/drm/i915/display/intel_bw.c
1154
new_bw_state->qgv_point_peakbw = DIV_ROUND_CLOSEST(qgv_peak_bw, 100);
sys/dev/pci/drm/i915/display/intel_bw.c
231
sp->dclk = DIV_ROUND_CLOSEST(16667 * dclk, 1000);
sys/dev/pci/drm/i915/display/intel_bw.c
376
return DIV_ROUND_CLOSEST(64 * clk * 100, 6);
sys/dev/pci/drm/i915/display/intel_bw.c
618
bi->peakbw[j] = DIV_ROUND_CLOSEST(sp->dclk *
sys/dev/pci/drm/i915/display/intel_cdclk.c
1077
return DIV_ROUND_CLOSEST(cdclk - 1000, 500);
sys/dev/pci/drm/i915/display/intel_cdclk.c
1553
return DIV_ROUND_CLOSEST(vco * cdclk_squash_divider(waveform),
sys/dev/pci/drm/i915/display/intel_cdclk.c
1786
cdclk_config->cdclk = DIV_ROUND_CLOSEST(hweight16(waveform) *
sys/dev/pci/drm/i915/display/intel_cdclk.c
1789
cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_config->vco, div);
sys/dev/pci/drm/i915/display/intel_cdclk.c
1817
int ratio = DIV_ROUND_CLOSEST(vco, display->cdclk.hw.ref);
sys/dev/pci/drm/i915/display/intel_cdclk.c
1846
int ratio = DIV_ROUND_CLOSEST(vco, display->cdclk.hw.ref);
sys/dev/pci/drm/i915/display/intel_cdclk.c
1864
int ratio = DIV_ROUND_CLOSEST(vco, display->cdclk.hw.ref);
sys/dev/pci/drm/i915/display/intel_cdclk.c
2077
mid_cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_squash_divider(mid_waveform) *
sys/dev/pci/drm/i915/display/intel_cdclk.c
2407
a_div = DIV_ROUND_CLOSEST(a->vco, a->cdclk);
sys/dev/pci/drm/i915/display/intel_cdclk.c
2408
b_div = DIV_ROUND_CLOSEST(b->vco, b->cdclk);
sys/dev/pci/drm/i915/display/intel_cdclk.c
3553
rawclk |= CNP_RAWCLK_DEN(DIV_ROUND_CLOSEST(numerator * 1000,
sys/dev/pci/drm/i915/display/intel_cdclk.c
3580
return DIV_ROUND_CLOSEST(intel_fsb_freq(i915), 4);
sys/dev/pci/drm/i915/display/intel_cdclk.c
425
cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_config->vco,
sys/dev/pci/drm/i915/display/intel_cdclk.c
504
cdclk_config->cdclk = DIV_ROUND_CLOSEST(cdclk_config->vco,
sys/dev/pci/drm/i915/display/intel_cdclk.c
602
return DIV_ROUND_CLOSEST(dev_priv->hpll_freq << 1, cdclk) - 1;
sys/dev/pci/drm/i915/display/intel_cdclk.c
718
divider = DIV_ROUND_CLOSEST(dev_priv->hpll_freq << 1,
sys/dev/pci/drm/i915/display/intel_cdclk.c
932
DIV_ROUND_CLOSEST(cdclk, 1000) - 1);
sys/dev/pci/drm/i915/display/intel_color.c
815
return DIV_ROUND_CLOSEST(val * ((1 << 16) - 1),
sys/dev/pci/drm/i915/display/intel_cx0_phy.c
2423
frac = frac_quot + DIV_ROUND_CLOSEST(frac_rem, frac_den);
sys/dev/pci/drm/i915/display/intel_cx0_phy.c
2427
ref = DIV_ROUND_CLOSEST(refclk * (1 << (1 + fb_clk_div4_en)), 1 << ref_clk_mpllb_div);
sys/dev/pci/drm/i915/display/intel_cx0_phy.c
2755
DIV_ROUND_CLOSEST(refclk * frac_rem, frac_den),
sys/dev/pci/drm/i915/display/intel_display.c
169
return DIV_ROUND_CLOSEST(ref_freq << 1, divider + 1);
sys/dev/pci/drm/i915/display/intel_display.c
4065
dotclock = DIV_ROUND_CLOSEST(pipe_config->port_clock * 24,
sys/dev/pci/drm/i915/display/intel_display.c
4159
linetime_wm = DIV_ROUND_CLOSEST(pipe_mode->crtc_htotal * 1000 * 8,
sys/dev/pci/drm/i915/display/intel_display.c
4175
linetime_wm = DIV_ROUND_CLOSEST(pipe_mode->crtc_htotal * 1000 * 8,
sys/dev/pci/drm/i915/display/intel_display_debugfs.c
463
DIV_ROUND_CLOSEST(BIT(row + 9), x), units);
sys/dev/pci/drm/i915/display/intel_display_power_well.c
1228
DIV_ROUND_CLOSEST(DISPLAY_RUNTIME_INFO(display)->rawclk_freq,
sys/dev/pci/drm/i915/display/intel_dp.c
172
return DIV_ROUND_CLOSEST(rate * 10, intel_dp_link_symbol_size(rate));
sys/dev/pci/drm/i915/display/intel_dp_aux.c
109
return DIV_ROUND_CLOSEST(freq, 2000);
sys/dev/pci/drm/i915/display/intel_dp_aux.c
88
return DIV_ROUND_CLOSEST(DISPLAY_RUNTIME_INFO(display)->rawclk_freq, 2000);
sys/dev/pci/drm/i915/display/intel_dpll.c
324
DIV_ROUND_CLOSEST(refclk * clock->m, clock->n);
sys/dev/pci/drm/i915/display/intel_dpll.c
326
DIV_ROUND_CLOSEST(clock->vco, clock->p);
sys/dev/pci/drm/i915/display/intel_dpll.c
342
DIV_ROUND_CLOSEST(refclk * clock->m, clock->n + 2);
sys/dev/pci/drm/i915/display/intel_dpll.c
344
DIV_ROUND_CLOSEST(clock->vco, clock->p);
sys/dev/pci/drm/i915/display/intel_dpll.c
355
DIV_ROUND_CLOSEST(refclk * clock->m, clock->n);
sys/dev/pci/drm/i915/display/intel_dpll.c
357
DIV_ROUND_CLOSEST(clock->vco, clock->p);
sys/dev/pci/drm/i915/display/intel_dpll.c
370
DIV_ROUND_CLOSEST(clock->vco, clock->p);
sys/dev/pci/drm/i915/display/intel_dpll.c
887
clock.m2 = DIV_ROUND_CLOSEST(target * clock.p * clock.n,
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
2906
dco_fraction = DIV_ROUND_CLOSEST(dco_fraction, 2);
sys/dev/pci/drm/i915/display/intel_hdmi.c
1923
return DIV_ROUND_CLOSEST(clock * bpc, 8);
sys/dev/pci/drm/i915/display/intel_link_bw.c
392
frac_val = DIV_ROUND_CLOSEST(frac_val, (int)int_pow(10, frac_digits));
sys/dev/pci/drm/i915/display/intel_panel.c
242
DIV_ROUND_CLOSEST(adjusted_mode->clock * 1000,
sys/dev/pci/drm/i915/display/intel_pch_refclk.c
147
return DIV_ROUND_CLOSEST(p->iclk_virtual_root_freq,
sys/dev/pci/drm/i915/display/intel_pch_refclk.c
162
p->desired_divisor = DIV_ROUND_CLOSEST(p->iclk_virtual_root_freq,
sys/dev/pci/drm/i915/display/intel_snps_phy.c
1945
DIV_ROUND_CLOSEST(refclk * frac_rem, frac_den),
sys/dev/pci/drm/i915/display/intel_sprite.c
157
contrast = DIV_ROUND_CLOSEST(255 << 6, 235 - 16);
sys/dev/pci/drm/i915/display/intel_sprite.c
158
brightness = -DIV_ROUND_CLOSEST(16 * 255, 235 - 16);
sys/dev/pci/drm/i915/display/intel_sprite.c
159
sh_scale = DIV_ROUND_CLOSEST(128 << 7, 240 - 128);
sys/dev/pci/drm/i915/display/vlv_dsi_pll.c
168
return DIV_ROUND_CLOSEST(dsi_clock * intel_dsi->lane_count, bpp);
sys/dev/pci/drm/i915/display/vlv_dsi_pll.c
357
return DIV_ROUND_CLOSEST(dsi_clk * intel_dsi->lane_count, bpp);
sys/dev/pci/drm/i915/display/vlv_dsi_pll.c
406
div1_value = DIV_ROUND_CLOSEST(ddr_clk, 20000);
sys/dev/pci/drm/i915/display/vlv_dsi_pll.c
57
dsi_clk_khz = DIV_ROUND_CLOSEST(pclk * bpp, lane_count);
sys/dev/pci/drm/i915/gt/intel_gt_clock_utils.c
151
return DIV_ROUND_CLOSEST(intel_fsb_freq(uncore->i915), 4) * 1000;
sys/dev/pci/drm/i915/gt/intel_llc.c
116
ia_freq = DIV_ROUND_CLOSEST(ia_freq, 100);
sys/dev/pci/drm/i915/gt/intel_rps.c
1634
return DIV_ROUND_CLOSEST(rps->gpll_ref_freq * (val - 0xb7), 1000);
sys/dev/pci/drm/i915/gt/intel_rps.c
1639
return DIV_ROUND_CLOSEST(1000 * val, rps->gpll_ref_freq) + 0xb7;
sys/dev/pci/drm/i915/gt/intel_rps.c
1648
return DIV_ROUND_CLOSEST(rps->gpll_ref_freq * val, 2 * 2 * 1000);
sys/dev/pci/drm/i915/gt/intel_rps.c
1654
return DIV_ROUND_CLOSEST(2 * 1000 * val, rps->gpll_ref_freq) * 2;
sys/dev/pci/drm/i915/gt/intel_rps.c
1662
return DIV_ROUND_CLOSEST(val * GT_FREQUENCY_MULTIPLIER,
sys/dev/pci/drm/i915/gt/intel_rps.c
1679
return DIV_ROUND_CLOSEST(val * GEN9_FREQ_SCALER,
sys/dev/pci/drm/i915/gt/intel_rps.c
1686
return DIV_ROUND_CLOSEST(val, GT_FREQUENCY_MULTIPLIER);
sys/dev/pci/drm/i915/gt/intel_rps.c
2230
return DIV_ROUND_CLOSEST(slpc->rp0_freq,
sys/dev/pci/drm/i915/gt/intel_rps.c
2550
return DIV_ROUND_CLOSEST(slpc->min_freq,
sys/dev/pci/drm/i915/gt/intel_rps.c
301
cparams[i].t == DIV_ROUND_CLOSEST(mem_freq, 1000)) {
sys/dev/pci/drm/i915/gt/selftest_slpc.c
9
#define FREQUENCY_REQ_UNIT DIV_ROUND_CLOSEST(GT_FREQUENCY_MULTIPLIER, \
sys/dev/pci/drm/i915/gt/uc/intel_guc_slpc.c
377
return DIV_ROUND_CLOSEST(REG_FIELD_GET(SLPC_MIN_UNSLICE_FREQ_MASK,
sys/dev/pci/drm/i915/gt/uc/intel_guc_slpc.c
388
return DIV_ROUND_CLOSEST(REG_FIELD_GET(SLPC_MAX_UNSLICE_FREQ_MASK,
sys/dev/pci/drm/i915/gvt/handlers.c
605
clock.dot = DIV_ROUND_CLOSEST(clock.vco, clock.p);
sys/dev/pci/drm/i915/i915_hwmon.c
372
*val = DIV_ROUND_CLOSEST(REG_FIELD_GET(GEN12_VOLTAGE_MASK, reg_value) * 25, 10);
sys/dev/pci/drm/i915/selftests/i915_request.c
1956
return DIV_ROUND_CLOSEST(ns, 1 << TF_BIAS);
sys/dev/pci/drm/include/drm/drm_color_mgmt.h
49
return DIV_ROUND_CLOSEST(user_input * ((1 << bit_precision) - 1),
sys/dev/pci/drm/include/linux/math.h
16
#define DIV_ROUND_CLOSEST_ULL(x, y) DIV_ROUND_CLOSEST(x, y)
sys/dev/pci/drm/radeon/radeon_display.c
933
*fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den);