1. HDR MetaData HB2 is 26.
2. Under HF1-53, HDR MetaData should be sent and
PB1 value should be exist in EDID.
Change-Id: I616b4cdcf321ea0080b845c868d1f4cd4881fd14
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit
39c34527e735b84e6ceb8a2e386aed0060111858)
video->vic = hdmi->vic & HDMI_VIC_MASK;
video->eotf = 0;
if (hdmi->eotf) {
- if (hdmi->eotf & hdmi->edid.hdr.hdrinfo.eotf)
+ if (hdmi->eotf & hdmi->edid.hdr.hdrinfo.eotf) {
video->eotf = hdmi->eotf;
- else
+ } else {
pr_err("sink eotf %x not support eotf %x\n",
hdmi->edid.hdr.hdrinfo.eotf,
hdmi->eotf);
+ if (hdmi->edid.hdr.hdrinfo.eotf &
+ EOTF_TRADITIONAL_GMMA_SDR)
+ video->eotf = EOTF_TRADITIONAL_GMMA_SDR;
+ }
}
/* ST_2084 must be 10bit and bt2020 */
if (video->eotf & EOTF_ST_2084) {
} else if (!strncmp(buf, "hdr", 3)) {
if (sscanf(buf, "hdr=%d", &value) == -1)
return -1;
- pr_debug("current hdr eotf is %d input hdr eotf is %d\n",
- hdmi->eotf, value);
+ pr_info("current hdr eotf is %d input hdr eotf is %d\n",
+ hdmi->eotf, value);
if (hdmi->eotf != value &&
- (hdmi->eotf & hdmi->edid.hdr.hdrinfo.eotf ||
+ (value & hdmi->edid.hdr.hdrinfo.eotf ||
hdmi->eotf == 0))
hdmi->eotf = value;
+ else
+ return 0;
} else {
return -1;
}
return;
hdmi_writel(hdmi_dev, FC_DRM_HB, 1);/*verion = 0x1*/
- hdmi_writel(hdmi_dev, (FC_DRM_HB + 1), 27);/*length of following data*/
+ hdmi_writel(hdmi_dev, (FC_DRM_HB + 1), 26);/*length of following data*/
hdmi_writel(hdmi_dev, FC_DRM_PB, eotf / 2);
hdmi_writel(hdmi_dev, FC_DRM_PB + 1, 0);