[PATCH 1/2] drm/i915: Clear the shared PLL from the put_dplls() hook
Imre Deak
imre.deak at intel.com
Wed Jul 3 18:40:45 UTC 2019
For symmetry with the get_dplls() hook which sets the shared_dpll
pointer clear the same pointer from the put_dplls() hook.
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 17 ++++++++++++-----
1 file changed, 12 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 f953971e7c3b..7dbb4995b594 100644
--- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
+++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
@@ -323,13 +323,16 @@ static void intel_unreference_shared_dpll(struct intel_atomic_state *state,
static void intel_put_dpll(struct intel_atomic_state *state,
struct intel_crtc *crtc)
{
- struct intel_crtc_state *crtc_state =
+ struct intel_crtc_state *old_crtc_state =
+ intel_atomic_get_old_crtc_state(state, crtc);
+ struct intel_crtc_state *new_crtc_state =
intel_atomic_get_old_crtc_state(state, crtc);
- if (!crtc_state->shared_dpll)
+ if (!old_crtc_state->shared_dpll)
return;
- intel_unreference_shared_dpll(state, crtc, crtc_state->shared_dpll);
+ intel_unreference_shared_dpll(state, crtc, old_crtc_state->shared_dpll);
+ new_crtc_state->shared_dpll = NULL;
}
/**
@@ -3008,13 +3011,15 @@ static bool icl_get_dplls(struct intel_atomic_state *state,
static void icl_put_dplls(struct intel_atomic_state *state,
struct intel_crtc *crtc)
{
- struct intel_crtc_state *crtc_state =
+ struct intel_crtc_state *old_crtc_state =
intel_atomic_get_old_crtc_state(state, crtc);
+ struct intel_crtc_state *new_crtc_state =
+ intel_atomic_get_new_crtc_state(state, crtc);
enum icl_port_dpll_id id;
for (id = ICL_PORT_DPLL_DEFAULT; id < ICL_PORT_DPLL_COUNT; id++) {
struct icl_port_dpll *port_dpll =
- &crtc_state->icl_port_dplls[id];
+ &old_crtc_state->icl_port_dplls[id];
if (!port_dpll->pll)
continue;
@@ -3023,6 +3028,8 @@ static void icl_put_dplls(struct intel_atomic_state *state,
/* FIXME: Clear the icl_port_dplls from the new crtc state */
}
+
+ new_crtc_state->shared_dpll = NULL;
}
static bool mg_pll_get_hw_state(struct drm_i915_private *dev_priv,
--
2.17.1
More information about the Intel-gfx-trybot
mailing list