vdin: fix snowflake bottom screen [1/1]

PD#SWPL-5129

Problem:
cut window need restore when nosignal

Solution:
restore cutwin when nosignal

Verify:
verified by r341

Change-Id: If18dbd18df11cce5d1ddb99ee266901b75b065b3
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
This commit is contained in:
Nian Jing
2019-02-25 14:38:27 +08:00
committed by Jianxin Pan
parent c2a4eaf9a0
commit 7f3b8d9f99
2 changed files with 22 additions and 2 deletions

View File

@@ -862,6 +862,7 @@ static void vdin_dump_state(struct vdin_dev_s *devp)
pr_info("color_depth_support:0x%x\n", devp->color_depth_support);
pr_info("cma_flag:0x%x\n", devp->cma_config_flag);
pr_info("auto_cutwindow_en:%d\n", devp->auto_cutwindow_en);
pr_info("cutwindow_cfg:%d\n", devp->cutwindow_cfg);
pr_info("auto_ratio_en:%d\n", devp->auto_ratio_en);
pr_info("cma_mem_alloc:%d\n", devp->cma_mem_alloc);
pr_info("cma_mem_size:0x%x\n", devp->cma_mem_size);

View File

@@ -98,6 +98,7 @@ static unsigned int dv_work_delby;
* enable viu_hw_irq for the bandwidth is enough on gxbb/gxtvbb and laters ic
*/
static bool viu_hw_irq = 1;
static bool de_fmt_flag;
#ifdef DEBUG_SUPPORT
module_param(canvas_config_mode, int, 0664);
@@ -475,6 +476,21 @@ void vdin_start_dec(struct vdin_dev_s *devp)
devp->canvas_config_mode = canvas_config_mode;
/* h_active/v_active will be recalculated by bellow calling */
vdin_set_decimation(devp);
if (de_fmt_flag == 1 &&
(devp->prop.vs != 0 ||
devp->prop.ve != 0 ||
devp->prop.hs != 0 ||
devp->prop.he != 0)) {
devp->prop.vs = 0;
devp->prop.ve = 0;
devp->prop.hs = 0;
devp->prop.he = 0;
devp->prop.pre_vs = 0;
devp->prop.pre_ve = 0;
devp->prop.pre_hs = 0;
devp->prop.pre_he = 0;
pr_info("ioctl start dec,restore the cutwin param.\n");
}
vdin_set_cutwin(devp);
vdin_set_hvscale(devp);
if (cpu_after_eq(MESON_CPU_MAJOR_ID_GXTVBB))
@@ -2135,10 +2151,13 @@ static long vdin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break;
}
if ((devp->parm.info.fmt == TVIN_SIG_FMT_NULL) &&
(devp->parm.port == TVIN_PORT_CVBS3))
(devp->parm.port == TVIN_PORT_CVBS3)) {
de_fmt_flag = 1;
fmt = devp->parm.info.fmt = TVIN_SIG_FMT_CVBS_NTSC_M;
else
} else {
de_fmt_flag = 0;
fmt = devp->parm.info.fmt = parm.info.fmt;
}
devp->fmt_info_p =
(struct tvin_format_s *)tvin_get_fmt_info(fmt);
if (!devp->fmt_info_p) {