drm/i915: use pipe bpp when setting HDMI bpc
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 24 Jun 2011 19:19:25 +0000 (12:19 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 7 Jul 2011 20:20:46 +0000 (13:20 -0700)
The Intel HDMI encoder can support 8bpc or 12bpc.  Set the appropriate
value based on the pipe bpp when configuring the output.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/intel_hdmi.c

index 1b72aa42c2f9e46691c9e0ad908c57fe89dd3950..1ed8e6903915ff542e79ef2cd8becf89b3ba8912 100644 (file)
@@ -131,6 +131,11 @@ static void intel_hdmi_mode_set(struct drm_encoder *encoder,
        if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC)
                sdvox |= SDVO_HSYNC_ACTIVE_HIGH;
 
+       if (intel_crtc->bpp > 24)
+               sdvox |= COLOR_FORMAT_12bpc;
+       else
+               sdvox |= COLOR_FORMAT_8bpc;
+
        /* Required on CPT */
        if (intel_hdmi->has_hdmi_sink && HAS_PCH_CPT(dev))
                sdvox |= HDMI_MODE_SELECT;