pr_info("hdmitx: not support DolbyVision\n");
return;
}
-/*ver0 and ver1_15 use hdmi 1.4b VSIF*/
+ /*ver0 and ver1_15 and ver1_12bit with ll= 0 use hdmi 1.4b VSIF*/
if ((hdev->RXCap.dv_info.ver == 0) || ((hdev->RXCap.dv_info.ver == 1)
- && (hdev->RXCap.dv_info.length == 0xE))) {
+ && (hdev->RXCap.dv_info.length == 0xE))
+ || ((hdev->RXCap.dv_info.ver == 1)
+ && (hdev->RXCap.dv_info.length == 0xB)
+ && (hdev->RXCap.dv_info.low_latency == 0))) {
if ((vic == HDMI_3840x2160p30_16x9) ||
(vic == HDMI_3840x2160p25_16x9) ||
(vic == HDMI_3840x2160p24_16x9) ||
}
if (type == EOTF_T_DOLBYVISION) {
hdev->HWOp.SetPacket(HDMI_PACKET_VEND, VEN_DB1, VEN_HB);
+ hdev->HWOp.CntlConfig(hdev, CONF_AVI_BT2020,
+ CLR_AVI_BT2020);/*BT709*/
if (tunnel_mode == RGB_8BIT) {
hdev->HWOp.CntlConfig(hdev,
CONF_AVI_RGBYCC_INDIC,
CONF_AVI_Q01, RGB_RANGE_LIM);
hdev->HWOp.CntlConfig(hdev,
CONF_AVI_YQ01, YCC_RANGE_LIM);
+ hdev->HWOp.CntlConfig(hdev, CONF_AVI_BT2020,
+ CLR_AVI_BT2020);/*BT709*/
}
}
- /*ver1_12 and ver2 use Dolby VSIF*/
+ /*ver1_12 with low_latency = 1 and ver2 use Dolby VSIF*/
if ((hdev->RXCap.dv_info.ver == 2) || ((hdev->RXCap.dv_info.ver == 1)
- && (hdev->RXCap.dv_info.length == 0xB))
+ && (hdev->RXCap.dv_info.length == 0xB)
+ && (hdev->RXCap.dv_info.low_latency == 1))
|| (type == EOTF_T_LL_MODE)) {
if (data == NULL)
/*Dolby Vision standard case*/
if (type == EOTF_T_DOLBYVISION) {
hdev->HWOp.SetPacket(HDMI_PACKET_VEND, VEN_DB2, VEN_HB);
+ hdev->HWOp.CntlConfig(hdev, CONF_AVI_BT2020,
+ CLR_AVI_BT2020);/*BT709*/
if (tunnel_mode == RGB_8BIT) {/*RGB444*/
hdev->HWOp.CntlConfig(hdev,
CONF_AVI_RGBYCC_INDIC,
/*Dolby Vision low-latency case*/
else if (type == EOTF_T_LL_MODE) {
hdev->HWOp.SetPacket(HDMI_PACKET_VEND, VEN_DB2, VEN_HB);
+ if (hdev->RXCap.colorimetry_data & 0xe0)
+ /*if RX support BT2020, then output BT2020*/
+ hdev->HWOp.CntlConfig(hdev, CONF_AVI_BT2020,
+ SET_AVI_BT2020);/*BT2020*/
+ else
+ hdev->HWOp.CntlConfig(hdev, CONF_AVI_BT2020,
+ CLR_AVI_BT2020);/*BT709*/
if (tunnel_mode == RGB_10_12BIT) {/*10/12bit RGB444*/
hdev->HWOp.CntlConfig(hdev,
CONF_AVI_RGBYCC_INDIC,
CONF_AVI_Q01, RGB_RANGE_LIM);
hdev->HWOp.CntlConfig(hdev,
CONF_AVI_YQ01, YCC_RANGE_LIM);
+ hdev->HWOp.CntlConfig(hdev, CONF_AVI_BT2020,
+ CLR_AVI_BT2020);/*BT709*/
}
}
}
hd_set_reg_bits(P_VPU_HDMI_SETTING, 1, 8, 1);
}
+ if (hdev->para->cs == COLORSPACE_YUV422) {
+ hd_set_reg_bits(P_VPU_HDMI_FMT_CTRL, 1, 0, 2);
+ hd_set_reg_bits(P_VPU_HDMI_SETTING, 0, 4, 4);
+ hd_set_reg_bits(P_VPU_HDMI_SETTING, 0, 8, 1);
+ }
+
switch (hdev->para->cd) {
case COLORDEPTH_30B:
case COLORDEPTH_36B:
if (hdev->chip_type >= MESON_CPU_ID_GXM) {
unsigned int hs_flag = 0;
/* 12-10 dithering on */
- hd_set_reg_bits(P_VPU_HDMI_FMT_CTRL, 1, 4, 1);
+ hd_set_reg_bits(P_VPU_HDMI_FMT_CTRL, 0, 4, 1);
/* hsync/vsync not invert */
hs_flag = (hd_read_reg(P_VPU_HDMI_SETTING) >> 2) & 0x3;
hd_set_reg_bits(P_VPU_HDMI_SETTING, 0, 2, 2);
hdmitx_wr_reg(HDMITX_TOP_BIST_CNTL, data32);
/* Configure video */
- vid_map = (input_color_format == COLORSPACE_RGB444) ?
- ((color_depth == COLORDEPTH_24B) ? 0x01 :
- (color_depth == COLORDEPTH_30B) ? 0x03 :
- (color_depth == COLORDEPTH_36B) ? 0x05 :
- 0x07) :
- ((input_color_format == COLORSPACE_YUV444) ||
- (input_color_format == COLORSPACE_YUV420)) ?
- ((color_depth == COLORDEPTH_24B) ? 0x09 :
- (color_depth == COLORDEPTH_30B) ? 0x0b :
- (color_depth == COLORDEPTH_36B) ? 0x0d :
- 0x0f) :
- ((color_depth == COLORDEPTH_24B) ? 0x16 :
- (color_depth == COLORDEPTH_30B) ? 0x14 :
- 0x12);
+ if (input_color_format == COLORSPACE_RGB444) {
+ if (color_depth == COLORDEPTH_24B)
+ vid_map = 0x01;
+ else if (color_depth == COLORDEPTH_30B)
+ vid_map = 0x03;
+ else if (color_depth == COLORDEPTH_36B)
+ vid_map = 0x05;
+ else
+ vid_map = 0x07;
+ } else if (((input_color_format == COLORSPACE_YUV444) ||
+ (input_color_format == COLORSPACE_YUV420)) &&
+ (output_color_format != COLORSPACE_YUV422)) {
+ if (color_depth == COLORDEPTH_24B)
+ vid_map = 0x09;
+ else if (color_depth == COLORDEPTH_30B)
+ vid_map = 0x0b;
+ else if (color_depth == COLORDEPTH_36B)
+ vid_map = 0x0d;
+ else
+ vid_map = 0x0f;
+ } else {
+ if (color_depth == COLORDEPTH_24B)
+ vid_map = 0x16;
+ else if (color_depth == COLORDEPTH_30B)
+ vid_map = 0x14;
+ else
+ vid_map = 0x12;
+ }
data32 = 0;
data32 |= (0 << 7);
data32 = 0;
data32 |= ((((input_color_format == COLORSPACE_YUV422) &&
(output_color_format != COLORSPACE_YUV422)) ? 2 : 0) << 4);
- data32 |= ((((input_color_format != COLORSPACE_YUV422) &&
- (output_color_format == COLORSPACE_YUV422)) ? 1 : 0) << 0);
hdmitx_wr_reg(HDMITX_DWC_CSC_CFG, data32);
hdmitx_csc_config(input_color_format, output_color_format, color_depth);
if ((data32 & 0xf0) == 0x40)
data32 &= ~(0xf << 4);
hdmitx_wr_reg(HDMITX_DWC_VP_PR_CD, data32);
- if (output_color_format == COLORSPACE_YUV422) {
- if (color_depth == COLORDEPTH_24B)
- hdmitx_set_reg_bits(HDMITX_DWC_VP_PR_CD, 0x4, 4, 4);
- else
- hdmitx_set_reg_bits(HDMITX_DWC_VP_PR_CD, 0, 4, 4);
- }
+ if (output_color_format == COLORSPACE_YUV422)
+ hdmitx_set_reg_bits(HDMITX_DWC_VP_PR_CD, 0x4, 4, 4);
/* Video Packet Stuffing */
data32 = 0;
uint8_t tmaxLUM;
uint8_t colorimetry:1;/* ver1*/
uint8_t tminLUM;
- uint8_t low_latency:1;/* ver1_12 and 2*/
+ uint8_t low_latency;/* ver1_12 and 2*/
uint8_t sup_backlight_control:1;/*only ver2*/
uint8_t backlt_min_luma;/*only ver2*/
uint8_t Interface;/*only ver2*/