static int tv_set_current_vmode(vmode_t mod)
{
	if ((mod&VMODE_MODE_BIT_MASK)> VMODE_SXGA)
		return -EINVAL;

	info->vinfo = &tv_info[mod & VMODE_MODE_BIT_MASK];
	if(mod&VMODE_LOGO_BIT_MASK)  return 0;
#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8
	switch_vpu_mem_pd_vmod(info->vinfo->mode, VPU_MEM_POWER_ON);
	request_vpu_clk_vmod(info->vinfo->video_clk, info->vinfo->mode);
#endif
	tvoutc_setmode(vmode_to_tvmode(mod));
//	change_vdac_setting(get_current_vdac_setting(),mod);
	return 0;
}
Пример #2
0
static int tv_set_current_vmode(vmode_t mod)
{
    	vmode_t mode = mod&VMODE_MODE_BIT_MASK;
	//if (mode > VMODE_1080P_50HZ) {
	if (mode >= TVMODE_MAX) {
		amlog_mask_level(LOG_MASK_PARA, LOG_LEVEL_HIGH,"Invalid vmode: %d\n", mod);
		return -EINVAL;
	}

	info->vinfo = &tv_info[mode];
	if (mod & VMODE_LOGO_BIT_MASK)
		return 0;

	tvoutc_setmode(vmode_tvmode_tab[mode]);
	change_vdac_setting(get_current_vdac_setting(),mode);
	return 0;
}
Пример #3
0
static int tv_set_current_vmode(vmode_t mod)
{
    if ((mod&VMODE_MODE_BIT_MASK)> VMODE_MAX)
	return -EINVAL;
    info->vinfo = get_tv_info(mod & VMODE_MODE_BIT_MASK);
    if(!info->vinfo) {
        printk("don't get tv_info, mode is %d\n", mod);
        return 1;
    }
//	info->vinfo = &tv_info[mod & VMODE_MODE_BIT_MASK];
    printk("mode is %d,sync_duration_den=%d,sync_duration_num=%d\n", mod,info->vinfo->sync_duration_den,info->vinfo->sync_duration_num);
    if(mod&VMODE_LOGO_BIT_MASK)  return 0;
#if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8
    switch_vpu_mem_pd_vmod(info->vinfo->mode, VPU_MEM_POWER_ON);
    request_vpu_clk_vmod(info->vinfo->video_clk, info->vinfo->mode);
#endif
    tvoutc_setmode(vmode_to_tvmode(mod));
//	change_vdac_setting(get_current_vdac_setting(),mod);
    return 0;
}