示例#1
0
static void vo_do_plug
(
    void *ptr		/*!<; // work input data */
)
#endif
{
    vout_t *vo;
    int plugin;

    if( vo_plug_func == 0 )
        return;

    vo = vout_get_entry(vo_plug_vout);
    govrh_set_dvo_enable(vo->govr,1);
    plugin = vo_plug_func(1);
    govrh_set_dvo_enable(vo->govr,plugin);
    vout_change_status(vo,VPP_VOUT_STS_PLUGIN,plugin);
    vo_plug_flag = 0;
    DBG_DETAIL("vo_do_plug %d\n",plugin);
    vppif_reg32_write(GPIO_BASE_ADDR+0x300+VPP_VOINT_NO,0x80,7,1);	// GPIO irq enable
    vppif_reg32_write(GPIO_BASE_ADDR+0x80,0x1<<VPP_VOINT_NO,VPP_VOINT_NO,0x0);	// GPIO input mode
#ifdef __KERNEL__
    vpp_netlink_notify(USER_PID,DEVICE_PLUG_IN,plugin);
    vpp_netlink_notify(WP_PID,DEVICE_PLUG_IN,plugin);
#endif
    return;
}
示例#2
0
int display_init(int on, int force)
{
	mv_surface s;

	if ((g_display_vaild&DISPLAY_ENABLE) == DISPLAY_ENABLE) {
		if (force) { // force re-initial 
			if (g_display_param.vout == VPP_VOUT_LCD)
				lcd_blt_enable(g_pwm_setting.pwm_no, 0);
			govrh_set_dvo_enable(VPP_FLAG_DISABLE);
			govrh_set_tg_enable(VPP_FLAG_DISABLE);
			g_display_vaild = 0; 
		}
	} else 
		force = 1;
 
	if (force) {
		if (wmt_graphic_init()) {
			printf("wmt_graphic_init failed\n");
			return -1;
		} else
			printf("wmt_graphic_init ok\n");
		s.width = vfb_var.xres;
		s.height = vfb_var.yres;
		s.startAddr = (char *)g_fb_phy;
		s.bits_per_pixel = vfb_var.bits_per_pixel;
		s.lineBytes = s.width*(vfb_var.bits_per_pixel>>3);
		mv_initPrimary(&s);
	}
	if ((g_display_param.vout == VPP_VOUT_LCD) && (on != 0)) {
		printf("before lcd_blt_enable !!!!!!!!!\n");
		lcd_blt_enable(g_pwm_setting.pwm_no, 1);
		printf("lcd_blt_enable !!!!!!!!!\n");
	}
	text_x = 30;
	text_y = 30 - CHAR_HEIGHT;
	return 0;
}
示例#3
0
void sil902x_poll(void)
{
	vout_t *vo;

	vo = vout_get_info(VOUT_DVO2HDMI);
	
#ifdef SIL902X_PLUG_POLL
{
	int plugin;
	
	if( ReadByte(0x3D) & 0x1 ){
		WriteByte(0x3D,0x1);
		plugin = sil902x_check_plugin(1);
		govrh_set_dvo_enable(plugin);
		vout_change_status(vo,VOCTL_CHKPLUG,0,plugin);
#ifdef CONFIG_WMT_CEC
		wmt_cec_hotplug_notify(plugin);
#endif
	}
	else {
		plugin = (ReadByte(0x3D) & 0x04)? 1:0;
	}

#ifdef SIL902X_CONTENT_PROTECT
	if( plugin ){
		if ((sil902x_cp_linkProtectionLevel == (EXTENDED_LINK_PROTECTION_NONE | LOCAL_LINK_PROTECTION_NONE)) 
				&& (sil902x_cp_start == 0)){
			char reg;
				
			reg = ReadByte(0x29);
			DBGMSG("[SIL902X] HDCP detect %d\n",(reg&0x2));
			if (reg & 0x2){   // Is CP avaialable
				sil902x_CP_enable(1);
			}
		}
	}
	else {
		vo->status &= ~VPP_VOUT_STS_CONTENT_PROTECT;
	}
#endif
}
#endif

#ifdef SIL902X_CP_POLL
{
	char status;

	vo = vout_get_info(VOUT_DVO2HDMI);
	if( !(vo->status & VPP_VOUT_STS_PLUGIN) ){
		return;
	}
	status = ReadByte(0x3D) & 0xA0;
#ifndef SIL902X_CP_POLL_LINK_STATUS
	status &= ~0x20;
#endif
#ifndef SIL902X_CP_POLL_CP_STATE
	status &= ~0x80;
#endif
	switch( sil902x_CP_check_status(status) ){
		case 1: // cp ok
			sil902x_CP_get_bksv((char *)&g_vpp.hdmi_bksv[0]);
			vo->status |= VPP_VOUT_STS_CONTENT_PROTECT;
			break;
		case -1: // cp fail
			vo->status &= ~VPP_VOUT_STS_CONTENT_PROTECT;
			break;
		default:
			break;
	}
}
#endif
}