コード例 #1
0
__s32 BSP_disp_init(__disp_bsp_init_para * para)
{
    __u32 i = 0, screen_id = 0;

    memset(&gdisp,0x00,sizeof(__disp_dev_t));

    for(screen_id = 0; screen_id < 2; screen_id++)
    {
        gdisp.screen[screen_id].max_layers = 4;
        for(i = 0;i < gdisp.screen[screen_id].max_layers;i++)
        {
            gdisp.screen[screen_id].layer_manage[i].para.prio = IDLE_PRIO;
        }
        gdisp.screen[screen_id].image_output_type = IMAGE_OUTPUT_LCDC;
        
        gdisp.screen[screen_id].bright = 50;
        gdisp.screen[screen_id].contrast = 50;
        gdisp.screen[screen_id].saturation = 50;
        gdisp.screen[screen_id].hue = 50;
        
        gdisp.scaler[screen_id].bright = 50;
        gdisp.scaler[screen_id].contrast = 50;
        gdisp.scaler[screen_id].saturation = 50;
        gdisp.scaler[screen_id].hue = 50;

        gdisp.screen[screen_id].lcd_bright = 192;
    }
    memcpy(&gdisp.init_para,para,sizeof(__disp_bsp_init_para));
    memset(g_video,0,sizeof(g_video));

    DE_Set_Reg_Base(0, para->base_image0);
    DE_Set_Reg_Base(1, para->base_image1);
    DE_SCAL_Set_Reg_Base(0, para->base_scaler0);
    DE_SCAL_Set_Reg_Base(1, para->base_scaler1);
    LCDC_set_reg_base(0,para->base_lcdc0);
    LCDC_set_reg_base(1,para->base_lcdc1);
    TVE_set_reg_base(0, para->base_tvec0);
    TVE_set_reg_base(1, para->base_tvec1);

	disp_pll_init();

    Scaler_Init(0);
    Scaler_Init(1);
    Image_init(0);
    Image_init(1);
    Disp_lcdc_init(0);
    Disp_lcdc_init(1);
    Disp_TVEC_Init(0);
    Disp_TVEC_Init(1);
    Display_Hdmi_Init();

    return DIS_SUCCESS;
}
コード例 #2
0
__s32 BSP_disp_init(__disp_bsp_init_para *para)
{
	__u32 i = 0, screen_id = 0;

	memset(&gdisp, 0x00, sizeof(__disp_dev_t));

	for (screen_id = 0; screen_id < 2; screen_id++) {
		gdisp.screen[screen_id].max_layers = 4;
		for (i = 0; i < gdisp.screen[screen_id].max_layers; i++)
			gdisp.screen[screen_id].layer_manage[i].para.prio =
			    IDLE_PRIO;

		gdisp.screen[screen_id].image_output_type = IMAGE_OUTPUT_LCDC;

		gdisp.screen[screen_id].bright = 50;
		gdisp.screen[screen_id].contrast = 50;
		gdisp.screen[screen_id].saturation = 50;
		gdisp.screen[screen_id].hue = 50;

		gdisp.scaler[screen_id].bright = 50;
		gdisp.scaler[screen_id].contrast = 50;
		gdisp.scaler[screen_id].saturation = 50;
		gdisp.scaler[screen_id].hue = 50;

		gdisp.screen[screen_id].lcd_bright = 192;

#ifdef CONFIG_ARCH_SUN5I
		gdisp.screen[screen_id].lcd_bright_dimming = 256;
#endif
	}
	memcpy(&gdisp.init_para, para, sizeof(__disp_bsp_init_para));
	memset(g_video, 0, sizeof(g_video));

	DE_Set_Reg_Base(0, para->base_image0);
	DE_SCAL_Set_Reg_Base(0, para->base_scaler0);
	LCDC_set_reg_base(0, para->base_lcdc0);
	TVE_set_reg_base(0, para->base_tvec0);

#ifdef CONFIG_ARCH_SUN4I
	DE_Set_Reg_Base(1, para->base_image1);
	DE_SCAL_Set_Reg_Base(1, para->base_scaler1);
	LCDC_set_reg_base(1, para->base_lcdc1);
	TVE_set_reg_base(1, para->base_tvec1);
#else
	DE_IEP_Set_Reg_Base(0, para->base_iep);
#endif

#ifdef CONFIG_ARCH_SUN5I
	BSP_disp_close_lcd_backlight(0);
#endif

	disp_pll_init();

	Scaler_Init(0);
	Image_init(0);
	Disp_lcdc_init(0);
	Disp_TVEC_Init(0);

#ifdef CONFIG_ARCH_SUN4I
	Scaler_Init(1);
	Image_init(1);
	Disp_lcdc_init(1);
	Disp_TVEC_Init(1);
#endif

	Display_Hdmi_Init();

#ifdef CONFIG_ARCH_SUN5I
	Disp_iep_init(0);
#endif

	disp_initialised = true;

	return DIS_SUCCESS;
}
コード例 #3
0
__s32 BSP_disp_init(__disp_bsp_init_para * para)
{
    __u32 i = 0, screen_id = 0;

    memset(&gdisp,0x00,sizeof(__disp_dev_t));

    for(screen_id = 0; screen_id < 2; screen_id++)
    {
        gdisp.screen[screen_id].max_layers = 4;
        for(i = 0;i < gdisp.screen[screen_id].max_layers;i++)
        {
            gdisp.screen[screen_id].layer_manage[i].para.prio = IDLE_PRIO;
        }
        gdisp.screen[screen_id].image_output_type = IMAGE_OUTPUT_LCDC;
        
        gdisp.screen[screen_id].bright = 50;
        gdisp.screen[screen_id].contrast = 50;
        gdisp.screen[screen_id].saturation = 50;
        gdisp.screen[screen_id].hue = 50;
        
        gdisp.scaler[screen_id].bright = 50;
        gdisp.scaler[screen_id].contrast = 50;
        gdisp.scaler[screen_id].saturation = 50;
        gdisp.scaler[screen_id].hue = 50;

        gdisp.screen[screen_id].lcd_cfg.backlight_bright = 197;
        gdisp.screen[screen_id].lcd_cfg.backlight_dimming = 256;
#ifdef __LINUX_OSAL__
        spin_lock_init(&gdisp.screen[screen_id].flag_lock);
#endif
    }
    memcpy(&gdisp.init_para,para,sizeof(__disp_bsp_init_para));
		gdisp.print_level = DEFAULT_PRINT_LEVLE;

    DE_Set_Reg_Base(0, para->base_image0);
    DE_Set_Reg_Base(1, para->base_image1);
    DE_SCAL_Set_Reg_Base(0, para->base_scaler0);
    DE_SCAL_Set_Reg_Base(1, para->base_scaler1);
    tcon_set_reg_base(0,para->base_lcdc0);
    tcon_set_reg_base(1,para->base_lcdc1);
    IEP_Deu_Set_Reg_base(0, para->base_deu0);
    IEP_Deu_Set_Reg_base(1, para->base_deu1);
    IEP_Drc_Set_Reg_Base(0, para->base_drc0);
    IEP_Drc_Set_Reg_Base(1, para->base_drc1);
    IEP_CMU_Set_Reg_Base(0, para->base_cmu0);
    IEP_CMU_Set_Reg_Base(1, para->base_cmu1);
    dsi_set_reg_base(0, para->base_dsi0);
    BSP_disp_close_lcd_backlight(0);
    BSP_disp_close_lcd_backlight(1);

    Scaler_Init(0);
    Scaler_Init(1);
    Image_init(0);
    Image_init(1);
    Disp_lcdc_init(0);
    Disp_lcdc_init(1);
    Display_Hdmi_Init();

    iep_init(0);   
    iep_init(1);

    disp_video_init();

    disp_pll_init();

    return DIS_SUCCESS;
}