linux4kix/linux-linaro-stable-mx6 — pull request #15 by warped-rudi (2014-09-06 21:18:55+00:00)
Title: Enable video output using limited color range

Currently, the RGB output always uses full range (0..255). Commit 9119f4982209edf12dee44240bcfaa52fba2b4d3 adds the ability to indicate this to the sink (i.e the TV) by setting the corresponding 'Q' bits in byte 3 of the AVI info frame. However, these bits are only recognized by sinks that conform to CEA-861D, which appears to be the base for HDMI 1.3. Older TVs and even some not so old Sony Bravia models do not interpret this information and therefore still show wrong colors. This patch adds the ability to really force the output to limited color range (16..235) by using the on-chip color space converter. Even though the configuration options ('default', 'limited' and 'full') stay the same, the behavior is now the following:

mode|video output|color space conversion
--------|-------------|------------
full|range 0..255, indicated via AVI info frame bits Q1,Q0 = 1,0|bypassed
limited| range 16..235, indicated via AVI info frame Q1,Q0 = 0,1|enabled
default| range 16..235 for CEA modes except 640x480p (VGA), range 0..255 for non-CEA modes as well as VGA, Q1,Q0 = 0,0|when needed

A fully HDMI.13 compatible TV should show no visual difference when switching between these three modes. However, the SoC might use less power when the color space converter is not used. In DVI mode no color space conversion is performed and output is always in full range.