diff options
author | Ville Syrjälä <[email protected]> | 2019-02-07 19:32:21 +0200 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2019-03-19 12:54:16 +0200 |
commit | 15dc88a87765f4e081fb8ff2b2e21fa234951ee6 (patch) | |
tree | 2692318e8adca84a6adeb4a0c3016014d60a9a5f | |
parent | 98b6072c2a3ad6214d652917c60022693dd34243 (diff) |
drm/i915: Remove redundant on stack dpll_hw_state from skl_get_dpll()
Just store the stuff directly into crtc_state->dpll_hw_state rather
than to a temp and copying the whole thing over.
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Lucas De Marchi <[email protected]>
-rw-r--r-- | drivers/gpu/drm/i915/intel_dpll_mgr.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c index ea2e0687e0bb..5ad6cde5cbc8 100644 --- a/drivers/gpu/drm/i915/intel_dpll_mgr.c +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c @@ -1344,8 +1344,7 @@ static bool skl_ddi_hdmi_pll_dividers(struct intel_crtc_state *crtc_state) } static bool -skl_ddi_dp_set_dpll_hw_state(struct intel_crtc_state *crtc_state, - struct intel_dpll_hw_state *dpll_hw_state) +skl_ddi_dp_set_dpll_hw_state(struct intel_crtc_state *crtc_state) { u32 ctrl1; @@ -1376,7 +1375,11 @@ skl_ddi_dp_set_dpll_hw_state(struct intel_crtc_state *crtc_state, break; } - dpll_hw_state->ctrl1 = ctrl1; + memset(&crtc_state->dpll_hw_state, 0, + sizeof(crtc_state->dpll_hw_state)); + + crtc_state->dpll_hw_state.ctrl1 = ctrl1; + return true; } @@ -1386,9 +1389,6 @@ skl_get_dpll(struct intel_crtc_state *crtc_state, { struct intel_shared_dpll *pll; bool bret; - struct intel_dpll_hw_state dpll_hw_state; - - memset(&dpll_hw_state, 0, sizeof(dpll_hw_state)); if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) { bret = skl_ddi_hdmi_pll_dividers(crtc_state); @@ -1397,12 +1397,11 @@ skl_get_dpll(struct intel_crtc_state *crtc_state, return NULL; } } else if (intel_crtc_has_dp_encoder(crtc_state)) { - bret = skl_ddi_dp_set_dpll_hw_state(crtc_state, &dpll_hw_state); + bret = skl_ddi_dp_set_dpll_hw_state(crtc_state); if (!bret) { DRM_DEBUG_KMS("Could not set DP dpll HW state.\n"); return NULL; } - crtc_state->dpll_hw_state = dpll_hw_state; } else { return NULL; } |