aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dpll_mgr.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2018-05-21 20:25:48 -0400
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2018-06-14 17:54:39 -0400
commit1fa11ee2d9d0ccd58a6b56a9e490e336c99e98bf (patch)
treeb733f213d2b9bd106bade944beed00c286e92827 /drivers/gpu/drm/i915/intel_dpll_mgr.c
parent00c92d929ac36848fbe88567ef14af947ab636e4 (diff)
drm/i915/icl: start adding the TBT pll
This commit just adds the register addresses and the basic skeleton of the code. The next commits will expand on more specific functions. Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180522002558.29262-15-paulo.r.zanoni@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dpll_mgr.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dpll_mgr.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c
index 07bdbf2582ba..132fe63e042a 100644
--- a/drivers/gpu/drm/i915/intel_dpll_mgr.c
+++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c
@@ -2857,10 +2857,17 @@ icl_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,
2857 case PORT_D: 2857 case PORT_D:
2858 case PORT_E: 2858 case PORT_E:
2859 case PORT_F: 2859 case PORT_F:
2860 min = icl_port_to_mg_pll_id(port); 2860 if (0 /* TODO: TBT PLLs */) {
2861 max = min; 2861 min = DPLL_ID_ICL_TBTPLL;
2862 ret = icl_calc_mg_pll_state(crtc_state, encoder, clock, 2862 max = min;
2863 &pll_state); 2863 ret = icl_calc_dpll_state(crtc_state, encoder, clock,
2864 &pll_state);
2865 } else {
2866 min = icl_port_to_mg_pll_id(port);
2867 max = min;
2868 ret = icl_calc_mg_pll_state(crtc_state, encoder, clock,
2869 &pll_state);
2870 }
2864 break; 2871 break;
2865 default: 2872 default:
2866 MISSING_CASE(port); 2873 MISSING_CASE(port);
@@ -2893,6 +2900,8 @@ static i915_reg_t icl_pll_id_to_enable_reg(enum intel_dpll_id id)
2893 case DPLL_ID_ICL_DPLL0: 2900 case DPLL_ID_ICL_DPLL0:
2894 case DPLL_ID_ICL_DPLL1: 2901 case DPLL_ID_ICL_DPLL1:
2895 return CNL_DPLL_ENABLE(id); 2902 return CNL_DPLL_ENABLE(id);
2903 case DPLL_ID_ICL_TBTPLL:
2904 return TBT_PLL_ENABLE;
2896 case DPLL_ID_ICL_MGPLL1: 2905 case DPLL_ID_ICL_MGPLL1:
2897 case DPLL_ID_ICL_MGPLL2: 2906 case DPLL_ID_ICL_MGPLL2:
2898 case DPLL_ID_ICL_MGPLL3: 2907 case DPLL_ID_ICL_MGPLL3:
@@ -2920,6 +2929,7 @@ static bool icl_pll_get_hw_state(struct drm_i915_private *dev_priv,
2920 switch (id) { 2929 switch (id) {
2921 case DPLL_ID_ICL_DPLL0: 2930 case DPLL_ID_ICL_DPLL0:
2922 case DPLL_ID_ICL_DPLL1: 2931 case DPLL_ID_ICL_DPLL1:
2932 case DPLL_ID_ICL_TBTPLL:
2923 hw_state->cfgcr0 = I915_READ(ICL_DPLL_CFGCR0(id)); 2933 hw_state->cfgcr0 = I915_READ(ICL_DPLL_CFGCR0(id));
2924 hw_state->cfgcr1 = I915_READ(ICL_DPLL_CFGCR1(id)); 2934 hw_state->cfgcr1 = I915_READ(ICL_DPLL_CFGCR1(id));
2925 break; 2935 break;
@@ -3006,6 +3016,7 @@ static void icl_pll_enable(struct drm_i915_private *dev_priv,
3006 switch (id) { 3016 switch (id) {
3007 case DPLL_ID_ICL_DPLL0: 3017 case DPLL_ID_ICL_DPLL0:
3008 case DPLL_ID_ICL_DPLL1: 3018 case DPLL_ID_ICL_DPLL1:
3019 case DPLL_ID_ICL_TBTPLL:
3009 icl_dpll_write(dev_priv, pll); 3020 icl_dpll_write(dev_priv, pll);
3010 break; 3021 break;
3011 case DPLL_ID_ICL_MGPLL1: 3022 case DPLL_ID_ICL_MGPLL1:
@@ -3104,6 +3115,7 @@ static const struct intel_shared_dpll_funcs icl_pll_funcs = {
3104static const struct dpll_info icl_plls[] = { 3115static const struct dpll_info icl_plls[] = {
3105 { "DPLL 0", &icl_pll_funcs, DPLL_ID_ICL_DPLL0, 0 }, 3116 { "DPLL 0", &icl_pll_funcs, DPLL_ID_ICL_DPLL0, 0 },
3106 { "DPLL 1", &icl_pll_funcs, DPLL_ID_ICL_DPLL1, 0 }, 3117 { "DPLL 1", &icl_pll_funcs, DPLL_ID_ICL_DPLL1, 0 },
3118 { "TBT PLL", &icl_pll_funcs, DPLL_ID_ICL_TBTPLL, 0 },
3107 { "MG PLL 1", &icl_pll_funcs, DPLL_ID_ICL_MGPLL1, 0 }, 3119 { "MG PLL 1", &icl_pll_funcs, DPLL_ID_ICL_MGPLL1, 0 },
3108 { "MG PLL 2", &icl_pll_funcs, DPLL_ID_ICL_MGPLL2, 0 }, 3120 { "MG PLL 2", &icl_pll_funcs, DPLL_ID_ICL_MGPLL2, 0 },
3109 { "MG PLL 3", &icl_pll_funcs, DPLL_ID_ICL_MGPLL3, 0 }, 3121 { "MG PLL 3", &icl_pll_funcs, DPLL_ID_ICL_MGPLL3, 0 },