aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2012-10-24 14:09:25 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-26 04:24:47 -0400
commite28d54cbf97ca1f8cd49a9756e57ed614d64368d (patch)
treeaf2a33cde11d7bf2197bc3312d132677a747ca75 /drivers/gpu/drm/i915
parentad80a810ec3ffa96450ce3b40128d55fede7a825 (diff)
drm/i915: check TRANSCODER_EDP on intel_modeset_setup_hw_state
We need to check if any of the pipes is using TRANSCODER_EDP. V2: DDI_BUF_CTL was renamed, so fix the usage here. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f51b5eee30c5..d89dda02777b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8690,6 +8690,31 @@ void intel_modeset_setup_hw_state(struct drm_device *dev)
8690 struct intel_encoder *encoder; 8690 struct intel_encoder *encoder;
8691 struct intel_connector *connector; 8691 struct intel_connector *connector;
8692 8692
8693 if (IS_HASWELL(dev)) {
8694 tmp = I915_READ(TRANS_DDI_FUNC_CTL(TRANSCODER_EDP));
8695
8696 if (tmp & TRANS_DDI_FUNC_ENABLE) {
8697 switch (tmp & TRANS_DDI_EDP_INPUT_MASK) {
8698 case TRANS_DDI_EDP_INPUT_A_ON:
8699 case TRANS_DDI_EDP_INPUT_A_ONOFF:
8700 pipe = PIPE_A;
8701 break;
8702 case TRANS_DDI_EDP_INPUT_B_ONOFF:
8703 pipe = PIPE_B;
8704 break;
8705 case TRANS_DDI_EDP_INPUT_C_ONOFF:
8706 pipe = PIPE_C;
8707 break;
8708 }
8709
8710 crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
8711 crtc->cpu_transcoder = TRANSCODER_EDP;
8712
8713 DRM_DEBUG_KMS("Pipe %c using transcoder EDP\n",
8714 pipe_name(pipe));
8715 }
8716 }
8717
8693 for_each_pipe(pipe) { 8718 for_each_pipe(pipe) {
8694 crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); 8719 crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
8695 8720