Home
last modified time | relevance | path

Searched refs:fb_div (Results 1 – 23 of 23) sorted by relevance

/drivers/gpu/drm/amd/amdgpu/
Damdgpu_pll.c84 unsigned *fb_div, unsigned *ref_div) in amdgpu_pll_get_fb_ref_div() argument
91 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in amdgpu_pll_get_fb_ref_div()
94 if (*fb_div > fb_div_max) { in amdgpu_pll_get_fb_ref_div()
95 *ref_div = DIV_ROUND_CLOSEST(*ref_div * fb_div_max, *fb_div); in amdgpu_pll_get_fb_ref_div()
96 *fb_div = fb_div_max; in amdgpu_pll_get_fb_ref_div()
124 unsigned fb_div_min, fb_div_max, fb_div; in amdgpu_pll_compute() local
201 ref_div_max, &fb_div, &ref_div); in amdgpu_pll_compute()
202 diff = abs(target_clock - (pll->reference_freq * fb_div) / in amdgpu_pll_compute()
216 &fb_div, &ref_div); in amdgpu_pll_compute()
220 amdgpu_pll_reduce_ratio(&fb_div, &ref_div, fb_div_min, ref_div_min); in amdgpu_pll_compute()
[all …]
Datombios_crtc.c532 u32 fb_div, in amdgpu_atombios_crtc_program_pll() argument
559 args.v1.usFbDiv = cpu_to_le16(fb_div); in amdgpu_atombios_crtc_program_pll()
569 args.v2.usFbDiv = cpu_to_le16(fb_div); in amdgpu_atombios_crtc_program_pll()
579 args.v3.usFbDiv = cpu_to_le16(fb_div); in amdgpu_atombios_crtc_program_pll()
596 args.v5.usFbDiv = cpu_to_le16(fb_div); in amdgpu_atombios_crtc_program_pll()
626 args.v6.usFbDiv = cpu_to_le16(fb_div); in amdgpu_atombios_crtc_program_pll()
747 u32 ref_div = 0, fb_div = 0, frac_fb_div = 0, post_div = 0; in amdgpu_atombios_crtc_set_pll() local
776 &fb_div, &frac_fb_div, &ref_div, &post_div); in amdgpu_atombios_crtc_set_pll()
783 ref_div, fb_div, frac_fb_div, post_div, in amdgpu_atombios_crtc_set_pll()
789 u32 amount = (((fb_div * 10) + frac_fb_div) * in amdgpu_atombios_crtc_set_pll()
Damdgpu_atombios.h41 u32 fb_div; member
66 u32 fb_div; member
Datombios_crtc.h47 u32 fb_div,
Dci_dpm.c3295 fbdiv = dividers.fb_div & 0x3FFFFFF; in ci_calculate_sclk_params()
/drivers/gpu/drm/radeon/
Dradeon_clocks.c38 uint32_t fb_div, ref_div, post_div, sclk; in radeon_legacy_get_engine_clock() local
40 fb_div = RREG32_PLL(RADEON_M_SPLL_REF_FB_DIV); in radeon_legacy_get_engine_clock()
41 fb_div = (fb_div >> RADEON_SPLL_FB_DIV_SHIFT) & RADEON_SPLL_FB_DIV_MASK; in radeon_legacy_get_engine_clock()
42 fb_div <<= 1; in radeon_legacy_get_engine_clock()
43 fb_div *= spll->reference_freq; 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
70 fb_div = RREG32_PLL(RADEON_M_SPLL_REF_FB_DIV); in radeon_legacy_get_memory_clock()
71 fb_div = (fb_div >> RADEON_MPLL_FB_DIV_SHIFT) & RADEON_MPLL_FB_DIV_MASK; in radeon_legacy_get_memory_clock()
72 fb_div <<= 1; in radeon_legacy_get_memory_clock()
[all …]
Dradeon_display.c956 unsigned *fb_div, unsigned *ref_div) in avivo_get_fb_ref_div() argument
963 *fb_div = DIV_ROUND_CLOSEST(nom * *ref_div * post_div, den); in avivo_get_fb_ref_div()
966 if (*fb_div > fb_div_max) { in avivo_get_fb_ref_div()
967 *ref_div = DIV_ROUND_CLOSEST(*ref_div * fb_div_max, *fb_div); in avivo_get_fb_ref_div()
968 *fb_div = fb_div_max; in avivo_get_fb_ref_div()
996 unsigned fb_div_min, fb_div_max, fb_div; in radeon_compute_pll_avivo() local
1076 ref_div_max, &fb_div, &ref_div); in radeon_compute_pll_avivo()
1077 diff = abs(target_clock - (pll->reference_freq * fb_div) / in radeon_compute_pll_avivo()
1091 &fb_div, &ref_div); in radeon_compute_pll_avivo()
1095 avivo_reduce_ratio(&fb_div, &ref_div, fb_div_min, ref_div_min); in radeon_compute_pll_avivo()
[all …]
Drs780_dpm.c87 r600_engine_clock_entry_set_feedback_divider(rdev, 0, dividers.fb_div); in rs780_initialize_dpm_power_state()
405 static void rs780_force_fbdiv(struct radeon_device *rdev, u32 fb_div) in rs780_force_fbdiv() argument
414 WREG32_P(FVTHROT_FBDIV_REG2, FORCED_FEEDBACK_DIV(fb_div), in rs780_force_fbdiv()
416 WREG32_P(FVTHROT_FBDIV_REG1, STARTING_FEEDBACK_DIV(fb_div), in rs780_force_fbdiv()
459 rs780_force_fbdiv(rdev, max_dividers.fb_div); in rs780_set_engine_clock_scaling()
461 if (max_dividers.fb_div > min_dividers.fb_div) { in rs780_set_engine_clock_scaling()
463 MIN_FEEDBACK_DIV(min_dividers.fb_div) | in rs780_set_engine_clock_scaling()
464 MAX_FEEDBACK_DIV(max_dividers.fb_div), in rs780_set_engine_clock_scaling()
1047 rs780_force_fbdiv(rdev, dividers.fb_div); in rs780_dpm_force_performance_level()
1054 rs780_force_fbdiv(rdev, dividers.fb_div); in rs780_dpm_force_performance_level()
Dradeon_uvd.c929 uint64_t fb_div = (uint64_t)vco_freq * fb_factor; in radeon_uvd_calc_upll_dividers() local
932 do_div(fb_div, ref_freq); in radeon_uvd_calc_upll_dividers()
935 if (fb_div > fb_mask) in radeon_uvd_calc_upll_dividers()
938 fb_div &= fb_mask; in radeon_uvd_calc_upll_dividers()
957 *optimal_fb_div = fb_div; in radeon_uvd_calc_upll_dividers()
Datombios_crtc.c823 u32 fb_div, in atombios_crtc_program_pll() argument
850 args.v1.usFbDiv = cpu_to_le16(fb_div); in atombios_crtc_program_pll()
860 args.v2.usFbDiv = cpu_to_le16(fb_div); in atombios_crtc_program_pll()
870 args.v3.usFbDiv = cpu_to_le16(fb_div); in atombios_crtc_program_pll()
887 args.v5.usFbDiv = cpu_to_le16(fb_div); in atombios_crtc_program_pll()
916 args.v6.usFbDiv = cpu_to_le16(fb_div); in atombios_crtc_program_pll()
1065 u32 ref_div = 0, fb_div = 0, frac_fb_div = 0, post_div = 0; in atombios_crtc_set_pll() local
1097 &fb_div, &frac_fb_div, &ref_div, &post_div); in atombios_crtc_set_pll()
1100 &fb_div, &frac_fb_div, &ref_div, &post_div); in atombios_crtc_set_pll()
1103 &fb_div, &frac_fb_div, &ref_div, &post_div); in atombios_crtc_set_pll()
[all …]
Drv730_dpm.c160 mpll_func_cntl_3 |= MPLL_FB_DIV(dividers.fb_div); in rv730_populate_mclk_value()
174 u32 clk_v = ss.percentage * dividers.fb_div / (clk_s * 10000); in rv730_populate_mclk_value()
Drv770.c49 unsigned fb_div = 0, vclk_div = 0, dclk_div = 0; in rv770_set_uvd_clocks() local
69 &fb_div, &vclk_div, &dclk_div); in rv770_set_uvd_clocks()
73 fb_div |= 1; in rv770_set_uvd_clocks()
103 WREG32_P(CG_UPLL_FUNC_CNTL_3, UPLL_FB_DIV(fb_div), in rv770_set_uvd_clocks()
Dradeon_legacy_crtc.c263 uint16_t fb_div) in radeon_compute_pll_gain() argument
270 vcoFreq = ((unsigned)ref_freq * fb_div) / ref_div; in radeon_compute_pll_gain()
Dradeon_mode.h598 u32 fb_div; member
623 u32 fb_div; member
Dni_dpm.c2096 u32 fb_div; in ni_init_smc_spll_table() local
2117 fb_div = (sclk_params.vCG_SPLL_FUNC_CNTL_3 & SPLL_FB_DIV_MASK) >> SPLL_FB_DIV_SHIFT; in ni_init_smc_spll_table()
2121 fb_div &= ~0x00001FFF; in ni_init_smc_spll_table()
2122 fb_div >>= 1; in ni_init_smc_spll_table()
2131 if (fb_div & ~(SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_MASK >> SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_SHIFT)) in ni_init_smc_spll_table()
2140 …tmp = ((fb_div << SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_SHIFT) & SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_MAS… in ni_init_smc_spll_table()
Dsi.c7324 unsigned fb_div = 0, vclk_div = 0, dclk_div = 0; in si_set_uvd_clocks() local
7342 &fb_div, &vclk_div, &dclk_div); in si_set_uvd_clocks()
7371 WREG32_P(CG_UPLL_FUNC_CNTL_3, UPLL_FB_DIV(fb_div), ~UPLL_FB_DIV_MASK); in si_set_uvd_clocks()
7376 if (fb_div < 307200) in si_set_uvd_clocks()
7809 unsigned fb_div = 0, evclk_div = 0, ecclk_div = 0; in si_set_vce_clocks() local
7830 &fb_div, &evclk_div, &ecclk_div); in si_set_vce_clocks()
7862 WREG32_SMC_P(CG_VCEPLL_FUNC_CNTL_3, VCEPLL_FB_DIV(fb_div), ~VCEPLL_FB_DIV_MASK); in si_set_vce_clocks()
Dr600.c199 unsigned fb_div = 0, ref_div, vclk_div = 0, dclk_div = 0; in r600_set_uvd_clocks() local
228 &fb_div, &vclk_div, &dclk_div); in r600_set_uvd_clocks()
233 fb_div >>= 1; in r600_set_uvd_clocks()
235 fb_div |= 1; in r600_set_uvd_clocks()
251 UPLL_FB_DIV(fb_div) | in r600_set_uvd_clocks()
Dsi_dpm.c2851 u32 fb_div, p_div; in si_init_smc_spll_table() local
2871 fb_div = (sclk_params.vCG_SPLL_FUNC_CNTL_3 & SPLL_FB_DIV_MASK) >> SPLL_FB_DIV_SHIFT; in si_init_smc_spll_table()
2875 fb_div &= ~0x00001FFF; in si_init_smc_spll_table()
2876 fb_div >>= 1; in si_init_smc_spll_table()
2881 if (fb_div & ~(SMC_SISLANDS_SPLL_DIV_TABLE_FBDIV_MASK >> SMC_SISLANDS_SPLL_DIV_TABLE_FBDIV_SHIFT)) in si_init_smc_spll_table()
2891 …tmp = ((fb_div << SMC_SISLANDS_SPLL_DIV_TABLE_FBDIV_SHIFT) & SMC_SISLANDS_SPLL_DIV_TABLE_FBDIV_MAS… in si_init_smc_spll_table()
Drv6xx_dpm.c530 return ref_clock * ((dividers->fb_div & ~1) << fb_divider_scale) / in rv6xx_calculate_vco_frequency()
608 rv6xx_memory_clock_entry_set_feedback_divider(rdev, entry, dividers.fb_div); in rv6xx_program_mclk_stepping_entry()
Devergreen.c1187 unsigned fb_div = 0, vclk_div = 0, dclk_div = 0; in evergreen_set_uvd_clocks() local
1206 &fb_div, &vclk_div, &dclk_div); in evergreen_set_uvd_clocks()
1233 WREG32_P(CG_UPLL_FUNC_CNTL_3, UPLL_FB_DIV(fb_div), ~UPLL_FB_DIV_MASK); in evergreen_set_uvd_clocks()
1238 if (fb_div < 307200) in evergreen_set_uvd_clocks()
Dradeon_atombios.c2849 dividers->fb_div = args.v1.ucFbDiv; in radeon_atom_get_clock_dividers()
2863 dividers->fb_div = le16_to_cpu(args.v2.usFbDiv); in radeon_atom_get_clock_dividers()
2870 dividers->enable_post_div = (dividers->fb_div & 1) ? true : false; in radeon_atom_get_clock_dividers()
Dci_dpm.c3157 fbdiv = dividers.fb_div & 0x3FFFFFF; in ci_calculate_sclk_params()
/drivers/video/fbdev/aty/
Dradeon_base.c1553 int fb_div, pll_output_freq = 0; in radeon_calc_pll_regs() local
1642 fb_div = round_div(rinfo->pll.ref_div*pll_output_freq, in radeon_calc_pll_regs()
1645 regs->ppll_div_3 = fb_div | (post_div->bitvalue << 16); in radeon_calc_pll_regs()
1648 pr_debug("fb_div = 0x%x\n", fb_div); in radeon_calc_pll_regs()