void vdin_hw_disable(unsigned int offset)
{
+ unsigned int def_canvas;
+
+ def_canvas = offset ? vdin_canvas_ids[1][0] : vdin_canvas_ids[0][0];
/* disable cm2 */
wr_bits(offset, VDIN_CM_BRI_CON_CTRL, 0, CM_TOP_EN_BIT, CM_TOP_EN_WID);
/* disable video data input */
wr(offset, VDIN_COM_CTRL0, 0x00000910);
vdin_delay_line(delay_line_num, offset);
if (enable_reset)
- wr(offset, VDIN_WR_CTRL, 0x0b401000);
+ wr(offset, VDIN_WR_CTRL, 0x0b401000 | def_canvas);
else
- wr(offset, VDIN_WR_CTRL, 0x0bc01000);
-
+ wr(offset, VDIN_WR_CTRL, 0x0bc01000 | def_canvas);
/* disable clock of blackbar, histogram, histogram, line fifo1, matrix,
* hscaler, pre hscaler, clock0
*/
}
devp->frontend = fe;
- devp->parm.port = port;
+ devp->parm.port = port;
/* for atv snow function */
if ((port == TVIN_PORT_CVBS3) &&
(devp->parm.info.fmt == TVIN_SIG_FMT_NULL))
/* clear color para*/
memset(&devp->prop, 0, sizeof(devp->prop));
- /*enable clk*/
- vdin_clk_onoff(devp, true);
- vdin_set_default_regmap(devp->addr_offset);
- /*only for vdin0*/
- if (devp->urgent_en && (devp->index == 0))
- vdin_urgent_patch_resume(devp->addr_offset);
-
/* vdin msr clock gate enable */
if (devp->msr_clk != NULL)
clk_prepare_enable(devp->msr_clk);
if (devp->msr_clk != NULL)
clk_disable_unprepare(devp->msr_clk);
- vdin_hw_disable(devp->addr_offset);
del_timer_sync(&devp->timer);
if (devp->frontend && devp->frontend->dec_ops->close) {
devp->frontend->dec_ops->close(devp->frontend);
is_meson_txhd_cpu())
switch_vpu_clk_gate_vmod(VPU_VPU_CLKB, VPU_CLK_GATE_ON);
+ /*enable clk*/
+ vdin_clk_onoff(devp, true);
+ vdin_set_default_regmap(devp->addr_offset);
+ if (devp->urgent_en && (devp->index == 0))
+ vdin_urgent_patch_resume(devp->addr_offset);
+
vdin_get_format_convert(devp);
devp->curr_wr_vfe = NULL;
devp->vfp->skip_vf_num = devp->prop.skip_vf_num;