diff options
author | Imre Deak <imre.deak@intel.com> | 2016-09-26 10:54:31 -0400 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2016-10-10 09:06:39 -0400 |
commit | 9bf9675cafde2cbc6f7b56c120d804c4e7111981 (patch) | |
tree | 47763e465fd63323cd17a2a0f7bb8ae551238c6f | |
parent | 73fed0ef8567f1e1cba079994353e60208ded964 (diff) |
drm/i915/bxt: Fix HDMI DPLL configuration
a277ca7dc01d should've been a no-functional-change commit, but it
removed the initialization of the dpll_hw_state for HDMI outputs,
resulting in state mismatches and a failed modeset with blank
screen. Fix this by reinstating the dpll_hw_state initialization.
v2:
- Make bxt_ddi_hdmi_set_dpll_hw_state() static.
Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Fixes: a277ca7dc01d ("drm/i915: Split bxt_ddi_pll_select()")
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1474901671-22719-1-git-send-email-imre.deak@intel.com
(cherry picked from commit a04139c4cf289119cdfb6081af602f7a452fb7c2)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/intel_dpll_mgr.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c index c26d18a574b6..1c59ca50c430 100644 --- a/drivers/gpu/drm/i915/intel_dpll_mgr.c +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c | |||
@@ -1694,21 +1694,32 @@ bool bxt_ddi_dp_set_dpll_hw_state(int clock, | |||
1694 | return bxt_ddi_set_dpll_hw_state(clock, &clk_div, dpll_hw_state); | 1694 | return bxt_ddi_set_dpll_hw_state(clock, &clk_div, dpll_hw_state); |
1695 | } | 1695 | } |
1696 | 1696 | ||
1697 | static bool | ||
1698 | bxt_ddi_hdmi_set_dpll_hw_state(struct intel_crtc *intel_crtc, | ||
1699 | struct intel_crtc_state *crtc_state, int clock, | ||
1700 | struct intel_dpll_hw_state *dpll_hw_state) | ||
1701 | { | ||
1702 | struct bxt_clk_div clk_div = { }; | ||
1703 | |||
1704 | bxt_ddi_hdmi_pll_dividers(intel_crtc, crtc_state, clock, &clk_div); | ||
1705 | |||
1706 | return bxt_ddi_set_dpll_hw_state(clock, &clk_div, dpll_hw_state); | ||
1707 | } | ||
1708 | |||
1697 | static struct intel_shared_dpll * | 1709 | static struct intel_shared_dpll * |
1698 | bxt_get_dpll(struct intel_crtc *crtc, | 1710 | bxt_get_dpll(struct intel_crtc *crtc, |
1699 | struct intel_crtc_state *crtc_state, | 1711 | struct intel_crtc_state *crtc_state, |
1700 | struct intel_encoder *encoder) | 1712 | struct intel_encoder *encoder) |
1701 | { | 1713 | { |
1702 | struct bxt_clk_div clk_div = {0}; | 1714 | struct intel_dpll_hw_state dpll_hw_state = { }; |
1703 | struct intel_dpll_hw_state dpll_hw_state = {0}; | ||
1704 | struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); | 1715 | struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); |
1705 | struct intel_digital_port *intel_dig_port; | 1716 | struct intel_digital_port *intel_dig_port; |
1706 | struct intel_shared_dpll *pll; | 1717 | struct intel_shared_dpll *pll; |
1707 | int i, clock = crtc_state->port_clock; | 1718 | int i, clock = crtc_state->port_clock; |
1708 | 1719 | ||
1709 | if (encoder->type == INTEL_OUTPUT_HDMI | 1720 | if (encoder->type == INTEL_OUTPUT_HDMI && |
1710 | && !bxt_ddi_hdmi_pll_dividers(crtc, crtc_state, | 1721 | !bxt_ddi_hdmi_set_dpll_hw_state(crtc, crtc_state, clock, |
1711 | clock, &clk_div)) | 1722 | &dpll_hw_state)) |
1712 | return NULL; | 1723 | return NULL; |
1713 | 1724 | ||
1714 | if ((encoder->type == INTEL_OUTPUT_DP || | 1725 | if ((encoder->type == INTEL_OUTPUT_DP || |