drm/i915: precompute pipe bpp before touching the hw
[deliverable/linux.git] / drivers / gpu / drm / i915 / intel_hdmi.c
index 0731ba660aac4f8bb8af82a094e658810fa0efd3..b206a0db77168a47215630ce341498b55b34dfb8 100644 (file)
@@ -791,6 +791,19 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
        if (HAS_PCH_SPLIT(dev) && !HAS_DDI(dev))
                pipe_config->has_pch_encoder = true;
 
+       /*
+        * HDMI is either 12 or 8, so if the display lets 10bpc sneak
+        * through, clamp it down. Note that g4x/vlv don't support 12bpc hdmi
+        * outputs.
+        */
+       if (pipe_config->pipe_bpp > 8*3 && HAS_PCH_SPLIT(dev)) {
+               DRM_DEBUG_KMS("forcing bpc to 12 for HDMI\n");
+               pipe_config->pipe_bpp = 12*3;
+       } else {
+               DRM_DEBUG_KMS("forcing bpc to 8 for HDMI\n");
+               pipe_config->pipe_bpp = 8*3;
+       }
+
        return true;
 }
 
This page took 0.032159 seconds and 5 git commands to generate.