mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
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:
@@ -2863,6 +2863,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;
|
||||
|
||||
@@ -3514,6 +3514,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;
|
||||
}
|
||||
@@ -4285,6 +4295,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
|
||||
|
||||
@@ -1543,7 +1543,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,},
|
||||
@@ -1623,7 +1623,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,},
|
||||
|
||||
@@ -489,14 +489,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"
|
||||
@@ -547,6 +549,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -258,6 +265,7 @@ struct vinfo_s {
|
||||
u32 video_clk;
|
||||
u32 htotal;
|
||||
u32 vtotal;
|
||||
enum vinfo_3d_e info_3d;
|
||||
enum vout_fr_adj_type_e fr_adj_type;
|
||||
enum color_fmt_e viu_color_fmt;
|
||||
enum viu_mux_e viu_mux;
|
||||
|
||||
Reference in New Issue
Block a user