|
@@ -4965,6 +4965,7 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
|
|
|
int pipe = intel_crtc->pipe, hsw_workaround_pipe;
|
|
|
struct intel_crtc_state *pipe_config =
|
|
|
to_intel_crtc_state(crtc->state);
|
|
|
+ bool is_dsi = intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DSI);
|
|
|
|
|
|
if (WARN_ON(intel_crtc->active))
|
|
|
return;
|
|
@@ -4994,9 +4995,12 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
|
|
|
intel_crtc->active = true;
|
|
|
|
|
|
intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, true);
|
|
|
- for_each_encoder_on_crtc(dev, crtc, encoder)
|
|
|
+ for_each_encoder_on_crtc(dev, crtc, encoder) {
|
|
|
+ if (encoder->pre_pll_enable)
|
|
|
+ encoder->pre_pll_enable(encoder);
|
|
|
if (encoder->pre_enable)
|
|
|
encoder->pre_enable(encoder);
|
|
|
+ }
|
|
|
|
|
|
if (intel_crtc->config->has_pch_encoder) {
|
|
|
intel_set_pch_fifo_underrun_reporting(dev_priv, TRANSCODER_A,
|
|
@@ -5004,7 +5008,8 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
|
|
|
dev_priv->display.fdi_link_train(crtc);
|
|
|
}
|
|
|
|
|
|
- intel_ddi_enable_pipe_clock(intel_crtc);
|
|
|
+ if (!is_dsi)
|
|
|
+ intel_ddi_enable_pipe_clock(intel_crtc);
|
|
|
|
|
|
if (INTEL_INFO(dev)->gen >= 9)
|
|
|
skylake_pfit_enable(intel_crtc);
|
|
@@ -5018,7 +5023,8 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
|
|
|
intel_crtc_load_lut(crtc);
|
|
|
|
|
|
intel_ddi_set_pipe_settings(crtc);
|
|
|
- intel_ddi_enable_transcoder_func(crtc);
|
|
|
+ if (!is_dsi)
|
|
|
+ intel_ddi_enable_transcoder_func(crtc);
|
|
|
|
|
|
intel_update_watermarks(crtc);
|
|
|
intel_enable_pipe(intel_crtc);
|
|
@@ -5026,7 +5032,7 @@ static void haswell_crtc_enable(struct drm_crtc *crtc)
|
|
|
if (intel_crtc->config->has_pch_encoder)
|
|
|
lpt_pch_enable(crtc);
|
|
|
|
|
|
- if (intel_crtc->config->dp_encoder_is_mst)
|
|
|
+ if (intel_crtc->config->dp_encoder_is_mst && !is_dsi)
|
|
|
intel_ddi_set_vc_payload_alloc(crtc, true);
|
|
|
|
|
|
assert_vblank_disabled(crtc);
|
|
@@ -5119,6 +5125,7 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
|
|
|
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
|
|
|
struct intel_encoder *encoder;
|
|
|
enum transcoder cpu_transcoder = intel_crtc->config->cpu_transcoder;
|
|
|
+ bool is_dsi = intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DSI);
|
|
|
|
|
|
for_each_encoder_on_crtc(dev, crtc, encoder) {
|
|
|
intel_opregion_notify_encoder(encoder, false);
|
|
@@ -5136,14 +5143,16 @@ static void haswell_crtc_disable(struct drm_crtc *crtc)
|
|
|
if (intel_crtc->config->dp_encoder_is_mst)
|
|
|
intel_ddi_set_vc_payload_alloc(crtc, false);
|
|
|
|
|
|
- intel_ddi_disable_transcoder_func(dev_priv, cpu_transcoder);
|
|
|
+ if (!is_dsi)
|
|
|
+ intel_ddi_disable_transcoder_func(dev_priv, cpu_transcoder);
|
|
|
|
|
|
if (INTEL_INFO(dev)->gen >= 9)
|
|
|
skylake_scaler_disable(intel_crtc);
|
|
|
else
|
|
|
ironlake_pfit_disable(intel_crtc, false);
|
|
|
|
|
|
- intel_ddi_disable_pipe_clock(intel_crtc);
|
|
|
+ if (!is_dsi)
|
|
|
+ intel_ddi_disable_pipe_clock(intel_crtc);
|
|
|
|
|
|
if (intel_crtc->config->has_pch_encoder) {
|
|
|
lpt_disable_pch_transcoder(dev_priv);
|