Home
last modified time | relevance | path

Searched refs:ref_div (Results 1 – 25 of 34) sorted by relevance

12

/drivers/gpu/drm/amd/amdgpu/
Damdgpu_pll.c85 unsigned *fb_div, unsigned *ref_div) in amdgpu_pll_get_fb_ref_div() argument
91 *ref_div = min(max(DIV_ROUND_CLOSEST(den, post_div), 1u), ref_div_max); in amdgpu_pll_get_fb_ref_div()
92 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in amdgpu_pll_get_fb_ref_div()
96 *ref_div = DIV_ROUND_CLOSEST(*ref_div * fb_div_max, *fb_div); in amdgpu_pll_get_fb_ref_div()
127 unsigned ref_div_min, ref_div_max, ref_div; in amdgpu_pll_compute() local
202 ref_div_max, &fb_div, &ref_div); in amdgpu_pll_compute()
204 (ref_div * post_div)); in amdgpu_pll_compute()
217 &fb_div, &ref_div); in amdgpu_pll_compute()
221 amdgpu_pll_reduce_ratio(&fb_div, &ref_div, fb_div_min, ref_div_min); in amdgpu_pll_compute()
229 ref_div *= tmp; in amdgpu_pll_compute()
[all …]
Datombios_crtc.c581 u32 ref_div, in amdgpu_atombios_crtc_program_pll() argument
608 args.v1.usRefDiv = cpu_to_le16(ref_div); in amdgpu_atombios_crtc_program_pll()
618 args.v2.usRefDiv = cpu_to_le16(ref_div); in amdgpu_atombios_crtc_program_pll()
628 args.v3.usRefDiv = cpu_to_le16(ref_div); in amdgpu_atombios_crtc_program_pll()
645 args.v5.ucRefDiv = ref_div; in amdgpu_atombios_crtc_program_pll()
675 args.v6.ucRefDiv = ref_div; in amdgpu_atombios_crtc_program_pll()
825 u32 ref_div = 0, fb_div = 0, frac_fb_div = 0, post_div = 0; in amdgpu_atombios_crtc_set_pll() local
854 &fb_div, &frac_fb_div, &ref_div, &post_div); in amdgpu_atombios_crtc_set_pll()
861 ref_div, fb_div, frac_fb_div, post_div, in amdgpu_atombios_crtc_set_pll()
874 step_size = (4 * amount * ref_div * ((u32)amdgpu_crtc->ss.rate * 2048)) / in amdgpu_atombios_crtc_set_pll()
[all …]
Datombios_crtc.h48 u32 ref_div,
Damdgpu_atombios.h43 u32 ref_div; member
Damdgpu_atombios.c1015 dividers->ref_div = args.v3.ucRefDiv; in amdgpu_atombios_get_clock_dividers()
1035 dividers->ref_div = args.v5.ucRefDiv; in amdgpu_atombios_get_clock_dividers()
1059 dividers->ref_div = args.v6_out.ucPllRefDiv; in amdgpu_atombios_get_clock_dividers()
Dsi_dpm.h571 u32 ref_div; member
/drivers/gpu/drm/radeon/
Dradeon_clocks.c38 uint32_t fb_div, ref_div, post_div, sclk; in radeon_legacy_get_engine_clock() local
45 ref_div = in radeon_legacy_get_engine_clock()
48 if (ref_div == 0) in radeon_legacy_get_engine_clock()
51 sclk = fb_div / ref_div; in radeon_legacy_get_engine_clock()
68 uint32_t fb_div, ref_div, post_div, mclk; in radeon_legacy_get_memory_clock() local
75 ref_div = in radeon_legacy_get_memory_clock()
78 if (ref_div == 0) in radeon_legacy_get_memory_clock()
81 mclk = fb_div / ref_div; in radeon_legacy_get_memory_clock()
351 int ref_div = spll->reference_div; in calc_eng_mem_clock() local
353 if (!ref_div) in calc_eng_mem_clock()
[all …]
Dradeon_display.c932 unsigned *fb_div, unsigned *ref_div) in avivo_get_fb_ref_div() argument
938 *ref_div = min(max(DIV_ROUND_CLOSEST(den, post_div), 1u), ref_div_max); in avivo_get_fb_ref_div()
939 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in avivo_get_fb_ref_div()
943 *ref_div = DIV_ROUND_CLOSEST(*ref_div * fb_div_max, *fb_div); in avivo_get_fb_ref_div()
974 unsigned ref_div_min, ref_div_max, ref_div; in radeon_compute_pll_avivo() local
1052 ref_div_max, &fb_div, &ref_div); in radeon_compute_pll_avivo()
1054 (ref_div * post_div)); in radeon_compute_pll_avivo()
1067 &fb_div, &ref_div); in radeon_compute_pll_avivo()
1071 avivo_reduce_ratio(&fb_div, &ref_div, fb_div_min, ref_div_min); in radeon_compute_pll_avivo()
1079 ref_div *= tmp; in radeon_compute_pll_avivo()
[all …]
Drv740_dpm.c142 reference_divider = 1 + dividers.ref_div; in rv740_populate_sclk_value()
149 spll_func_cntl |= SPLL_REF_DIV(dividers.ref_div); in rv740_populate_sclk_value()
217 mpll_ad_func_cntl |= CLKR(dividers.ref_div); in rv740_populate_mclk_value()
234 mpll_dq_func_cntl |= CLKR(dividers.ref_div); in rv740_populate_mclk_value()
253 u32 decoded_ref = rv740_get_decoded_reference_divider(dividers.ref_div); in rv740_populate_mclk_value()
Drs780_dpm.c86 r600_engine_clock_entry_set_reference_divider(rdev, 0, dividers.ref_div); in rs780_initialize_dpm_power_state()
453 if ((min_dividers.ref_div != max_dividers.ref_div) || in rs780_set_engine_clock_scaling()
455 (max_dividers.ref_div != current_max_dividers.ref_div) || in rs780_set_engine_clock_scaling()
987 u32 ref_div = ((func_cntl & SPLL_REF_DIV_MASK) >> SPLL_REF_DIV_SHIFT) + 1; in rs780_dpm_debugfs_print_current_performance_level() local
991 (post_div * ref_div); in rs780_dpm_debugfs_print_current_performance_level()
1009 u32 ref_div = ((func_cntl & SPLL_REF_DIV_MASK) >> SPLL_REF_DIV_SHIFT) + 1; in rs780_dpm_get_current_sclk() local
1013 (post_div * ref_div); in rs780_dpm_get_current_sclk()
Datombios_crtc.c826 u32 ref_div, in atombios_crtc_program_pll() argument
853 args.v1.usRefDiv = cpu_to_le16(ref_div); in atombios_crtc_program_pll()
863 args.v2.usRefDiv = cpu_to_le16(ref_div); in atombios_crtc_program_pll()
873 args.v3.usRefDiv = cpu_to_le16(ref_div); in atombios_crtc_program_pll()
890 args.v5.ucRefDiv = ref_div; in atombios_crtc_program_pll()
919 args.v6.ucRefDiv = ref_div; in atombios_crtc_program_pll()
1069 u32 ref_div = 0, fb_div = 0, frac_fb_div = 0, post_div = 0; in atombios_crtc_set_pll() local
1101 &fb_div, &frac_fb_div, &ref_div, &post_div); in atombios_crtc_set_pll()
1104 &fb_div, &frac_fb_div, &ref_div, &post_div); in atombios_crtc_set_pll()
1107 &fb_div, &frac_fb_div, &ref_div, &post_div); in atombios_crtc_set_pll()
[all …]
Drv730_dpm.c62 reference_divider = 1 + dividers.ref_div; in rv730_populate_sclk_value()
80 spll_func_cntl |= SPLL_REF_DIV(dividers.ref_div); in rv730_populate_sclk_value()
140 reference_divider = dividers.ref_div + 1; in rv730_populate_mclk_value()
155 mpll_func_cntl |= MPLL_REF_DIV(dividers.ref_div); in rv730_populate_mclk_value()
Drv770_dpm.c334 reference_divider = dividers->ref_div; in rv770_calculate_fractional_mpll_feedback_divider()
415 if ((dividers.ref_div < 1) || (dividers.ref_div > 5)) in rv770_populate_mclk_value()
433 mpll_ad_func_cntl |= CLKR(encoded_reference_dividers[dividers.ref_div - 1]); in rv770_populate_mclk_value()
461 mpll_dq_func_cntl |= CLKR(encoded_reference_dividers[dividers.ref_div - 1]); in rv770_populate_mclk_value()
511 reference_divider = 1 + dividers.ref_div; in rv770_populate_sclk_value()
527 spll_func_cntl |= SPLL_REF_DIV(dividers.ref_div); in rv770_populate_sclk_value()
811 (MPLL_LOCK_TIME(R600_MPLLLOCKTIME_DFLT * pi->ref_div) | in rv770_program_mpll_timing_parameters()
2376 pi->ref_div = dividers.ref_div + 1; in rv770_dpm_init()
2378 pi->ref_div = R600_REFERENCEDIVIDER_DFLT; in rv770_dpm_init()
Drv6xx_dpm.c531 (dividers->ref_div + 1); in rv6xx_calculate_vco_frequency()
568 (ref_clk / (dividers.ref_div + 1)), in rv6xx_program_engine_spread_spectrum()
574 (ref_clk / (dividers.ref_div + 1))); in rv6xx_program_engine_spread_spectrum()
607 rv6xx_memory_clock_entry_set_reference_divider(rdev, entry, dividers.ref_div); in rv6xx_program_mclk_stepping_entry()
686 (ref_clk / (dividers.ref_div + 1)), in rv6xx_program_mclk_spread_spectrum_parameters()
692 (ref_clk / (dividers.ref_div + 1))); in rv6xx_program_mclk_spread_spectrum_parameters()
1960 pi->spll_ref_div = dividers.ref_div + 1; in rv6xx_dpm_init()
1967 pi->mpll_ref_div = dividers.ref_div + 1; in rv6xx_dpm_init()
Dradeon_legacy_crtc.c263 static uint8_t radeon_compute_pll_gain(uint16_t ref_freq, uint16_t ref_div, in radeon_compute_pll_gain() argument
268 if (!ref_div) in radeon_compute_pll_gain()
271 vcoFreq = ((unsigned)ref_freq * fb_div) / ref_div; in radeon_compute_pll_gain()
Dcypress_dpm.c519 mpll_ad_func_cntl |= CLKR(dividers.ref_div); in cypress_populate_mclk_value()
536 mpll_dq_func_cntl |= CLKR(dividers.ref_div); in cypress_populate_mclk_value()
560 u32 decoded_ref = rv740_get_decoded_reference_divider(dividers.ref_div); in cypress_populate_mclk_value()
2058 pi->ref_div = dividers.ref_div + 1; in cypress_dpm_init()
2060 pi->ref_div = R600_REFERENCEDIVIDER_DFLT; in cypress_dpm_init()
Drv770_dpm.h114 u32 ref_div; member
Dni_dpm.c2020 reference_divider = 1 + dividers.ref_div; in ni_calculate_sclk_params()
2028 spll_func_cntl |= SPLL_REF_DIV(dividers.ref_div); in ni_calculate_sclk_params()
2200 mpll_ad_func_cntl |= CLKR(dividers.ref_div); in ni_populate_mclk_value()
2217 mpll_dq_func_cntl |= CLKR(dividers.ref_div); in ni_populate_mclk_value()
2241 u32 decoded_ref = rv740_get_decoded_reference_divider(dividers.ref_div); in ni_populate_mclk_value()
4103 pi->ref_div = dividers.ref_div + 1; in ni_dpm_init()
4105 pi->ref_div = R600_REFERENCEDIVIDER_DFLT; in ni_dpm_init()
Dbtc_dpm.c2607 pi->ref_div = dividers.ref_div + 1; in btc_dpm_init()
2609 pi->ref_div = R600_REFERENCEDIVIDER_DFLT; in btc_dpm_init()
Dr600.c199 unsigned fb_div = 0, ref_div, vclk_div = 0, dclk_div = 0; in r600_set_uvd_clocks() local
222 ref_div = 34; in r600_set_uvd_clocks()
224 ref_div = 4; in r600_set_uvd_clocks()
227 ref_div + 1, 0xFFF, 2, 30, ~0, in r600_set_uvd_clocks()
252 UPLL_REF_DIV(ref_div), in r600_set_uvd_clocks()
/drivers/media/dvb-frontends/
Dtda8261.c84 static const u8 ref_div[] = { 0x00, 0x01, 0x02, 0x05, 0x07 }; variable
121 buf[2] = (0x01 << 7) | ((ref_div[config->step_size] & 0x07) << 1); in tda8261_set_params()
/drivers/net/wireless/ath/ath9k/
Dar9002_phy.c306 int ref_div = 5; in ar9002_hw_compute_pll_control() local
312 ref_div = 10; in ar9002_hw_compute_pll_control()
319 pll = SM(ref_div, AR_RTC_9160_PLL_REFDIV); in ar9002_hw_compute_pll_control()
/drivers/video/fbdev/aty/
Dradeon_base.c582 unsigned sclk, mclk, tmp, ref_div; in radeon_probe_pll_params() local
696 ref_div = INPLL(PPLL_REF_DIV) & 0x3ff; in radeon_probe_pll_params()
706 rinfo->pll.ref_div = ref_div; in radeon_probe_pll_params()
775 rinfo->pll.ref_div = INPLL(PPLL_REF_DIV) & PPLL_REF_DIV_MASK; in radeon_get_pllinfo()
798 rinfo->pll.ref_div = BIOS_IN16(pll_info_block + 0x10); in radeon_get_pllinfo()
833 rinfo->pll.ref_div, in radeon_get_pllinfo()
1628 rinfo->pll.ref_div, rinfo->pll.ref_clk, in radeon_calc_pll_regs()
1638 rinfo->pll.ref_div, rinfo->pll.ref_clk, in radeon_calc_pll_regs()
1641 fb_div = round_div(rinfo->pll.ref_div*pll_output_freq, in radeon_calc_pll_regs()
1643 regs->ppll_ref_div = rinfo->pll.ref_div; in radeon_calc_pll_regs()
Datyfb.h50 int ref_div; member
Dradeonfb.h141 int ref_div; member

12