/*************************************** * FUNCTION: VPP reset * INPUT: NONE * RETURN: NONE **************************************/ int MV_THINVPP_Reset(void) { int i; if (!thinvpp_obj) return (MV_THINVPP_ENODEV); // reset VPP object variable thinvpp_obj->status = STATUS_INACTIVE; /* reset planes */ for (i=FIRST_PLANE; i<MAX_NUM_PLANES; i++){ thinvpp_obj->plane[i].status = STATUS_INACTIVE; thinvpp_obj->plane[i].mode = -1; // invalid thinvpp_obj->plane[i].srcfmt = -1; // invalid thinvpp_obj->plane[i].order = -1; // invalid thinvpp_obj->plane[i].actv_win.x = 0; thinvpp_obj->plane[i].actv_win.y = 0; thinvpp_obj->plane[i].actv_win.width = 0; thinvpp_obj->plane[i].actv_win.height = 0; } /* reset channels */ for (i=FIRST_CHAN; i<MAX_NUM_CHANS; i++) { thinvpp_obj->chan[i].status = STATUS_INACTIVE; thinvpp_obj->chan[i].dvID = -1; // invalid thinvpp_obj->chan[i].dvlayerID = -1; // invalid thinvpp_obj->chan[i].zorder = -1; // invalid thinvpp_obj->chan[i].disp_win.x = 0; thinvpp_obj->chan[i].disp_win.y = 0; thinvpp_obj->chan[i].disp_win.width = 0; thinvpp_obj->chan[i].disp_win.height = 0; } /* reset DVs */ for (i=FIRST_CPCB; i<MAX_NUM_CPCBS; i++) { thinvpp_obj->dv[i].status = STATUS_INACTIVE; thinvpp_obj->dv[i].output_res = RES_INVALID; // invalid thinvpp_obj->dv[i].num_of_vouts = 0; thinvpp_obj->dv[i].vbi_num = 0; } /* reset VOUTs */ for (i=FIRST_VOUT; i<MAX_NUM_VOUTS; i++) { thinvpp_obj->vout[i].status = STATUS_INACTIVE; thinvpp_obj->vout[i].dvID = -1; // invalid } /* reset VBI BCM buffer */ THINVPP_BCMBUF_Reset(&thinvpp_obj->vbi_bcm_buf[0]); thinvpp_obj->pVbiBcmBuf = &(thinvpp_obj->vbi_bcm_buf[0]); thinvpp_obj->hdmi_mute = 0; #if !LOGO_USE_SHM // do no need double buffers for dhub queues THINVPP_BCMBUF_Reset(&thinvpp_obj->vbi_bcm_buf[1]); #endif thinvpp_obj->pVbiBcmBufCpcb[CPCB_1] = &(thinvpp_obj->vbi_bcm_buf[0]); thinvpp_obj->dv[CPCB_1].curr_cpcb_vbi_dma_cfgQ = &(thinvpp_obj->dv[CPCB_1].vbi_dma_cfgQ[0]); thinvpp_obj->dv[CPCB_1].curr_cpcb_vbi_bcm_cfgQ = &(thinvpp_obj->dv[CPCB_1].vbi_bcm_cfgQ[0]); /* reset dHub cmdQ */ #if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) for (i = 0; i < avioDhubChMap_vpp_TT_R; i++) #else /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ for (i = 0; i < avioDhubChMap_vpp_SPDIF_W; i++) #endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ thinvpp_obj->dhub_cmdQ[i] = 0; /* select BCM sub-buffer to dump register settings */ THINVPP_BCMBUF_Select(thinvpp_obj->pVbiBcmBuf, -1); return (MV_THINVPP_OK); }
/*************************************** * FUNCTION: VPP reset * INPUT: NONE * RETURN: NONE **************************************/ int MV_THINVPP_Reset(void) { int i; if (!thinvpp_obj) return (MV_THINVPP_ENODEV); // reset VPP object variable thinvpp_obj->status = STATUS_INACTIVE; /* reset planes */ for (i=FIRST_PLANE; i<MAX_NUM_PLANES; i++){ thinvpp_obj->plane[i].status = STATUS_INACTIVE; thinvpp_obj->plane[i].mode = -1; // invalid thinvpp_obj->plane[i].srcfmt = -1; // invalid thinvpp_obj->plane[i].order = -1; // invalid thinvpp_obj->plane[i].actv_win.x = 0; thinvpp_obj->plane[i].actv_win.y = 0; thinvpp_obj->plane[i].actv_win.width = 0; thinvpp_obj->plane[i].actv_win.height = 0; thinvpp_obj->plane[i].ref_win = thinvpp_obj->plane[i].actv_win; } /* reset channels */ for (i=FIRST_CHAN; i<MAX_NUM_CHANS; i++) { thinvpp_obj->chan[i].status = STATUS_INACTIVE; thinvpp_obj->chan[i].dvID = -1; // invalid thinvpp_obj->chan[i].dvlayerID = -1; // invalid thinvpp_obj->chan[i].zorder = -1; // invalid thinvpp_obj->chan[i].disp_win.x = 0; thinvpp_obj->chan[i].disp_win.y = 0; thinvpp_obj->chan[i].disp_win.width = 0; thinvpp_obj->chan[i].disp_win.height = 0; } /* reset DVs */ for (i=FIRST_CPCB; i<MAX_NUM_CPCBS; i++) { thinvpp_obj->dv[i].status = STATUS_INACTIVE; thinvpp_obj->dv[i].output_res = RES_INVALID; // invalid thinvpp_obj->dv[i].num_of_vouts = 0; thinvpp_obj->dv[i].vbi_num = 0; } /* reset VOUTs */ for (i=FIRST_VOUT; i<MAX_NUM_VOUTS; i++) { thinvpp_obj->vout[i].status = STATUS_INACTIVE; thinvpp_obj->vout[i].dvID = -1; // invalid } /* reset VBI BCM buffer */ THINVPP_BCMBUF_Reset(&thinvpp_obj->vbi_bcm_buf); thinvpp_obj->pVbiBcmBuf = &(thinvpp_obj->vbi_bcm_buf); thinvpp_obj->pVbiBcmBufCpcb[CPCB_1] = &(thinvpp_obj->vbi_bcm_buf); /* reset dHub cmdQ */ #if (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) for (i = 0; i < avioDhubChMap_vpp_TT_R; i++) #else /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ for (i = 0; i < avioDhubChMap_vpp_SPDIF_W; i++) #endif /* (BERLIN_CHIP_VERSION != BERLIN_BG2CD_A0) */ thinvpp_obj->dhub_cmdQ[i] = 0; /* select BCM sub-buffer to dump register settings */ THINVPP_BCMBUF_Select(thinvpp_obj->pVbiBcmBuf, -1); THINVPP_SCL_Reset(thinvpp_obj); THINVPP_CPCB_Reset(thinvpp_obj); THINVPP_BE_Reset(thinvpp_obj); /* start BCM engine to program VPP registers */ THINVPP_BCMBUF_HardwareTrans(thinvpp_obj->pVbiBcmBuf, 1/*block*/); return (MV_THINVPP_OK); }