diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2015-08-31 04:23:28 -0400 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2015-09-01 05:42:27 -0400 |
commit | 6fa2d197936ba0b8936e813d0adecefac160062b (patch) | |
tree | a25632f5a0d29a2b7ba34a6b4ddc55fd60093bc3 | |
parent | 7e6313a2516dbcd168f4ae36f0abe1a9227106b5 (diff) |
i915: Set ddi_pll_sel in DP MST path
The DP MST encoder config function never sets ddi_pll_sel, even though
its value is programmed in its ->pre_enable() hook. That used to work
because a new pipe_config was kzalloc'ed at every modeset, and the value
of zero selects the highest clock for the PLL. Starting with the commit
below, the value of ddi_pll_sel is preserved through modesets, and since
the correct value wasn't properly setup by the MST code, it could lead
to warnings and blank screens.
commit 8504c74c7ae48b4b8ed1f1c0acf67482a7f45c93
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date: Fri May 15 11:51:50 2015 +0300
drm/i915: Preserve ddi_pll_sel when allocating new pipe_config
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91628
Cc: stable@vger.kernel.org # 7e6313a2516d drm/i915: Don't use link_bw for PLL setup
Cc: stable@vger.kernel.org
Cc: Timo Aaltonen <tjaalton@ubuntu.com>
Cc: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp_mst.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index ef345d56f5cd..0a2e33fbf20d 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1175,7 +1175,7 @@ skl_edp_set_pll_config(struct intel_crtc_state *pipe_config) | |||
1175 | pipe_config->dpll_hw_state.ctrl1 = ctrl1; | 1175 | pipe_config->dpll_hw_state.ctrl1 = ctrl1; |
1176 | } | 1176 | } |
1177 | 1177 | ||
1178 | static void | 1178 | void |
1179 | hsw_dp_set_ddi_pll_sel(struct intel_crtc_state *pipe_config) | 1179 | hsw_dp_set_ddi_pll_sel(struct intel_crtc_state *pipe_config) |
1180 | { | 1180 | { |
1181 | memset(&pipe_config->dpll_hw_state, 0, | 1181 | memset(&pipe_config->dpll_hw_state, 0, |
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c index 369f8b6b804f..983553cf8b74 100644 --- a/drivers/gpu/drm/i915/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/intel_dp_mst.c | |||
@@ -33,6 +33,7 @@ | |||
33 | static bool intel_dp_mst_compute_config(struct intel_encoder *encoder, | 33 | static bool intel_dp_mst_compute_config(struct intel_encoder *encoder, |
34 | struct intel_crtc_state *pipe_config) | 34 | struct intel_crtc_state *pipe_config) |
35 | { | 35 | { |
36 | struct drm_device *dev = encoder->base.dev; | ||
36 | struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); | 37 | struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); |
37 | struct intel_digital_port *intel_dig_port = intel_mst->primary; | 38 | struct intel_digital_port *intel_dig_port = intel_mst->primary; |
38 | struct intel_dp *intel_dp = &intel_dig_port->dp; | 39 | struct intel_dp *intel_dp = &intel_dig_port->dp; |
@@ -97,6 +98,10 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder, | |||
97 | &pipe_config->dp_m_n); | 98 | &pipe_config->dp_m_n); |
98 | 99 | ||
99 | pipe_config->dp_m_n.tu = slots; | 100 | pipe_config->dp_m_n.tu = slots; |
101 | |||
102 | if (IS_HASWELL(dev) || IS_BROADWELL(dev)) | ||
103 | hsw_dp_set_ddi_pll_sel(pipe_config); | ||
104 | |||
100 | return true; | 105 | return true; |
101 | 106 | ||
102 | } | 107 | } |
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 93008fbb815d..2b9e6f9775c5 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -1185,6 +1185,7 @@ void intel_edp_drrs_disable(struct intel_dp *intel_dp); | |||
1185 | void intel_edp_drrs_invalidate(struct drm_device *dev, | 1185 | void intel_edp_drrs_invalidate(struct drm_device *dev, |
1186 | unsigned frontbuffer_bits); | 1186 | unsigned frontbuffer_bits); |
1187 | void intel_edp_drrs_flush(struct drm_device *dev, unsigned frontbuffer_bits); | 1187 | void intel_edp_drrs_flush(struct drm_device *dev, unsigned frontbuffer_bits); |
1188 | void hsw_dp_set_ddi_pll_sel(struct intel_crtc_state *pipe_config); | ||
1188 | 1189 | ||
1189 | /* intel_dp_mst.c */ | 1190 | /* intel_dp_mst.c */ |
1190 | int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id); | 1191 | int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id); |