drm/i915: implement workaround for VTOTAL when using TRANSCODER_EDP
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Wed, 24 Oct 2012 13:34:43 +0000 (11:34 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 26 Oct 2012 08:24:49 +0000 (10:24 +0200)
See the documentation for the DDI_FUNC_CTL register, EDP Input Select
bits: when the EDP input selection is B, the VTOTAL_B must be
programmed with the VTOTAL_EDP value, same thing for selection C.

V2: Use I915_READ as suggested by Daniel Vetter.

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_display.c

index 0f3187c516c52084c49f3607118dd78a4fbdcf9a..a5be34664299dea144f98024390d48cfbc359267 100644 (file)
@@ -4524,6 +4524,14 @@ static void intel_set_pipe_timings(struct intel_crtc *intel_crtc,
                   (adjusted_mode->crtc_vsync_start - 1) |
                   ((adjusted_mode->crtc_vsync_end - 1) << 16));
 
+       /* Workaround: when the EDP input selection is B, the VTOTAL_B must be
+        * programmed with the VTOTAL_EDP value. Same for VTOTAL_C. This is
+        * documented on the DDI_FUNC_CTL register description, EDP Input Select
+        * bits. */
+       if (IS_HASWELL(dev) && cpu_transcoder == TRANSCODER_EDP &&
+           (pipe == PIPE_B || pipe == PIPE_C))
+               I915_WRITE(VTOTAL(pipe), I915_READ(VTOTAL(cpu_transcoder)));
+
        /* pipesrc controls the size that is scaled from, which should
         * always be the user's requested size.
         */
This page took 0.028248 seconds and 5 git commands to generate.