/openbsd/sys/dev/pci/drm/amd/amdgpu/ |
H A D | amdgpu_pll.c | 92 ref_div_max = min(100 / post_div, ref_div_max); in amdgpu_pll_get_fb_ref_div() 135 unsigned post_div_min, post_div_max, post_div; in amdgpu_pll_compute() local 163 post_div_min = pll->post_div; in amdgpu_pll_compute() 164 post_div_max = pll->post_div; in amdgpu_pll_compute() 208 for (post_div = post_div_min; post_div <= post_div_max; ++post_div) { in amdgpu_pll_compute() 213 (ref_div * post_div)); in amdgpu_pll_compute() 218 post_div_best = post_div; in amdgpu_pll_compute() 222 post_div = post_div_best; in amdgpu_pll_compute() 253 (ref_div * post_div * 10); in amdgpu_pll_compute() 255 *post_div_p = post_div; in amdgpu_pll_compute() [all …]
|
H A D | amdgpu_atombios_crtc.c | 584 u32 post_div, in amdgpu_atombios_crtc_program_pll() argument 611 args.v1.ucPostDiv = post_div; in amdgpu_atombios_crtc_program_pll() 621 args.v2.ucPostDiv = post_div; in amdgpu_atombios_crtc_program_pll() 631 args.v3.ucPostDiv = post_div; in amdgpu_atombios_crtc_program_pll() 648 args.v5.ucPostDiv = post_div; in amdgpu_atombios_crtc_program_pll() 678 args.v6.ucPostDiv = post_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 851 pll->post_div = amdgpu_crtc->pll_post_div; in amdgpu_atombios_crtc_set_pll() 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()
|
H A D | amdgpu_atombios.h | 28 u32 post_div; member 68 u32 post_div; member
|
H A D | atombios_crtc.h | 51 u32 post_div,
|
H A D | amdgpu_si.c | 1676 unsigned post_div = vco_freq / target_freq; in si_uvd_calc_upll_post_div() local 1679 if (post_div < pd_min) in si_uvd_calc_upll_post_div() 1680 post_div = pd_min; in si_uvd_calc_upll_post_div() 1683 if ((vco_freq / post_div) > target_freq) in si_uvd_calc_upll_post_div() 1684 post_div += 1; in si_uvd_calc_upll_post_div() 1687 if (post_div > pd_even && post_div % 2) in si_uvd_calc_upll_post_div() 1688 post_div += 1; in si_uvd_calc_upll_post_div() 1690 return post_div; in si_uvd_calc_upll_post_div()
|
H A D | amdgpu_atombios.c | 1023 dividers->post_div = args.v3.ucPostDiv; in amdgpu_atombios_get_clock_dividers() 1043 dividers->post_div = args.v5.ucPostDiv; in amdgpu_atombios_get_clock_dividers() 1061 dividers->post_divider = dividers->post_div = args.v4.ucPostDiv; in amdgpu_atombios_get_clock_dividers() 1075 dividers->post_div = args.v6_out.ucPllPostDiv; in amdgpu_atombios_get_clock_dividers() 1116 mpll_param->post_div = args.ucPostDiv; in amdgpu_atombios_get_memory_pll_dividers()
|
H A D | amdgpu_mode.h | 195 uint32_t post_div; member
|
/openbsd/sys/dev/pci/drm/radeon/ |
H A D | radeon_display.c | 1044 for (post_div = post_div_min; post_div <= post_div_max; ++post_div) { in radeon_compute_pll_avivo() 1049 (ref_div * post_div)); in radeon_compute_pll_avivo() 1058 post_div = post_div_best; in radeon_compute_pll_avivo() 1091 *post_div_p = post_div; in radeon_compute_pll_avivo() 1129 uint32_t post_div; in radeon_compute_pll_legacy() local 1169 for (post_div = max_post_div; post_div >= min_post_div; --post_div) { in radeon_compute_pll_legacy() 1177 if ((post_div == 5) || in radeon_compute_pll_legacy() 1178 (post_div == 7) || in radeon_compute_pll_legacy() 1179 (post_div == 9) || in radeon_compute_pll_legacy() 1180 (post_div == 10) || in radeon_compute_pll_legacy() [all …]
|
H A D | radeon_clocks.c | 63 if (post_div == 2) in radeon_legacy_get_engine_clock() 65 else if (post_div == 3) in radeon_legacy_get_engine_clock() 67 else if (post_div == 4) in radeon_legacy_get_engine_clock() 93 if (post_div == 2) in radeon_legacy_get_memory_clock() 95 else if (post_div == 3) in radeon_legacy_get_memory_clock() 97 else if (post_div == 4) in radeon_legacy_get_memory_clock() 448 *post_div = 8; in calc_eng_mem_clock() 451 *post_div = 4; in calc_eng_mem_clock() 454 *post_div = 2; in calc_eng_mem_clock() 457 *post_div = 1; in calc_eng_mem_clock() [all …]
|
H A D | radeon_legacy_tv.c | 857 int post_div; in get_post_div() local 859 case 1: post_div = 0; break; in get_post_div() 860 case 2: post_div = 1; break; in get_post_div() 861 case 3: post_div = 4; break; in get_post_div() 862 case 4: post_div = 2; break; in get_post_div() 863 case 6: post_div = 6; break; in get_post_div() 864 case 8: post_div = 3; break; in get_post_div() 865 case 12: post_div = 7; break; in get_post_div() 867 default: post_div = 5; break; in get_post_div() 869 return post_div; in get_post_div()
|
H A D | rv730_dpm.c | 62 post_divider = ((dividers.post_div >> 4) & 0xf) + in rv730_populate_sclk_value() 63 (dividers.post_div & 0xf) + 2; in rv730_populate_sclk_value() 78 spll_func_cntl |= SPLL_HILEN((dividers.post_div >> 4) & 0xf); in rv730_populate_sclk_value() 79 spll_func_cntl |= SPLL_LOLEN(dividers.post_div & 0xf); in rv730_populate_sclk_value() 140 post_divider = ((dividers.post_div >> 4) & 0xf) + in rv730_populate_mclk_value() 141 (dividers.post_div & 0xf) + 2; in rv730_populate_mclk_value() 153 mpll_func_cntl |= MPLL_HILEN((dividers.post_div >> 4) & 0xf); in rv730_populate_mclk_value() 154 mpll_func_cntl |= MPLL_LOLEN(dividers.post_div & 0xf); in rv730_populate_mclk_value()
|
H A D | rv740_dpm.c | 142 tmp = (u64) engine_clock * reference_divider * dividers.post_div * 16384; in rv740_populate_sclk_value() 148 spll_func_cntl |= SPLL_PDIV_A(dividers.post_div); in rv740_populate_sclk_value() 159 u32 vco_freq = engine_clock * dividers.post_div; in rv740_populate_sclk_value() 216 mpll_ad_func_cntl |= YCLK_POST_DIV(dividers.post_div); in rv740_populate_mclk_value() 233 mpll_dq_func_cntl |= YCLK_POST_DIV(dividers.post_div); in rv740_populate_mclk_value() 246 u32 vco_freq = memory_clock * dividers.post_div; in rv740_populate_mclk_value()
|
H A D | radeon_uvd.c | 912 unsigned post_div = vco_freq / target_freq; in radeon_uvd_calc_upll_post_div() local 915 if (post_div < pd_min) in radeon_uvd_calc_upll_post_div() 916 post_div = pd_min; in radeon_uvd_calc_upll_post_div() 919 if ((vco_freq / post_div) > target_freq) in radeon_uvd_calc_upll_post_div() 920 post_div += 1; in radeon_uvd_calc_upll_post_div() 923 if (post_div > pd_even && post_div % 2) in radeon_uvd_calc_upll_post_div() 924 post_div += 1; in radeon_uvd_calc_upll_post_div() 926 return post_div; in radeon_uvd_calc_upll_post_div()
|
H A D | radeon_legacy_crtc.c | 756 } *post_div, post_divs[] = { in radeon_set_pll() local 822 for (post_div = &post_divs[0]; post_div->divider; ++post_div) { in radeon_set_pll() 823 if (post_div->divider == post_divider) in radeon_set_pll() 827 if (!post_div->divider) in radeon_set_pll() 828 post_div = &post_divs[0]; in radeon_set_pll() 843 pll_fb_post_div = (feedback_div | (post_div->bitvalue << 16)); in radeon_set_pll()
|
H A D | rs780_dpm.c | 89 r600_engine_clock_entry_set_post_divider(rdev, 0, dividers.post_div); in rs780_initialize_dpm_power_state() 454 (min_dividers.post_div != max_dividers.post_div) || in rs780_set_engine_clock_scaling() 456 (max_dividers.post_div != current_max_dividers.post_div)) in rs780_set_engine_clock_scaling() 989 u32 post_div = ((func_cntl & SPLL_SW_HILEN_MASK) >> SPLL_SW_HILEN_SHIFT) + 1 + in rs780_dpm_debugfs_print_current_performance_level() local 992 (post_div * ref_div); in rs780_dpm_debugfs_print_current_performance_level() 1011 u32 post_div = ((func_cntl & SPLL_SW_HILEN_MASK) >> SPLL_SW_HILEN_SHIFT) + 1 + in rs780_dpm_get_current_sclk() local 1014 (post_div * ref_div); in rs780_dpm_get_current_sclk()
|
H A D | atombios_crtc.c | 824 u32 post_div, in atombios_crtc_program_pll() argument 851 args.v1.ucPostDiv = post_div; in atombios_crtc_program_pll() 861 args.v2.ucPostDiv = post_div; in atombios_crtc_program_pll() 871 args.v3.ucPostDiv = post_div; in atombios_crtc_program_pll() 888 args.v5.ucPostDiv = post_div; in atombios_crtc_program_pll() 917 args.v6.ucPostDiv = post_div; in atombios_crtc_program_pll() 1089 pll->post_div = radeon_crtc->pll_post_div; in atombios_crtc_set_pll() 1094 &fb_div, &frac_fb_div, &ref_div, &post_div); in atombios_crtc_set_pll() 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() [all …]
|
H A D | radeon_mode.h | 170 uint32_t post_div; member 542 u32 post_div; member 582 u32 post_div; member
|
H A D | rv770_dpm.c | 334 post_divider = dividers->post_div; in rv770_calculate_fractional_mpll_feedback_divider() 423 ret = rv770_encode_yclk_post_div(dividers.post_div, &postdiv_yclk); in rv770_populate_mclk_value() 453 ret = rv770_encode_yclk_post_div(dividers.post_div, &postdiv_yclk); in rv770_populate_mclk_value() 515 post_divider = (0x0f & (dividers.post_div >> 4)) + (0x0f & dividers.post_div) + 2; in rv770_populate_sclk_value() 529 spll_func_cntl |= SPLL_HILEN((dividers.post_div >> 4) & 0xf); in rv770_populate_sclk_value() 530 spll_func_cntl |= SPLL_LOLEN(dividers.post_div & 0xf); in rv770_populate_sclk_value()
|
H A D | kv_dpm.c | 388 pi->graphics_level[index].SclkDid = (u8)dividers.post_div; in kv_set_divider_value() 691 pi->uvd_level[i].VclkDivider = (u8)dividers.post_div; in kv_populate_uvd_table() 697 pi->uvd_level[i].DclkDivider = (u8)dividers.post_div; in kv_populate_uvd_table() 759 pi->vce_level[i].Divider = (u8)dividers.post_div; in kv_populate_vce_table() 822 pi->samu_level[i].Divider = (u8)dividers.post_div; in kv_populate_samu_table() 881 pi->acp_level[i].Divider = (u8)dividers.post_div; in kv_populate_acp_table()
|
H A D | cypress_dpm.c | 508 dividers.post_div = 1; in cypress_populate_mclk_value() 519 mpll_ad_func_cntl |= YCLK_POST_DIV(dividers.post_div); in cypress_populate_mclk_value() 536 mpll_dq_func_cntl |= YCLK_POST_DIV(dividers.post_div); in cypress_populate_mclk_value() 554 u32 vco_freq = memory_clock * dividers.post_div; in cypress_populate_mclk_value()
|
H A D | ni_dpm.c | 2025 tmp = (u64) engine_clock * reference_divider * dividers.post_div * 16834; in ni_calculate_sclk_params() 2031 spll_func_cntl |= SPLL_PDIV_A(dividers.post_div); in ni_calculate_sclk_params() 2042 u32 vco_freq = engine_clock * dividers.post_div; in ni_calculate_sclk_params() 2192 dividers.post_div = 1; in ni_populate_mclk_value() 2203 mpll_ad_func_cntl |= YCLK_POST_DIV(dividers.post_div); in ni_populate_mclk_value() 2220 mpll_dq_func_cntl |= YCLK_POST_DIV(dividers.post_div); in ni_populate_mclk_value() 2238 u32 vco_freq = memory_clock * dividers.post_div; in ni_populate_mclk_value()
|
H A D | trinity_dpm.c | 338 value |= PDS_DIV(dividers.post_div); in trinity_gfx_powergating_initialize() 554 value |= CLK_DIVIDER(dividers.post_div); in trinity_set_divider_value() 564 value |= PD_SCLK_DIVIDER(dividers.post_div); in trinity_set_divider_value()
|
H A D | radeon_atombios.c | 2871 dividers->post_div = args.v1.ucPostDiv; in radeon_atom_get_clock_dividers() 2885 dividers->post_div = args.v2.ucPostDiv; in radeon_atom_get_clock_dividers() 2900 dividers->post_div = args.v3.ucPostDiv; in radeon_atom_get_clock_dividers() 2920 dividers->post_div = args.v5.ucPostDiv; in radeon_atom_get_clock_dividers() 2939 dividers->post_divider = dividers->post_div = args.v4.ucPostDiv; in radeon_atom_get_clock_dividers() 2953 dividers->post_div = args.v6_out.ucPllPostDiv; in radeon_atom_get_clock_dividers() 2993 mpll_param->post_div = args.ucPostDiv; in radeon_atom_get_memory_pll_dividers()
|
/openbsd/sys/dev/fdt/ |
H A D | imxccm.c | 654 uint64_t main_div, pre_div, post_div, div; in imxccm_imx8mm_get_pll() local 690 uint64_t main_div, pre_div, post_div; in imxccm_imx8mm_set_pll() local 700 post_div = 0; in imxccm_imx8mm_set_pll() 704 post_div = 0; in imxccm_imx8mm_set_pll() 708 post_div = 1; in imxccm_imx8mm_set_pll() 712 post_div = 1; in imxccm_imx8mm_set_pll() 716 post_div = 1; in imxccm_imx8mm_set_pll() 720 post_div = 2; in imxccm_imx8mm_set_pll() 724 post_div = 2; in imxccm_imx8mm_set_pll() 728 post_div = 2; in imxccm_imx8mm_set_pll() [all …]
|
/openbsd/sys/dev/pci/drm/amd/pm/legacy-dpm/ |
H A D | amdgpu_kv_dpm.c | 663 pi->graphics_level[index].SclkDid = (u8)dividers.post_div; in kv_set_divider_value() 922 pi->uvd_level[i].VclkDivider = (u8)dividers.post_div; in kv_populate_uvd_table() 928 pi->uvd_level[i].DclkDivider = (u8)dividers.post_div; in kv_populate_uvd_table() 990 pi->vce_level[i].Divider = (u8)dividers.post_div; in kv_populate_vce_table() 1053 pi->samu_level[i].Divider = (u8)dividers.post_div; in kv_populate_samu_table() 1112 pi->acp_level[i].Divider = (u8)dividers.post_div; in kv_populate_acp_table()
|