drm/rockchip: inno_hdmi: set avi colorimetry and scan_mode

Accroding to CTA-861, a Source shall set scan_mode = 1 or
scan_mode = 2 if it is confident of the accuracy of those
values. Otherwise, it shall set zero(no data).

By default, an SD Video Format shall be encoded according
to SMPTE 170M [1] color space, an HD Video Format shall be
encoded according to ITU-R BT.709 [7] color space. And a
Source shall be prohibited from setting colorimetry to 1 or
2 when colorspace is RGB.

Change-Id: I0da867cca5b757b3abcac69ff71616f990f2b7bb
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
This commit is contained in:
Zheng Yang 2017-12-07 10:14:22 +08:00 committed by Tao Huang
parent c28a16dbd0
commit 90fe82f17e

View File

@ -317,6 +317,11 @@ static int inno_hdmi_config_video_avi(struct inno_hdmi *hdmi,
else
frame.avi.colorspace = HDMI_COLORSPACE_RGB;
if (frame.avi.colorspace != HDMI_COLORSPACE_RGB)
frame.avi.colorimetry = hdmi->hdmi_data.colorimetry;
frame.avi.scan_mode = HDMI_SCAN_MODE_NONE;
return inno_hdmi_upload_frame(hdmi, rc, &frame, INFOFRAME_AVI, 0, 0, 0);
}