#include "dm_services.h"
#include "dc_types.h"
#include "core_types.h"
#include "include/grph_object_id.h"
#include "include/logger_interface.h"
#include "dce_clock_source.h"
#include "clk_mgr.h"
#include "dccg.h"
#include "reg_helper.h"
#define REG(reg) …
#define CTX …
#define DC_LOGGER …
#define DC_LOGGER_INIT() …
#undef FN
#define FN(reg_name, field_name) …
#define FRACT_FB_DIVIDER_DEC_POINTS_MAX_NUM …
#define CALC_PLL_CLK_SRC_ERR_TOLERANCE …
#define MAX_PLL_CALC_ERROR …
#define NUM_ELEMENTS(a) …
static const struct spread_spectrum_data *get_ss_data_entry(
struct dce110_clk_src *clk_src,
enum signal_type signal,
uint32_t pix_clk_khz)
{ … }
static bool calculate_fb_and_fractional_fb_divider(
struct calc_pll_clock_source *calc_pll_cs,
uint32_t target_pix_clk_100hz,
uint32_t ref_divider,
uint32_t post_divider,
uint32_t *feedback_divider_param,
uint32_t *fract_feedback_divider_param)
{ … }
static bool calc_fb_divider_checking_tolerance(
struct calc_pll_clock_source *calc_pll_cs,
struct pll_settings *pll_settings,
uint32_t ref_divider,
uint32_t post_divider,
uint32_t tolerance)
{ … }
static bool calc_pll_dividers_in_range(
struct calc_pll_clock_source *calc_pll_cs,
struct pll_settings *pll_settings,
uint32_t min_ref_divider,
uint32_t max_ref_divider,
uint32_t min_post_divider,
uint32_t max_post_divider,
uint32_t err_tolerance)
{ … }
static uint32_t calculate_pixel_clock_pll_dividers(
struct calc_pll_clock_source *calc_pll_cs,
struct pll_settings *pll_settings)
{ … }
static bool pll_adjust_pix_clk(
struct dce110_clk_src *clk_src,
struct pixel_clk_params *pix_clk_params,
struct pll_settings *pll_settings)
{ … }
static uint32_t dce110_get_pix_clk_dividers_helper (
struct dce110_clk_src *clk_src,
struct pll_settings *pll_settings,
struct pixel_clk_params *pix_clk_params)
{ … }
static void dce112_get_pix_clk_dividers_helper (
struct dce110_clk_src *clk_src,
struct pll_settings *pll_settings,
struct pixel_clk_params *pix_clk_params)
{ … }
static uint32_t dce110_get_pix_clk_dividers(
struct clock_source *cs,
struct pixel_clk_params *pix_clk_params,
struct pll_settings *pll_settings)
{ … }
static uint32_t dce112_get_pix_clk_dividers(
struct clock_source *cs,
struct pixel_clk_params *pix_clk_params,
struct pll_settings *pll_settings)
{ … }
static bool disable_spread_spectrum(struct dce110_clk_src *clk_src)
{ … }
static bool calculate_ss(
const struct pll_settings *pll_settings,
const struct spread_spectrum_data *ss_data,
struct delta_sigma_data *ds_data)
{ … }
static bool enable_spread_spectrum(
struct dce110_clk_src *clk_src,
enum signal_type signal, struct pll_settings *pll_settings)
{ … }
static void dce110_program_pixel_clk_resync(
struct dce110_clk_src *clk_src,
enum signal_type signal_type,
enum dc_color_depth colordepth)
{ … }
static void dce112_program_pixel_clk_resync(
struct dce110_clk_src *clk_src,
enum signal_type signal_type,
enum dc_color_depth colordepth,
bool enable_ycbcr420)
{ … }
static bool dce110_program_pix_clk(
struct clock_source *clock_source,
struct pixel_clk_params *pix_clk_params,
enum dp_link_encoding encoding,
struct pll_settings *pll_settings)
{ … }
static bool dce112_program_pix_clk(
struct clock_source *clock_source,
struct pixel_clk_params *pix_clk_params,
enum dp_link_encoding encoding,
struct pll_settings *pll_settings)
{ … }
static bool dcn31_program_pix_clk(
struct clock_source *clock_source,
struct pixel_clk_params *pix_clk_params,
enum dp_link_encoding encoding,
struct pll_settings *pll_settings)
{ … }
static bool dcn401_program_pix_clk(
struct clock_source *clock_source,
struct pixel_clk_params *pix_clk_params,
enum dp_link_encoding encoding,
struct pll_settings *pll_settings)
{ … }
static bool dce110_clock_source_power_down(
struct clock_source *clk_src)
{ … }
static bool get_pixel_clk_frequency_100hz(
const struct clock_source *clock_source,
unsigned int inst,
unsigned int *pixel_clk_khz)
{ … }
const struct pixel_rate_range_table_entry video_optimized_pixel_rates[] = …;
const struct pixel_rate_range_table_entry *look_up_in_video_optimized_rate_tlb(
unsigned int pixel_rate_khz)
{ … }
static bool dcn20_program_pix_clk(
struct clock_source *clock_source,
struct pixel_clk_params *pix_clk_params,
enum dp_link_encoding encoding,
struct pll_settings *pll_settings)
{ … }
static bool dcn20_override_dp_pix_clk(
struct clock_source *clock_source,
unsigned int inst,
unsigned int pixel_clk,
unsigned int ref_clk)
{ … }
static const struct clock_source_funcs dcn20_clk_src_funcs = …;
static bool dcn3_program_pix_clk(
struct clock_source *clock_source,
struct pixel_clk_params *pix_clk_params,
enum dp_link_encoding encoding,
struct pll_settings *pll_settings)
{ … }
static uint32_t dcn3_get_pix_clk_dividers(
struct clock_source *cs,
struct pixel_clk_params *pix_clk_params,
struct pll_settings *pll_settings)
{ … }
static const struct clock_source_funcs dcn3_clk_src_funcs = …;
static const struct clock_source_funcs dcn31_clk_src_funcs = …;
static const struct clock_source_funcs dcn401_clk_src_funcs = …;
static const struct clock_source_funcs dce112_clk_src_funcs = …;
static const struct clock_source_funcs dce110_clk_src_funcs = …;
static void get_ss_info_from_atombios(
struct dce110_clk_src *clk_src,
enum as_signal_type as_signal,
struct spread_spectrum_data *spread_spectrum_data[],
uint32_t *ss_entries_num)
{ … }
static void ss_info_from_atombios_create(
struct dce110_clk_src *clk_src)
{ … }
static bool calc_pll_max_vco_construct(
struct calc_pll_clock_source *calc_pll_cs,
struct calc_pll_clock_source_init_data *init_data)
{ … }
bool dce110_clk_src_construct(
struct dce110_clk_src *clk_src,
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
const struct dce110_clk_src_shift *cs_shift,
const struct dce110_clk_src_mask *cs_mask)
{ … }
bool dce112_clk_src_construct(
struct dce110_clk_src *clk_src,
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
const struct dce110_clk_src_shift *cs_shift,
const struct dce110_clk_src_mask *cs_mask)
{ … }
bool dcn20_clk_src_construct(
struct dce110_clk_src *clk_src,
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
const struct dce110_clk_src_shift *cs_shift,
const struct dce110_clk_src_mask *cs_mask)
{ … }
bool dcn3_clk_src_construct(
struct dce110_clk_src *clk_src,
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
const struct dce110_clk_src_shift *cs_shift,
const struct dce110_clk_src_mask *cs_mask)
{ … }
bool dcn31_clk_src_construct(
struct dce110_clk_src *clk_src,
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
const struct dce110_clk_src_shift *cs_shift,
const struct dce110_clk_src_mask *cs_mask)
{ … }
bool dcn401_clk_src_construct(
struct dce110_clk_src *clk_src,
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
const struct dce110_clk_src_shift *cs_shift,
const struct dce110_clk_src_mask *cs_mask)
{ … }
bool dcn301_clk_src_construct(
struct dce110_clk_src *clk_src,
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
const struct dce110_clk_src_shift *cs_shift,
const struct dce110_clk_src_mask *cs_mask)
{ … }