summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2019-07-08 17:07:35 +0300
committerImre Deak <imre.deak@intel.com>2019-07-09 18:48:57 +0300
commitf7ddc80ecb0e19e2c706747d1540b7699b4198d3 (patch)
tree7da14347f17d1b89ed8271a7f1e95adbfeb86f25 /drivers/gpu/drm/i915/display/intel_dpll_mgr.c
parent5c28e3a567fed9c22cb79f01294b1aaefee344fd (diff)
drm/i915/icl: Clear the shared port PLLs from the new crtc state
For consistency clear the icl_port_dplls from the new crtc state, when releasing the DPLLs from the old crtc state. Leaving them set could result in releasing the same PLLs multiple times from the same CRTC state incorrectly (if the same CRTC was first used for a TypeC port then for a combo PHY port). Leaving the stale pointers behind happens not to cause a problem atm (since the incorrect releasing will be a NOP), but we need to fix that for consistency. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190708140735.20198-2-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_dpll_mgr.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_dpll_mgr.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
index 5c18f9012062..30d7500eb66c 100644
--- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
+++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
@@ -3028,15 +3028,17 @@ static void icl_put_dplls(struct intel_atomic_state *state,
new_crtc_state->shared_dpll = NULL;
for (id = ICL_PORT_DPLL_DEFAULT; id < ICL_PORT_DPLL_COUNT; id++) {
- const struct icl_port_dpll *port_dpll =
+ const struct icl_port_dpll *old_port_dpll =
&old_crtc_state->icl_port_dplls[id];
+ struct icl_port_dpll *new_port_dpll =
+ &new_crtc_state->icl_port_dplls[id];
- if (!port_dpll->pll)
- continue;
+ new_port_dpll->pll = NULL;
- intel_unreference_shared_dpll(state, crtc, port_dpll->pll);
+ if (!old_port_dpll->pll)
+ continue;
- /* FIXME: Clear the icl_port_dplls from the new crtc state */
+ intel_unreference_shared_dpll(state, crtc, old_port_dpll->pll);
}
}