Esempio n. 1
0
__s32 BSP_disp_tv_open(__u32 sel)
{
    if((!(gdisp.screen[sel].status & TV_ON)))
    {
        __disp_tv_mode_t     tv_mod;
        __panel_para_t para;
        memset(&para, 0, sizeof(__panel_para_t));

        tv_mod = gdisp.screen[sel].tv_mode;

        lcdc_clk_on(sel, 0, 0);
        disp_clk_cfg(sel, DISP_OUTPUT_TYPE_TV, tv_mod);
        lcdc_clk_on(sel, 0, 1);
        drc_clk_open(sel,0);
        tcon_init(sel);
        image_clk_on(sel, 1);
        Image_open(sel);//set image normal channel start bit , because every de_clk_off( )will reset this bit

        BSP_disp_set_output_csc(sel, DISP_OUT_CSC_TYPE_LCD, BSP_disp_drc_get_input_csc(sel)); //LCD -->GM7121,   rgb fmt

        DE_BE_set_display_size(sel, tv_mode_to_width(tv_mod), tv_mode_to_height(tv_mod));
        DE_BE_Output_Select(sel, sel);
        disp_tv_get_timing(&para, tv_mod);
        tcon0_cfg(sel,(__panel_para_t*)&para);
        tcon0_src_select(sel,4);

        if(gdisp.screen[sel].tv_ops.tv_power_on)
        {
            gdisp.screen[sel].tv_ops.tv_power_on(1);
            msleep(500);
        }
        disp_tv_pin_cfg(1);

        tcon0_open(sel,(__panel_para_t*)&para);
        if(gdisp.screen[sel].tv_ops.tv_open)
        {
            gdisp.screen[sel].tv_ops.tv_open();
        }
        Disp_Switch_Dram_Mode(DISP_OUTPUT_TYPE_TV, tv_mod);

        gdisp.screen[sel].b_out_interlace = Disp_get_screen_scan_mode(tv_mod);
        gdisp.screen[sel].status = TV_ON;
        gdisp.screen[sel].lcdc_status |= LCDC_TCON0_USED;
        gdisp.screen[sel].output_type = DISP_OUTPUT_TYPE_TV;
        gdisp.screen[sel].output_csc_type = DISP_OUT_CSC_TYPE_LCD;//LCD -->GM7121,   rgb fmt

        if(BSP_disp_cmu_get_enable(sel) ==1)
        {
            IEP_CMU_Set_Imgsize(sel, BSP_disp_get_screen_width(sel), BSP_disp_get_screen_height(sel));
        }
        Disp_set_out_interlace(sel);
#ifdef __LINUX_OSAL__
        Display_set_fb_timming(sel);
#endif
        tcon0_src_select(sel,0);
    }
    return DIS_SUCCESS;
}
Esempio n. 2
0
int disp_al_vdevice_enable(u32 screen_id)
{
	disp_panel_para panel;

	memset(&panel, 0, sizeof(disp_panel_para));
	panel.lcd_if = LCD_IF_HV;
	tcon0_open(screen_id, &panel);

	return 0;
}
Esempio n. 3
0
int disp_al_lcd_enable(u32 screen_id, disp_panel_para * panel)
{
	tcon0_open(screen_id, panel);
	if(LCD_IF_LVDS == panel->lcd_if) {
		lvds_open(screen_id, panel);
	} else if(LCD_IF_DSI == panel->lcd_if) {
#if defined(SUPPORT_DSI)
		dsi_open(screen_id, panel);
#endif
	}

	return 0;
}