Commit 15dc88a8 authored by Ville Syrjälä's avatar Ville Syrjälä

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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190207173230.22368-4-ville.syrjala@linux.intel.comReviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent 98b6072c
...@@ -1344,8 +1344,7 @@ static bool skl_ddi_hdmi_pll_dividers(struct intel_crtc_state *crtc_state) ...@@ -1344,8 +1344,7 @@ static bool skl_ddi_hdmi_pll_dividers(struct intel_crtc_state *crtc_state)
} }
static bool static bool
skl_ddi_dp_set_dpll_hw_state(struct intel_crtc_state *crtc_state, skl_ddi_dp_set_dpll_hw_state(struct intel_crtc_state *crtc_state)
struct intel_dpll_hw_state *dpll_hw_state)
{ {
u32 ctrl1; u32 ctrl1;
...@@ -1376,7 +1375,11 @@ skl_ddi_dp_set_dpll_hw_state(struct intel_crtc_state *crtc_state, ...@@ -1376,7 +1375,11 @@ skl_ddi_dp_set_dpll_hw_state(struct intel_crtc_state *crtc_state,
break; 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; return true;
} }
...@@ -1386,9 +1389,6 @@ skl_get_dpll(struct intel_crtc_state *crtc_state, ...@@ -1386,9 +1389,6 @@ skl_get_dpll(struct intel_crtc_state *crtc_state,
{ {
struct intel_shared_dpll *pll; struct intel_shared_dpll *pll;
bool bret; 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)) { if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) {
bret = skl_ddi_hdmi_pll_dividers(crtc_state); bret = skl_ddi_hdmi_pll_dividers(crtc_state);
...@@ -1397,12 +1397,11 @@ skl_get_dpll(struct intel_crtc_state *crtc_state, ...@@ -1397,12 +1397,11 @@ skl_get_dpll(struct intel_crtc_state *crtc_state,
return NULL; return NULL;
} }
} else if (intel_crtc_has_dp_encoder(crtc_state)) { } 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) { if (!bret) {
DRM_DEBUG_KMS("Could not set DP dpll HW state.\n"); DRM_DEBUG_KMS("Could not set DP dpll HW state.\n");
return NULL; return NULL;
} }
crtc_state->dpll_hw_state = dpll_hw_state;
} else { } else {
return NULL; return NULL;
} }
......
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