hdmitx: add 3d framepack mode support [1/1]

PD#SWPL-4233

Problem:
3D framepacking mode display black screen

Solution:
Add vinfo 3d flag and hdmitx update
when work 3d mode

Verify:
U212

Change-Id: Ia2b7b25c9ed401dbec2c487ea2a5c6cc1e0d8b8d
Signed-off-by: Kaifu Hu <kaifu.hu@amlogic.com>
This commit is contained in:
Kaifu Hu
2019-01-28 16:01:19 +08:00
committed by Luke Go
parent 33b1ffea56
commit b0193feb46
5 changed files with 46 additions and 4 deletions

View File

@@ -2704,6 +2704,24 @@ struct vinfo_s *hdmi_get_valid_vinfo(char *mode)
/* the string of mode contains char NF */
memset(mode_, 0, sizeof(mode_));
strncpy(mode_, mode, sizeof(mode_));
/* skip "f", 1080fp60hz -> 1080p60hz for 3d */
mode_[31] = '\0';
if (strstr(mode_, "fp")) {
int i = 0;
for (; mode_[i]; i++) {
if ((mode_[i] == 'f') &&
(mode_[i + 1] == 'p')) {
do {
mode_[i] = mode_[i + 1];
i++;
} while (mode_[i]);
break;
}
}
}
for (i = 0; i < sizeof(mode_); i++)
if (mode_[i] == 10)
mode_[i] = 0;

View File

@@ -3527,6 +3527,16 @@ static enum vmode_e hdmitx_validate_vmode(char *mode)
if (info) {
hdmitx_vinfo = info;
hdmitx_vinfo->info_3d = NON_3D;
if (hdmitx_device.flag_3dfp)
hdmitx_vinfo->info_3d = FP_3D;
if (hdmitx_device.flag_3dtb)
hdmitx_vinfo->info_3d = TB_3D;
if (hdmitx_device.flag_3dss)
hdmitx_vinfo->info_3d = SS_3D;
hdmitx_vinfo->vout_device = &hdmitx_vdev;
return VMODE_HDMI;
}
@@ -4303,6 +4313,10 @@ static int amhdmitx_device_init(struct hdmitx_dev *hdmi_dev)
*/
hdmitx_device.hpdmode = 1;
hdmitx_device.flag_3dfp = 0;
hdmitx_device.flag_3dss = 0;
hdmitx_device.flag_3dtb = 0;
if ((init_flag&INIT_FLAG_POWERDOWN) && (hdmitx_device.hpdmode == 2))
hdmitx_device.mux_hpd_if_pin_high_flag = 0;
else

View File

@@ -1218,7 +1218,7 @@ static const struct reg_s tvregs_3dfp_1080p60[] = {
{P_ENCP_VIDEO_MODE, 0x4040,},
{P_ENCP_VIDEO_MODE_ADV, 0x18,},
{P_ENCP_VIDEO_MAX_PXCNT, 0x897,},
{P_ENCP_VIDEO_MAX_PXCNT, 0xABD,},
{P_ENCP_VIDEO_MAX_LNCNT, 0x8C9,},
{P_ENCP_VIDEO_HAVON_BEGIN, 0xC0,},
{P_ENCP_VIDEO_HAVON_END, 0x83F,},
@@ -1298,7 +1298,7 @@ static const struct reg_s tvregs_3dfp_1080p50[] = {
{P_ENCP_VIDEO_MODE, 0x4040,},
{P_ENCP_VIDEO_MODE_ADV, 0x18,},
{P_ENCP_VIDEO_MAX_PXCNT, 0xA4F,},
{P_ENCP_VIDEO_MAX_PXCNT, 0xABD,},
{P_ENCP_VIDEO_MAX_LNCNT, 0x8C9,},
{P_ENCP_VIDEO_HAVON_BEGIN, 0xC0,},
{P_ENCP_VIDEO_HAVON_END, 0x83F,},

View File

@@ -519,14 +519,16 @@ static ssize_t vout_vinfo_show(struct class *class,
" fr_adj_type: %d\n"
" video_clk: %d\n"
" viu_color_fmt: %d\n"
" viu_mux: %d\n\n",
" viu_mux: %d\n"
" 3d_info: %d\n\n",
info->name, info->mode,
info->width, info->height, info->field_height,
info->aspect_ratio_num, info->aspect_ratio_den,
info->sync_duration_num, info->sync_duration_den,
info->screen_real_width, info->screen_real_height,
info->htotal, info->vtotal, info->fr_adj_type,
info->video_clk, info->viu_color_fmt, info->viu_mux);
info->video_clk, info->viu_color_fmt, info->viu_mux,
info->info_3d);
len += sprintf(buf+len, "master_display_info:\n"
" present_flag %d\n"
" features 0x%x\n"
@@ -577,6 +579,7 @@ static ssize_t vout_vinfo_show(struct class *class,
info->hdr_info.hdr10plus_info.ieeeoui);
len += sprintf(buf+len, " application_version: %x\n",
info->hdr_info.hdr10plus_info.application_version);
return len;
}

View File

@@ -53,6 +53,13 @@ enum vout_fr_adj_type_e {
VOUT_FR_ADJ_MAX,
};
enum vinfo_3d_e {
NON_3D = 0,
SS_3D,
FP_3D,
TB_3D,
};
/*emp : extended metadata type*/
#define VENDOR_SPECIFIC_EM_DATA 0x0
#define COMPRESS_VIDEO_TRAMSPORT 0x1