]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
drm/i915: disable sdvo pixel multiplier cross-check for HAS_PCH_SPLIT
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Jun 2013 09:47:24 +0000 (11:47 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Jun 2013 14:50:45 +0000 (16:50 +0200)
We don't (yet) have proper pixel multiplier readout support on pch
split platforms, so the cross check will naturally fail.

v2: Fix spelling in the comment, spotted by Ville.

v3: Since the ordering constraint is pretty tricky between the crtc
get_pipe_config callback and the encoder->get_config callback add a
few comments about it. Prompted by a discussion with Chris Wilson on
irc about why this does work anywhere else than on i915g/gm.

Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sdvo.c

index b77df049b7736ba0c1f01ba8ecfa9e86e60d7717..4a69bdc4f8cac3119152f5536dbf45631152f451 100644 (file)
@@ -140,7 +140,8 @@ struct intel_encoder {
         * it is connected to in the pipe parameter. */
        bool (*get_hw_state)(struct intel_encoder *, enum pipe *pipe);
        /* Reconstructs the equivalent mode flags for the current hardware
-        * state. */
+        * state. This must be called _after_ display->get_pipe_config has
+        * pre-filled the pipe config. */
        void (*get_config)(struct intel_encoder *,
                           struct intel_crtc_config *pipe_config);
        int crtc_mask;
index 97d3099aea239ae1568e398a8c9456fda4c0d59b..b8e1623be30d57a70570536f4f7aa2d1a771c712 100644 (file)
@@ -1342,6 +1342,13 @@ static void intel_sdvo_get_config(struct intel_encoder *encoder,
 
        pipe_config->adjusted_mode.flags |= flags;
 
+       /*
+        * pixel multiplier readout is tricky: Only on i915g/gm it is stored in
+        * the sdvo port register, on all other platforms it is part of the dpll
+        * state. Since the general pipe state readout happens before the
+        * encoder->get_config we so already have a valid pixel multplier on all
+        * other platfroms.
+        */
        if (IS_I915G(dev) || IS_I915GM(dev)) {
                sdvox = I915_READ(intel_sdvo->sdvo_reg);
                pipe_config->pixel_multiplier =
@@ -1362,6 +1369,10 @@ static void intel_sdvo_get_config(struct intel_encoder *encoder,
                encoder_pixel_multiplier = 4;
                break;
        }
+
+       if(HAS_PCH_SPLIT(dev))
+               return; /* no pixel multiplier readout support yet */
+
        WARN(encoder_pixel_multiplier != pipe_config->pixel_multiplier,
             "SDVO pixel multiplier mismatch, port: %i, encoder: %i\n",
             pipe_config->pixel_multiplier, encoder_pixel_multiplier);