@@ -1612,10 +1612,9 @@ static const struct bxt_clk_div bxt_dp_clk_val[] = {
{432000, 3, 1, 32, 1677722, 1, 1}
};
-static bool
-bxt_ddi_pll_select(struct intel_crtc *intel_crtc,
+bool bxt_ddi_pll_select(struct intel_crtc *intel_crtc,
struct intel_crtc_state *crtc_state,
- struct intel_encoder *intel_encoder)
+ struct intel_encoder *intel_encoder, bool find_pll)
{
struct intel_shared_dpll *pll;
struct bxt_clk_div clk_div = {0};
@@ -1724,6 +1723,9 @@ bxt_ddi_pll_select(struct intel_crtc *intel_crtc,
crtc_state->dpll_hw_state.pcsdw12 =
LANESTAGGER_STRAP_OVRD | lanestagger;
+ if (!find_pll)
+ goto exit;
+
pll = intel_get_shared_dpll(intel_crtc, crtc_state);
if (pll == NULL) {
DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n",
@@ -1734,6 +1736,7 @@ bxt_ddi_pll_select(struct intel_crtc *intel_crtc,
/* shared DPLL id 0 is DPLL A */
crtc_state->ddi_pll_sel = pll->id;
+exit:
return true;
}
@@ -1756,7 +1759,7 @@ bool intel_ddi_pll_select(struct intel_crtc *intel_crtc,
intel_encoder);
else if (IS_BROXTON(dev))
return bxt_ddi_pll_select(intel_crtc, crtc_state,
- intel_encoder);
+ intel_encoder, true);
else
return hsw_ddi_pll_select(intel_crtc, crtc_state,
intel_encoder);
@@ -1130,6 +1130,10 @@ void broxton_init_cdclk(struct drm_device *dev);
void broxton_uninit_cdclk(struct drm_device *dev);
void broxton_ddi_phy_init(struct drm_device *dev);
void broxton_ddi_phy_uninit(struct drm_device *dev);
+bool bxt_ddi_pll_select(struct intel_crtc *intel_crtc,
+ struct intel_crtc_state *crtc_state,
+ struct intel_encoder *intel_encoder,
+ bool find_pll);
void bxt_enable_dc9(struct drm_i915_private *dev_priv);
void bxt_disable_dc9(struct drm_i915_private *dev_priv);
void skl_init_cdclk(struct drm_i915_private *dev_priv);
Make bxt_ddi_pll_select non-static so that it can be called from other files also. The subsequent patches need this from display.c. The call to 'intel_get_shared_pll' is not required if there is already a valid PLL. This patch adds a boolean argument to by-pass this case. Signed-off-by: Durgadoss R <durgadoss.r@intel.com> --- drivers/gpu/drm/i915/intel_ddi.c | 11 +++++++---- drivers/gpu/drm/i915/intel_drv.h | 4 ++++ 2 files changed, 11 insertions(+), 4 deletions(-)