Commit 9a36a651 authored by Vivek Kasireddy's avatar Vivek Kasireddy Committed by Ville Syrjälä

drm/i915/ehl: Use an id of 4 while accessing DPLL4's CR0 and CR1

Although, DPLL4 enable and disable is associated with MGPLL1_ENABLE
register, we can use ICL_DPLL_CFGCR0/CR1 macros to access this dpll's
CR0 and CR1 registers by passing an id of 4 to these macros.
Reported-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: default avatarVivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190717021316.18610-1-vivek.kasireddy@intel.com
parent 5270130d
...@@ -3126,10 +3126,15 @@ static bool icl_pll_get_hw_state(struct drm_i915_private *dev_priv, ...@@ -3126,10 +3126,15 @@ static bool icl_pll_get_hw_state(struct drm_i915_private *dev_priv,
if (INTEL_GEN(dev_priv) >= 12) { if (INTEL_GEN(dev_priv) >= 12) {
hw_state->cfgcr0 = I915_READ(TGL_DPLL_CFGCR0(id)); hw_state->cfgcr0 = I915_READ(TGL_DPLL_CFGCR0(id));
hw_state->cfgcr1 = I915_READ(TGL_DPLL_CFGCR1(id)); hw_state->cfgcr1 = I915_READ(TGL_DPLL_CFGCR1(id));
} else {
if (IS_ELKHARTLAKE(dev_priv) && id == DPLL_ID_EHL_DPLL4) {
hw_state->cfgcr0 = I915_READ(ICL_DPLL_CFGCR0(4));
hw_state->cfgcr1 = I915_READ(ICL_DPLL_CFGCR1(4));
} else { } else {
hw_state->cfgcr0 = I915_READ(ICL_DPLL_CFGCR0(id)); hw_state->cfgcr0 = I915_READ(ICL_DPLL_CFGCR0(id));
hw_state->cfgcr1 = I915_READ(ICL_DPLL_CFGCR1(id)); hw_state->cfgcr1 = I915_READ(ICL_DPLL_CFGCR1(id));
} }
}
ret = true; ret = true;
out: out:
...@@ -3168,10 +3173,15 @@ static void icl_dpll_write(struct drm_i915_private *dev_priv, ...@@ -3168,10 +3173,15 @@ static void icl_dpll_write(struct drm_i915_private *dev_priv,
if (INTEL_GEN(dev_priv) >= 12) { if (INTEL_GEN(dev_priv) >= 12) {
cfgcr0_reg = TGL_DPLL_CFGCR0(id); cfgcr0_reg = TGL_DPLL_CFGCR0(id);
cfgcr1_reg = TGL_DPLL_CFGCR1(id); cfgcr1_reg = TGL_DPLL_CFGCR1(id);
} else {
if (IS_ELKHARTLAKE(dev_priv) && id == DPLL_ID_EHL_DPLL4) {
cfgcr0_reg = ICL_DPLL_CFGCR0(4);
cfgcr1_reg = ICL_DPLL_CFGCR1(4);
} else { } else {
cfgcr0_reg = ICL_DPLL_CFGCR0(id); cfgcr0_reg = ICL_DPLL_CFGCR0(id);
cfgcr1_reg = ICL_DPLL_CFGCR1(id); cfgcr1_reg = ICL_DPLL_CFGCR1(id);
} }
}
I915_WRITE(cfgcr0_reg, hw_state->cfgcr0); I915_WRITE(cfgcr0_reg, hw_state->cfgcr0);
I915_WRITE(cfgcr1_reg, hw_state->cfgcr1); I915_WRITE(cfgcr1_reg, hw_state->cfgcr1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment