aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_display.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ad03db4b7a5b..090ba2dba696 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7602,6 +7602,33 @@ intel_connector_break_all_links(struct intel_connector *connector)
7602 connector->encoder->base.crtc = NULL; 7602 connector->encoder->base.crtc = NULL;
7603} 7603}
7604 7604
7605static void intel_enable_pipe_a(struct drm_device *dev)
7606{
7607 struct intel_connector *connector;
7608 struct drm_connector *crt = NULL;
7609 struct intel_load_detect_pipe load_detect_temp;
7610
7611 /* We can't just switch on the pipe A, we need to set things up with a
7612 * proper mode and output configuration. As a gross hack, enable pipe A
7613 * by enabling the load detect pipe once. */
7614 list_for_each_entry(connector,
7615 &dev->mode_config.connector_list,
7616 base.head) {
7617 if (connector->encoder->type == INTEL_OUTPUT_ANALOG) {
7618 crt = &connector->base;
7619 break;
7620 }
7621 }
7622
7623 if (!crt)
7624 return;
7625
7626 if (intel_get_load_detect_pipe(crt, NULL, &load_detect_temp))
7627 intel_release_load_detect_pipe(crt, &load_detect_temp);
7628
7629
7630}
7631
7605static void intel_sanitize_crtc(struct intel_crtc *crtc) 7632static void intel_sanitize_crtc(struct intel_crtc *crtc)
7606{ 7633{
7607 struct drm_device *dev = crtc->base.dev; 7634 struct drm_device *dev = crtc->base.dev;
@@ -7650,6 +7677,15 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc)
7650 } 7677 }
7651ok: 7678ok:
7652 7679
7680 if (dev_priv->quirks & QUIRK_PIPEA_FORCE &&
7681 crtc->pipe == PIPE_A && !crtc->active) {
7682 /* BIOS forgot to enable pipe A, this mostly happens after
7683 * resume. Force-enable the pipe to fix this, the update_dpms
7684 * call below we restore the pipe to the right state, but leave
7685 * the required bits on. */
7686 intel_enable_pipe_a(dev);
7687 }
7688
7653 /* Adjust the state of the output pipe according to whether we 7689 /* Adjust the state of the output pipe according to whether we
7654 * have active connectors/encoders. */ 7690 * have active connectors/encoders. */
7655 intel_crtc_update_dpms(&crtc->base); 7691 intel_crtc_update_dpms(&crtc->base);