Commit e7a639c4 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: fix up the edp power well check

Now that we track the cpu transcoder we need accurately in the pipe
config we can finally fix up the transcoder check. With the current
code eDP on port D will be broken since we'd errornously cut the
power.

For reference see

commit 2124b72e
Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
Date:   Fri Mar 22 14:07:23 2013 -0300

    drm/i915: don't disable the power well yet

v2:
- Kill the now outdated comment (Paulo)
- Add the missing crtc->base.enabled check and consolidate it (Paulo)
- Smash all checks together, looks neater that way.

v3: Kill the unused encoder variable.

Cc: Takashi Iwai <tiwai@suse.de>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent a1f2cc73
...@@ -5793,23 +5793,13 @@ static void haswell_modeset_global_resources(struct drm_device *dev) ...@@ -5793,23 +5793,13 @@ static void haswell_modeset_global_resources(struct drm_device *dev)
{ {
bool enable = false; bool enable = false;
struct intel_crtc *crtc; struct intel_crtc *crtc;
struct intel_encoder *encoder;
list_for_each_entry(crtc, &dev->mode_config.crtc_list, base.head) { list_for_each_entry(crtc, &dev->mode_config.crtc_list, base.head) {
if (crtc->pipe != PIPE_A && crtc->base.enabled) if (!crtc->base.enabled)
enable = true; continue;
/* XXX: Should check for edp transcoder here, but thanks to init
* sequence that's not yet available. Just in case desktop eDP
* on PORT D is possible on haswell, too. */
/* Even the eDP panel fitter is outside the always-on well. */
if (crtc->config.pch_pfit.size && crtc->base.enabled)
enable = true;
}
list_for_each_entry(encoder, &dev->mode_config.encoder_list, if (crtc->pipe != PIPE_A || crtc->config.pch_pfit.size ||
base.head) { crtc->config.cpu_transcoder != TRANSCODER_EDP)
if (encoder->type != INTEL_OUTPUT_EDP &&
encoder->connectors_active)
enable = true; enable = true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment