/* * Copyright 2018 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Authors: AMD *
*/
/* * only thing needed from here is MEMORY_TYPE_MULTIPLIER_CZ, which is also * used in resource, perhaps this should be defined somewhere more common.
*/ #include"resource.h"
/* Starting DID for each range */ enum dentist_base_divider_id {
DENTIST_BASE_DID_1 = 0x08,
DENTIST_BASE_DID_2 = 0x40,
DENTIST_BASE_DID_3 = 0x60,
DENTIST_BASE_DID_4 = 0x7e,
DENTIST_MAX_DID = 0x7f
};
#define CLK_REG_FIELD_LIST(type) \
type DPREFCLK_SRC_SEL; \
type DENTIST_DPREFCLK_WDIVIDER; \
type DENTIST_DISPCLK_WDIVIDER; \
type DENTIST_DISPCLK_CHG_DONE;
#define CLK20_REG_FIELD_LIST(type) \
type DENTIST_DPPCLK_WDIVIDER; \
type DENTIST_DPPCLK_CHG_DONE; \
type FbMult_int; \
type FbMult_frac;
/* * For backwards compatbility with previous implementation * TODO: remove these after everything transitions to new pattern * Rationale is that clk registers change a lot across DCE versions * and a shared data structure doesn't really make sense.
*/ conststruct clk_mgr_registers *regs; conststruct clk_mgr_shift *clk_mgr_shift; conststruct clk_mgr_mask *clk_mgr_mask;
/*TODO: figure out which of the below fields should be here vs in asic specific portion */ /* Cache the status of DFS-bypass feature*/ bool dfs_bypass_enabled; /* True if the DFS-bypass feature is enabled and active. */ bool dfs_bypass_active;
uint32_t dfs_ref_freq_khz; /* * Cache the display clock returned by VBIOS if DFS-bypass is enabled. * This is basically "Crystal Frequency In KHz" (XTALIN) frequency
*/ int dfs_bypass_disp_clk;
/** * @ss_on_dprefclk: * * True if spread spectrum is enabled on the DP ref clock.
*/ bool ss_on_dprefclk;
/** * @xgmi_enabled: * * True if xGMI is enabled. On VG20, both audio and display clocks need * to be adjusted with the WAFL link's SS info if xGMI is enabled.
*/ bool xgmi_enabled;
/** * @dprefclk_ss_percentage: * * DPREFCLK SS percentage (if down-spread enabled). * * Note that if XGMI is enabled, the SS info (percentage and divider) * from the WAFL link is used instead. This is decided during * dce_clk_mgr initialization.
*/ int dprefclk_ss_percentage;
/** * @dprefclk_ss_divider: * * DPREFCLK SS percentage Divider (100 or 1000).
*/ int dprefclk_ss_divider;
struct clk_mgr_internal_funcs { int (*set_dispclk)(struct clk_mgr_internal *clk_mgr, int requested_dispclk_khz); int (*set_dprefclk)(struct clk_mgr_internal *clk_mgr);
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.