drm/i915: Flatten hsw_crtc_compute_clock()
hsw_crtc_compute_clock() has become spaghetti. Flatten it a bit to make it at least semi-legible. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210913144440.23008-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -937,17 +937,19 @@ static int hsw_crtc_compute_clock(struct intel_crtc_state *crtc_state)
|
|||||||
struct intel_encoder *encoder =
|
struct intel_encoder *encoder =
|
||||||
intel_get_crtc_new_encoder(state, crtc_state);
|
intel_get_crtc_new_encoder(state, crtc_state);
|
||||||
|
|
||||||
if (IS_DG2(dev_priv)) {
|
if (IS_DG2(dev_priv))
|
||||||
return intel_mpllb_calc_state(crtc_state, encoder);
|
return intel_mpllb_calc_state(crtc_state, encoder);
|
||||||
} else if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI) ||
|
|
||||||
DISPLAY_VER(dev_priv) >= 11) {
|
if (DISPLAY_VER(dev_priv) < 11 &&
|
||||||
|
intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI))
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (!intel_reserve_shared_dplls(state, crtc, encoder)) {
|
if (!intel_reserve_shared_dplls(state, crtc, encoder)) {
|
||||||
drm_dbg_kms(&dev_priv->drm,
|
drm_dbg_kms(&dev_priv->drm,
|
||||||
"failed to find PLL for pipe %c\n",
|
"failed to find PLL for pipe %c\n",
|
||||||
pipe_name(crtc->pipe));
|
pipe_name(crtc->pipe));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user