static int tv_module_disable(vmode_t cur_vmod) { #if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON8 if (info->vinfo) { release_vpu_clk_vmod(info->vinfo->mode); switch_vpu_mem_pd_vmod(info->vinfo->mode, VPU_MEM_POWER_DOWN); } #endif //video_dac_disable(); return 0; }
static int tv_module_disable(enum vmode_e cur_vmod) { if (get_cpu_type() < MESON_CPU_MAJOR_ID_M8) return 0; #ifdef CONFIG_AML_VPU if (info->vinfo) { release_vpu_clk_vmod(info->vinfo->mode); switch_vpu_mem_pd_vmod(info->vinfo->mode, VPU_MEM_POWER_DOWN); } #endif /* video_dac_disable(); */ return 0; }
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; }
static int tv_set_current_vmode(enum vmode_e mode) { if ((mode & VMODE_MODE_BIT_MASK) > VMODE_MAX) return -EINVAL; #ifdef CONFIG_AML_VOUT_FRAMERATE_AUTOMATION /* * if plug hdmi during fps (stream is playing) * then adjust mode to fps vmode */ if (!want_hdmi_mode(mode)) { if (DOWN_HPLL == fine_tune_mode) update_tv_info_duration(fps_target_mode, UP_HPLL); } fps_auto_adjust_mode(&mode); update_vmode_status(get_name_from_vmode(mode)); vout_log_info("%s[%d]fps_target_mode=%d\n", __func__, __LINE__, mode); info->vinfo = update_tv_info_duration(mode, fine_tune_mode); #else info->vinfo = get_tv_info(mode & VMODE_MODE_BIT_MASK); #endif if (!info->vinfo) { vout_log_info("don't get tv_info, mode is %d\n", mode); return 1; } vout_log_info("mode is %d,sync_duration_den=%d,sync_duration_num=%d\n", mode, info->vinfo->sync_duration_den, info->vinfo->sync_duration_num); if (mode & VMODE_LOGO_BIT_MASK) return 0; vout_change_mode_preprocess(mode); #ifdef CONFIG_AML_VPU switch_vpu_mem_pd_vmod(info->vinfo->mode, VPU_MEM_POWER_ON); request_vpu_clk_vmod(info->vinfo->video_clk, info->vinfo->mode); #endif tv_out_reg_write(VPP_POSTBLEND_H_SIZE, info->vinfo->width); tv_out_setmode(vmode_to_tvmode(mode)); #ifdef CONFIG_AML_VOUT_FRAMERATE_AUTOMATION vout_log_info("new mode =%s set ok\n", get_name_from_vmode(mode)); #endif return 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; }