drm/i915: select the correct pipe when using TRANSCODER_EDP
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 23 Oct 2012 20:30:04 +0000 (18:30 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 26 Oct 2012 08:24:50 +0000 (10:24 +0200)
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ddi.c

index c3d06532e9c5f5c893e9f1aa174f07cd3565e102..7ea373ffe7a18fac7e1832857f1ceb126f6abddc 100644 (file)
@@ -954,6 +954,23 @@ void intel_ddi_enable_pipe_func(struct drm_crtc *crtc)
        if (crtc->mode.flags & DRM_MODE_FLAG_PHSYNC)
                temp |= TRANS_DDI_PHSYNC;
 
+       if (cpu_transcoder == TRANSCODER_EDP) {
+               switch (pipe) {
+               case PIPE_A:
+                       temp |= TRANS_DDI_EDP_INPUT_A_ONOFF;
+                       break;
+               case PIPE_B:
+                       temp |= TRANS_DDI_EDP_INPUT_B_ONOFF;
+                       break;
+               case PIPE_C:
+                       temp |= TRANS_DDI_EDP_INPUT_C_ONOFF;
+                       break;
+               default:
+                       BUG();
+                       break;
+               }
+       }
+
        if (type == INTEL_OUTPUT_HDMI) {
                struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);