diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-01-11 13:57:25 +0100 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-01-26 17:37:13 +0100 |
commit | fcc8a22cc9053a8d1bbb94833ec103cd5961feef (patch) | |
tree | 5ac48ba33aafd2aaabd9b2557f6ebdcfe7eb2554 /drivers/gpu/drm/drm_edid.c | |
parent | drm/edid: Set AVI infoframe Q even when QS=0 (diff) | |
download | linux-fcc8a22cc9053a8d1bbb94833ec103cd5961feef.tar.xz linux-fcc8a22cc9053a8d1bbb94833ec103cd5961feef.zip |
drm/edid: Set YQ bits in the AVI infoframe according to CEA-861-F
CEA-861-F tells us:
"When transmitting any RGB colorimetry, the Source should set the
YQ-field to match the RGB Quantization Range being transmitted
(e.g., when Limited Range RGB, set YQ=0 or when Full Range RGB,
set YQ=1) and the Sink shall ignore the YQ-field."
So let's go ahead and do that. Perhaps there are sinks that don't
ignore the YQ as they should for RGB?
I wasn't able to find similar text in CEA-861-E, so it would seem
to be a fairly "recent" addition.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170111125725.8086-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 292cb5023683..baa6ccb3e18b 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -4321,6 +4321,20 @@ drm_hdmi_avi_infoframe_quant_range(struct hdmi_avi_infoframe *frame, frame->quantization_range = rgb_quant_range; else frame->quantization_range = HDMI_QUANTIZATION_RANGE_DEFAULT; + + /* + * CEA-861-F: + * "When transmitting any RGB colorimetry, the Source should set the + * YQ-field to match the RGB Quantization Range being transmitted + * (e.g., when Limited Range RGB, set YQ=0 or when Full Range RGB, + * set YQ=1) and the Sink shall ignore the YQ-field." + */ + if (rgb_quant_range == HDMI_QUANTIZATION_RANGE_LIMITED) + frame->ycc_quantization_range = + HDMI_YCC_QUANTIZATION_RANGE_LIMITED; + else + frame->ycc_quantization_range = + HDMI_YCC_QUANTIZATION_RANGE_FULL; } EXPORT_SYMBOL(drm_hdmi_avi_infoframe_quant_range); |