WRITE_VPP_REG_BITS(VD2_AFBCD1_MISC_CTRL, flag, 14, 2);
}
+/*0:vd1 gclk enable 0x55: disbale */
+void vpp_set_vd1_gate(unsigned int flag)
+{
+ WRITE_VPP_REG_BITS(VD1_AFBCD0_MISC_CTRL, flag, 0, 8);
+}
+/*0:vd2 gclk enable 0x55: disbale */
+void vpp_set_vd2_gate(unsigned int flag)
+{
+ WRITE_VPP_REG_BITS(VD2_AFBCD1_MISC_CTRL, flag, 0, 8);
+}
+
/*blend src mux==>0:close;1:vd1;2:vd2:3:osd1;4:osd2*/
void vpp_set_vd1_preblend_mux(unsigned int flag)
{
vpp_set_vd1_preblend_mux(0);
vpp_set_vd1_postblend_mux(0);
vpp_set_vd1_postblend_en(1);
+ vpp_set_vd1_gate(0x55);
vpp_set_vd2_preblend_mux(0);
vpp_set_vd2_postblend_mux(0);
vpp_set_vd2_postblend_en(0);
vpp_set_vd2_ext_mod(0);
vpp_set_vd2_bypass_dolby(1);
+ vpp_set_vd2_gate(0x55);
}
}
VSYNCOSD_IRQ_WR_MPEG_REG(
VIU_SW_RESET, 0);
if (reset_bit == HW_RESET_MALI_AFBCD_REGS)
- osd_log_dbg("reset_bit=%x\n", reset_bit);
+ osd_log_dbg("reset_bit=%x\n", reset_bit);
if (reset_bit & HW_RESET_OSD1_REGS) {
/* restore osd regs */
int i;
u32 temp_val = 0;
struct hw_osd_reg_s *osd_reg = &hw_osd_reg_array[index];
+ /*
if (!osd_hw.buffer_alloc[index])
return;
+ */
if ((osd_hw.osd_meson_dev.afbc_type == MESON_AFBC) &&
(osd_hw.enable[index] == ENABLE)) {
/* only for osd1 */
VSYNCOSD_WR_MPEG_REG(VPP_OSD2_BLD_V_SCOPE,
osd2_v_start << 16 | osd2_v_end);
- osd_log_dbg("vinfo_height=%d,vinfo_width=%d\n",
- osd_hw.vinfo_height, osd_hw.vinfo_width);
- VSYNCOSD_WR_MPEG_REG(VPP_POSTBLEND_H_SIZE,
- osd_hw.vinfo_height << 16 |
- osd_hw.vinfo_width);
- VSYNCOSD_WR_MPEG_REG(VPP_OUT_H_V_SIZE,
- osd_hw.vinfo_height << 16 |
- osd_hw.vinfo_width);
-
- VSYNCOSD_WR_MPEG_REG(VPP_POST_BLEND_BLEND_DUMMY_DATA,
- 0x00000000);//yuv 0x000080880
- VSYNCOSD_WR_MPEG_REG(VPP_POST_BLEND_DUMMY_ALPHA,
- 0x00000000);//dummy alpha yuv 0x10000000
return 0;
}
VSYNCOSD_WR_MPEG_REG(VPP_OSD1_BLD_V_SCOPE,
osd1_v_start << 16 | osd1_v_end);
- osd_log_dbg("vinfo_height=%d,vinfo_width=%d\n",
- osd_hw.vinfo_height, osd_hw.vinfo_width);
- VSYNCOSD_WR_MPEG_REG(VPP_POSTBLEND_H_SIZE,
- osd_hw.vinfo_height << 16 |
- osd_hw.vinfo_width);
- VSYNCOSD_WR_MPEG_REG(VPP_OUT_H_V_SIZE,
- osd_hw.vinfo_height << 16 |
- osd_hw.vinfo_width);
-
- VSYNCOSD_WR_MPEG_REG(VPP_POST_BLEND_BLEND_DUMMY_DATA,
- 0x00000000);//yuv 0x000080880
- VSYNCOSD_WR_MPEG_REG(VPP_POST_BLEND_DUMMY_ALPHA,
- 0x00000000);//dummy alpha yuv 0x10000000
return 0;
}
data32 = osd_hw.urgent[index] & 1;
data32 |= 4 << 5; /* hold_fifo_lines */
- /* burst_len_sel: 3=64 */
- data32 |= 3 << 10;
+
+ /* burst_len_sel: 3=64, g12a = 5 */
+ if (osd_hw.osd_meson_dev.osd_ver == OSD_HIGH_ONE) {
+ data32 |= 1 << 10;
+ data32 |= 1 << 31;
+ } else
+ data32 |= 3 << 10;
+
/* fifo_depth_val: 32*8=256 */
data32 |= (osd_hw.osd_meson_dev.osd_fifo_len
& 0xfffffff) << 12;
*/
data32 = 1;
data32 |= 4 << 5; /* hold_fifo_lines */
- /* burst_len_sel: 3=64 */
- data32 |= 3 << 10;
+ /* burst_len_sel: 3=64, g12a = 5 */
+ if (osd_hw.osd_meson_dev.osd_ver == OSD_HIGH_ONE) {
+ data32 |= 1 << 10;
+ data32 |= 1 << 31;
+ } else
+ data32 |= 3 << 10;
/*
* bit 23:22, fifo_ctrl
* 00 : for 1 word in 1 burst
osd_hw.osd_afbcd[idx].afbc_start = 0;
osd_hw.afbc_start_in_vsync = 0;
osd_hw.afbc_force_reset = 1;
+ /* TODO: temp set at here, need move it to uboot */
+ osd_reg_set_bits(
+ hw_osd_reg_array[idx].osd_fifo_ctrl_stat,
+ 1, 31, 1);
+ /* TODO: temp set at here, need check for logo */
+ if (idx > 0)
+ osd_reg_set_bits(
+ hw_osd_reg_array[idx].osd_ctrl_stat,
+ 0, 0, 1);
#if 0
/* enable for latch */
osd_hw.osd_use_latch = 1;
hw_osd_reg_array[idx].osd_ctrl_stat, data32);
#endif
}
+ /* TODO: temp power down */
+ switch_vpu_mem_pd_vmod(
+ VPU_VIU_OSD2,
+ VPU_MEM_POWER_DOWN);
+ switch_vpu_mem_pd_vmod(
+ VPU_VD2_OSD2_SCALE,
+ VPU_MEM_POWER_DOWN);
+ switch_vpu_mem_pd_vmod(
+ VPU_VIU_OSD3,
+ VPU_MEM_POWER_DOWN);
+ switch_vpu_mem_pd_vmod(
+ VPU_OSD_BLD34,
+ VPU_MEM_POWER_DOWN);
osd_setting_default_hwc();
}
+ /* disable deband as default */
+ if (osd_hw.osd_meson_dev.has_deband)
+ osd_reg_write(OSD_DB_FLT_CTRL, 0);
for (idx = 0; idx < osd_hw.osd_meson_dev.osd_count; idx++) {
osd_hw.updated[idx] = 0;
osd_hw.urgent[idx] = 1;
/* 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))
((devp->parm.port != TVIN_PORT_CVBS3) ||
((devp->flags & VDIN_FLAG_SNOW_FLAG) == 0)))
devp->frontend->dec_ops->stop(devp->frontend, devp->parm.port);
+
vdin_set_default_regmap(devp->addr_offset);
/*only for vdin0*/
if (devp->urgent_en && (devp->index == 0))
/*disable vsync irq until vdin configured completely*/
disable_irq_nosync(devp->irq);
}
+ vdin_clk_onoff(devp, true);
/*config the vdin use default value*/
vdin_set_default_regmap(devp->addr_offset);
/*only for vdin0*/
}
/*disable vdin hardware*/
vdin_enable_module(vdevp->addr_offset, false);
+ vdin_clk_onoff(vdevp, false);
/*enable auto cutwindow for atv*/
if (vdevp->index == 0) {
vdevp->auto_cutwindow_en = 1;