| /Linux-v5.4/drivers/media/platform/s5p-mfc/ |
| D | s5p_mfc_opr_v6.h | 20 #define MB_WIDTH(x_size) DIV_ROUND_UP(x_size, 16) 21 #define MB_HEIGHT(y_size) DIV_ROUND_UP(y_size, 16) 26 #define S5P_MFC_LCU_WIDTH(x_size) DIV_ROUND_UP(x_size, 32) 27 #define S5P_MFC_LCU_HEIGHT(y_size) DIV_ROUND_UP(y_size, 32) 30 (DIV_ROUND_UP(x, 64) * DIV_ROUND_UP(y, 64) * 256 + 512)
|
| D | regs-mfc-v10.h | 69 + ((y * 64) + 1280) * DIV_ROUND_UP(x, 8)) 73 + (DIV_ROUND_UP(x * y, 64) * 32)) 77 + (DIV_ROUND_UP(x * y, 128) * 16)) 84 + ((y * 128) + 1280) * DIV_ROUND_UP(x, 4))
|
| D | regs-mfc-v8.h | 111 ((DIV_ROUND_UP((mbw * 16), 64) * DIV_ROUND_UP((mbh * 16), 64) * 256) \ 112 + (DIV_ROUND_UP((mbw) * (mbh), 32) * 16))
|
| /Linux-v5.4/drivers/gpu/drm/selftests/ |
| D | test-drm_framebuffer.c | 187 .handles = { 1, 1, 1 }, .pitches = { MAX_WIDTH, DIV_ROUND_UP(MAX_WIDTH, 2), 188 DIV_ROUND_UP(MAX_WIDTH, 2) }, 193 .handles = { 1, 1, 1 }, .pitches = { MAX_WIDTH, DIV_ROUND_UP(MAX_WIDTH, 2) - 1, 194 DIV_ROUND_UP(MAX_WIDTH, 2) }, 199 .handles = { 1, 1, 1 }, .pitches = { MAX_WIDTH, DIV_ROUND_UP(MAX_WIDTH, 2) + 1, 200 DIV_ROUND_UP(MAX_WIDTH, 2) + 7 }, 207 .pitches = { MAX_WIDTH, DIV_ROUND_UP(MAX_WIDTH, 2) + 1, DIV_ROUND_UP(MAX_WIDTH, 2) + 7 }, 213 .pitches = { MAX_WIDTH, DIV_ROUND_UP(MAX_WIDTH, 2), DIV_ROUND_UP(MAX_WIDTH, 2) }, 219 .pitches = { MAX_WIDTH, DIV_ROUND_UP(MAX_WIDTH, 2), DIV_ROUND_UP(MAX_WIDTH, 2) }, 226 .pitches = { MAX_WIDTH, DIV_ROUND_UP(MAX_WIDTH, 2), DIV_ROUND_UP(MAX_WIDTH, 2) }, [all …]
|
| /Linux-v5.4/include/linux/ |
| D | rcu_node_tree.h | 62 # define NUM_RCU_LVL_1 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_1) 70 # define NUM_RCU_LVL_1 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_2) 71 # define NUM_RCU_LVL_2 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_1) 79 # define NUM_RCU_LVL_1 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_3) 80 # define NUM_RCU_LVL_2 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_2) 81 # define NUM_RCU_LVL_3 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_1)
|
| /Linux-v5.4/drivers/media/i2c/ |
| D | smiapp-pll.c | 198 DIV_ROUND_UP(limits->max_pll_multiplier, mul)); in __smiapp_pll_calculate() 203 more_mul_min = DIV_ROUND_UP(limits->min_pll_op_freq_hz, in __smiapp_pll_calculate() 210 DIV_ROUND_UP(limits->min_pll_multiplier, mul)); in __smiapp_pll_calculate() 286 min_vt_div = DIV_ROUND_UP(op_pll->pix_clk_div * op_pll->sys_clk_div in __smiapp_pll_calculate() 294 DIV_ROUND_UP(pll->pll_op_clk_freq_hz, in __smiapp_pll_calculate() 306 DIV_ROUND_UP(pll->pll_op_clk_freq_hz, in __smiapp_pll_calculate() 318 DIV_ROUND_UP(min_vt_div, in __smiapp_pll_calculate() 331 DIV_ROUND_UP(max_vt_div, in __smiapp_pll_calculate() 335 DIV_ROUND_UP(pll->pll_op_clk_freq_hz, in __smiapp_pll_calculate() 349 uint16_t pix_div = DIV_ROUND_UP(vt_div, sys_div); in __smiapp_pll_calculate() [all …]
|
| D | aptina-pll.c | 56 mf_min = DIV_ROUND_UP(limits->m_min, pll->m); in aptina_pll_calculate() 63 mf_max = min(mf_max, DIV_ROUND_UP(limits->n_max * limits->p1_max, div)); in aptina_pll_calculate() 128 p1_min = max(limits->p1_min, DIV_ROUND_UP(limits->out_clock_min * div, in aptina_pll_calculate() 138 mf_low = roundup(max(mf_min, DIV_ROUND_UP(pll->ext_clock * p1, in aptina_pll_calculate()
|
| /Linux-v5.4/drivers/staging/media/hantro/ |
| D | hantro.h | 30 #define VP8_MB_WIDTH(w) DIV_ROUND_UP(w, VP8_MB_DIM) 31 #define VP8_MB_HEIGHT(h) DIV_ROUND_UP(h, VP8_MB_DIM) 34 #define H264_MB_WIDTH(w) DIV_ROUND_UP(w, H264_MB_DIM) 35 #define H264_MB_HEIGHT(h) DIV_ROUND_UP(h, H264_MB_DIM) 38 #define MPEG2_MB_WIDTH(w) DIV_ROUND_UP(w, MPEG2_MB_DIM) 39 #define MPEG2_MB_HEIGHT(h) DIV_ROUND_UP(h, MPEG2_MB_DIM) 42 #define JPEG_MB_WIDTH(w) DIV_ROUND_UP(w, JPEG_MB_DIM) 43 #define JPEG_MB_HEIGHT(h) DIV_ROUND_UP(h, JPEG_MB_DIM)
|
| /Linux-v5.4/drivers/gpu/drm/ |
| D | drm_dsc.c | 270 groups_per_line = DIV_ROUND_UP(vdsc_cfg->slice_width / 2, in drm_dsc_compute_rc_parameters() 274 vdsc_cfg->slice_chunk_size = DIV_ROUND_UP(vdsc_cfg->slice_width / 2 * in drm_dsc_compute_rc_parameters() 279 groups_per_line = DIV_ROUND_UP(vdsc_cfg->slice_width, in drm_dsc_compute_rc_parameters() 283 vdsc_cfg->slice_chunk_size = DIV_ROUND_UP(vdsc_cfg->slice_width * in drm_dsc_compute_rc_parameters() 334 vdsc_cfg->nfl_bpg_offset = DIV_ROUND_UP((vdsc_cfg->first_line_bpg_offset << 11), in drm_dsc_compute_rc_parameters() 349 vdsc_cfg->slice_bpg_offset = DIV_ROUND_UP(((vdsc_cfg->rc_model_size - in drm_dsc_compute_rc_parameters() 385 DIV_ROUND_UP(vdsc_cfg->initial_xmit_delay * in drm_dsc_compute_rc_parameters() 389 hrd_delay = DIV_ROUND_UP((rbs_min * 16), vdsc_cfg->bits_per_pixel); in drm_dsc_compute_rc_parameters()
|
| /Linux-v5.4/tools/include/linux/ |
| D | bitops.h | 17 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) 18 #define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u64)) 19 #define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32)) 20 #define BITS_TO_BYTES(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE)
|
| /Linux-v5.4/drivers/ssb/ |
| D | driver_extif.c | 94 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; in ssb_extif_timing_init() 95 tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT; in ssb_extif_timing_init() 96 tmp |= DIV_ROUND_UP(120, ns); in ssb_extif_timing_init() 100 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; in ssb_extif_timing_init() 101 tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT; in ssb_extif_timing_init() 102 tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; in ssb_extif_timing_init() 103 tmp |= DIV_ROUND_UP(120, ns); in ssb_extif_timing_init()
|
| D | driver_chipcommon.c | 443 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */ in ssb_chipco_timing_init() 444 tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 40ns */ in ssb_chipco_timing_init() 445 tmp |= DIV_ROUND_UP(240, ns); /* Waitcount-0 = 240ns */ in ssb_chipco_timing_init() 449 tmp = DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_3_SHIFT; /* Waitcount-3 = 10nS */ in ssb_chipco_timing_init() 450 tmp |= DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_1_SHIFT; /* Waitcount-1 = 10nS */ in ssb_chipco_timing_init() 451 tmp |= DIV_ROUND_UP(120, ns); /* Waitcount-0 = 120nS */ in ssb_chipco_timing_init() 462 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */ in ssb_chipco_timing_init() 463 tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT; /* Waitcount-2 = 20ns */ in ssb_chipco_timing_init() 464 tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 100ns */ in ssb_chipco_timing_init() 465 tmp |= DIV_ROUND_UP(120, ns); /* Waitcount-0 = 120ns */ in ssb_chipco_timing_init()
|
| /Linux-v5.4/drivers/ata/ |
| D | pata_bk3710.c | 75 t0 = DIV_ROUND_UP(pata_bk3710_udmatimings[mode].cycletime, in pata_bk3710_setudmamode() 77 tenv = DIV_ROUND_UP(20, ideclk_period) - 1; in pata_bk3710_setudmamode() 78 trp = DIV_ROUND_UP(pata_bk3710_udmatimings[mode].rptime, in pata_bk3710_setudmamode() 115 t0 = DIV_ROUND_UP(cycletime, ideclk_period); in pata_bk3710_setmwdmamode() 116 td = DIV_ROUND_UP(t->active, ideclk_period); in pata_bk3710_setmwdmamode() 160 t0 = DIV_ROUND_UP(cycletime, ideclk_period); in pata_bk3710_setpiomode() 161 t2 = DIV_ROUND_UP(t->active, ideclk_period); in pata_bk3710_setpiomode() 183 t0 = DIV_ROUND_UP(t->cyc8b, ideclk_period); in pata_bk3710_setpiomode() 184 t2 = DIV_ROUND_UP(t->act8b, ideclk_period); in pata_bk3710_setpiomode()
|
| /Linux-v5.4/drivers/ide/ |
| D | palm_bk3710.c | 72 t0 = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].cycletime, in palm_bk3710_setudmamode() 74 tenv = DIV_ROUND_UP(20, ideclk_period) - 1; in palm_bk3710_setudmamode() 75 trp = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].rptime, in palm_bk3710_setudmamode() 112 t0 = DIV_ROUND_UP(cycletime, ideclk_period); in palm_bk3710_setdmamode() 113 td = DIV_ROUND_UP(t->active, ideclk_period); in palm_bk3710_setdmamode() 141 t0 = DIV_ROUND_UP(cycletime, ideclk_period); in palm_bk3710_setpiomode() 142 t2 = DIV_ROUND_UP(t->active, ideclk_period); in palm_bk3710_setpiomode() 163 t0 = DIV_ROUND_UP(t->cyc8b, ideclk_period); in palm_bk3710_setpiomode() 164 t2 = DIV_ROUND_UP(t->act8b, ideclk_period); in palm_bk3710_setpiomode()
|
| /Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
| D | ktls.h | 17 (DIV_ROUND_UP(MLX5E_KTLS_STATIC_UMR_WQE_SZ, MLX5_SEND_WQE_BB)) 23 (DIV_ROUND_UP(MLX5E_KTLS_PROGRESS_WQE_SZ, MLX5_SEND_WQE_BB)) 31 (DIV_ROUND_UP(sizeof(struct mlx5e_dump_wqe), MLX5_SEND_WQE_BB)) 105 (nfrags + DIV_ROUND_UP(sync_len, sq->hw_mtu)); in mlx5e_ktls_dumps_num_wqebbs()
|
| /Linux-v5.4/lib/dim/ |
| D | dim.c | 71 curr_stats->ppms = DIV_ROUND_UP(npkts * USEC_PER_MSEC, delta_us); in dim_calc_stats() 72 curr_stats->bpms = DIV_ROUND_UP(nbytes * USEC_PER_MSEC, delta_us); in dim_calc_stats() 73 curr_stats->epms = DIV_ROUND_UP(DIM_NEVENTS * USEC_PER_MSEC, in dim_calc_stats() 75 curr_stats->cpms = DIV_ROUND_UP(ncomps * USEC_PER_MSEC, delta_us); in dim_calc_stats()
|
| /Linux-v5.4/drivers/irqchip/ |
| D | irq-gic.c | 76 u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)]; 77 u32 saved_spi_active[DIV_ROUND_UP(1020, 32)]; 78 u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)]; 79 u32 saved_spi_target[DIV_ROUND_UP(1020, 4)]; 592 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 16); i++) in gic_dist_save() 596 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++) in gic_dist_save() 600 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 32); i++) in gic_dist_save() 604 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 32); i++) in gic_dist_save() 633 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 16); i++) in gic_dist_restore() 637 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++) in gic_dist_restore() [all …]
|
| /Linux-v5.4/drivers/net/ethernet/mscc/ |
| D | ocelot_police.c | 74 cir = DIV_ROUND_UP(cir, 100); in qos_policer_conf_set() 76 cbs = DIV_ROUND_UP(cbs, 4096); in qos_policer_conf_set() 88 pir = DIV_ROUND_UP(pir, 100); in qos_policer_conf_set() 90 pbs = DIV_ROUND_UP(pbs, 4096); in qos_policer_conf_set() 98 pir = DIV_ROUND_UP(pir, 100); in qos_policer_conf_set()
|
| /Linux-v5.4/drivers/memory/ |
| D | emif.c | 437 val = max(min_tck->tWTR, DIV_ROUND_UP(timings->tWTR, t_ck)) - 1; in get_sdram_tim_1_shdw() 441 val = DIV_ROUND_UP(timings->tFAW, t_ck*4); in get_sdram_tim_1_shdw() 443 val = max(min_tck->tRRD, DIV_ROUND_UP(timings->tRRD, t_ck)); in get_sdram_tim_1_shdw() 446 val = DIV_ROUND_UP(timings->tRAS_min + timings->tRPab, t_ck) - 1; in get_sdram_tim_1_shdw() 449 val = max(min_tck->tRASmin, DIV_ROUND_UP(timings->tRAS_min, t_ck)); in get_sdram_tim_1_shdw() 452 val = max(min_tck->tWR, DIV_ROUND_UP(timings->tWR, t_ck)) - 1; in get_sdram_tim_1_shdw() 455 val = max(min_tck->tRCD, DIV_ROUND_UP(timings->tRCD, t_ck)) - 1; in get_sdram_tim_1_shdw() 458 val = max(min_tck->tRPab, DIV_ROUND_UP(timings->tRPab, t_ck)) - 1; in get_sdram_tim_1_shdw() 470 val = max(min_tck->tWTR, DIV_ROUND_UP(timings->tWTR, t_ck)) - 1; in get_sdram_tim_1_shdw_derated() 478 val = DIV_ROUND_UP(timings->tFAW + 7500, 4 * t_ck) - 1; in get_sdram_tim_1_shdw_derated() [all …]
|
| /Linux-v5.4/drivers/staging/media/allegro-dvt/ |
| D | nal-h264.c | 435 u8 *p = rbsp->data + DIV_ROUND_UP(rbsp->pos, 8); in nal_h264_write_start_code_prefix() 438 if (DIV_ROUND_UP(rbsp->pos, 8) + i > rbsp->size) { in nal_h264_write_start_code_prefix() 453 u8 *p = rbsp->data + DIV_ROUND_UP(rbsp->pos, 8); in nal_h264_read_start_code_prefix() 456 if (DIV_ROUND_UP(rbsp->pos, 8) + i > rbsp->size) { in nal_h264_read_start_code_prefix() 471 u8 *p = rbsp->data + DIV_ROUND_UP(rbsp->pos, 8); in nal_h264_write_filler_data() 475 i = rbsp->size - DIV_ROUND_UP(rbsp->pos, 8) - 1; in nal_h264_write_filler_data() 482 u8 *p = rbsp->data + DIV_ROUND_UP(rbsp->pos, 8); in nal_h264_read_filler_data() 485 if (DIV_ROUND_UP(rbsp->pos, 8) > rbsp->size) { in nal_h264_read_filler_data() 775 return DIV_ROUND_UP(rbsp.pos, 8); in nal_h264_write_sps() 822 return DIV_ROUND_UP(rbsp.pos, 8); in nal_h264_read_sps() [all …]
|
| /Linux-v5.4/drivers/i2c/busses/ |
| D | i2c-rk3x.c | 611 min_high_ns = max(min_high_ns, DIV_ROUND_UP( in rk3x_i2c_v0_calc_timings() 613 min_high_ns = max(min_high_ns, DIV_ROUND_UP( in rk3x_i2c_v0_calc_timings() 622 clk_rate_khz = DIV_ROUND_UP(clk_rate, 1000); in rk3x_i2c_v0_calc_timings() 629 min_total_div = DIV_ROUND_UP(clk_rate_khz, scl_rate_khz * 8); in rk3x_i2c_v0_calc_timings() 632 min_low_div = DIV_ROUND_UP(clk_rate_khz * min_low_ns, 8 * 1000000); in rk3x_i2c_v0_calc_timings() 633 min_high_div = DIV_ROUND_UP(clk_rate_khz * min_high_ns, 8 * 1000000); in rk3x_i2c_v0_calc_timings() 668 ideal_low_div = DIV_ROUND_UP(clk_rate_khz * min_low_ns, in rk3x_i2c_v0_calc_timings() 777 clk_rate_khz = DIV_ROUND_UP(clk_rate, 1000); in rk3x_i2c_v1_calc_timings() 779 min_total_div = DIV_ROUND_UP(clk_rate_khz, scl_rate_khz * 8); in rk3x_i2c_v1_calc_timings() 782 min_high_div = DIV_ROUND_UP(clk_rate_khz * min_high_ns, 8 * 1000000); in rk3x_i2c_v1_calc_timings() [all …]
|
| /Linux-v5.4/drivers/pwm/ |
| D | pwm-img.c | 108 output_clk_hz = DIV_ROUND_UP(NSEC_PER_SEC, period_ns); in img_pwm_config() 110 mul = DIV_ROUND_UP(input_clk_hz, output_clk_hz); in img_pwm_config() 113 timebase = DIV_ROUND_UP(mul, 1); in img_pwm_config() 116 timebase = DIV_ROUND_UP(mul, 8); in img_pwm_config() 119 timebase = DIV_ROUND_UP(mul, 64); in img_pwm_config() 122 timebase = DIV_ROUND_UP(mul, 512); in img_pwm_config() 129 duty = DIV_ROUND_UP(timebase * duty_ns, period_ns); in img_pwm_config()
|
| /Linux-v5.4/drivers/gpu/drm/i915/display/ |
| D | vlv_dsi_pll.c | 378 txesc1_div = DIV_ROUND_UP(div1_value, 2); in glk_dsi_program_esc_clock() 380 txesc1_div = DIV_ROUND_UP(div1_value, 4); in glk_dsi_program_esc_clock() 382 txesc1_div = DIV_ROUND_UP(div1_value, 6); in glk_dsi_program_esc_clock() 384 txesc1_div = DIV_ROUND_UP(div1_value, 8); in glk_dsi_program_esc_clock() 389 div2_value = DIV_ROUND_UP(div1_value, txesc1_div); in glk_dsi_program_esc_clock() 429 tx_div = DIV_ROUND_UP(dsi_rate, 20000) - 1; in bxt_dsi_program_clocks() 434 rx_div = DIV_ROUND_UP(dsi_rate, 150000) - 1; in bxt_dsi_program_clocks() 470 dsi_ratio = DIV_ROUND_UP(dsi_clk * 2, BXT_REF_CLOCK_KHZ); in bxt_dsi_pll_compute()
|
| /Linux-v5.4/drivers/clk/sunxi/ |
| D | clk-sun9i-core.c | 33 n = DIV_ROUND_UP(req->rate, 6000000); in sun9i_a80_get_pll4_factors() 106 div = DIV_ROUND_UP(req->parent_rate, req->rate); in sun9i_a80_get_gt_factors() 161 _p = order_base_2(DIV_ROUND_UP(req->parent_rate, req->rate)); in sun9i_a80_get_ahb_factors() 241 div = DIV_ROUND_UP(req->parent_rate, req->rate); in sun9i_a80_get_apb1_factors()
|
| /Linux-v5.4/drivers/gpu/drm/omapdrm/dss/ |
| D | pll.c | 187 m_start = max(DIV_ROUND_UP(clkdco, out_max), 1ul); in dss_pll_hsdiv_calc_a() 221 n_start = max(DIV_ROUND_UP(clkin, fint_hw_max), 1ul); in dss_pll_calc_a() 235 m_start = max(DIV_ROUND_UP(DIV_ROUND_UP(pll_min, fint), 2), in dss_pll_calc_a() 278 n = DIV_ROUND_UP(clkin, hw->fint_max); in dss_pll_calc_b() 283 m2 = DIV_ROUND_UP(min_dco, target_clkout); in dss_pll_calc_b() 304 sd = DIV_ROUND_UP(fint * m, 250000000); in dss_pll_calc_b() 454 sleep_time = DIV_ROUND_UP(1000*1000*1000, cinfo->fint); in dss_pll_write_config_type_a()
|