Beispiel #1
0
int lcd_enable(void)
{
	//debug("%s\n", __FUNCTION__);
	//lcd_setup_gama_table(&tcon_config);

  /*  aml_8726m_bl_init();

    lcd_io_init();

    tcon_probe();

    osd_init_hw();

    osd_hw_setup();
*/

        mdelay(10);
 //   power_off_backlight();
    lcd_setup_gama_table(&tcon_config);
    //t13_io_init();
    
    lcd_io_init();
    
    tcon_probe();

    osd_init_hw();

    osd_hw_setup();
	//video_dac_disable();
	//    power_on_lcd(); 
	//    power_on_backlight();   //disable when required power sequence.

    return 0;
}
Beispiel #2
0
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
{
    /* screen type & face */
    screen->type = SCREEN_TYPE;
    screen->face = OUT_FACE;

    /* Screen size */
    screen->x_res = H_VD;
    screen->y_res = V_VD;

    screen->width = LCD_WIDTH;
    screen->height = LCD_HEIGHT;

    /* Timing */
    screen->lcdc_aclk = LCDC_ACLK;
    screen->pixclock = DCLK;
	screen->left_margin = H_BP;
	screen->right_margin = H_FP;
	screen->hsync_len = H_PW;
	screen->upper_margin = V_BP;
	screen->lower_margin = V_FP;
	screen->vsync_len = V_PW;

	/* Pin polarity */
	screen->pin_hsync = 0;
	screen->pin_vsync = 0;
	screen->pin_den = 0;
	screen->pin_dclk = DCLK_POL;
	screen->pin_den = DEN_POL;

	/* Swap rule */
    screen->swap_rb = 0;
    screen->swap_rg = 0;
    screen->swap_gb = 0;
    screen->swap_delta = 0;
    screen->swap_dumy = 0;

    /* Operation function*/
    screen->init = lcd_init;
    screen->standby = lcd_standby;

    if(lcd_info)
        gLcd_info = lcd_info;
    lcd_io_init();    
    dsi_probe_current_chip();
}
Beispiel #3
0
int lcd_enable(void)
{
    sn7325_init();	
    
    lcd_setup_gama_table(&tcon_config);

    aml_8726m_bl_init();

    lcd_io_init();

    tcon_probe();

    osd_init_hw();

    osd_hw_setup();

    return 0;
}
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
{

#if defined(RK_USE_SCREEN_ID)
	set_lcd_info_by_id(screen,lcd_info);
#else
	#if defined(CONFIG_MACH_RK_FAC)
		screen->type = lcd_param[OUT_TYPE_INDEX];
		screen->face = lcd_param[OUT_FACE_INDEX];
		screen->lvds_format = lcd_param[LVDS_FORMAT_INDEX];  //lvds data format
	
		
		screen->x_res = lcd_param[H_VD_INDEX];
		screen->y_res = lcd_param[V_VD_INDEX];
	
		screen->width = lcd_param[LCD_WIDTH_INDEX];
		screen->height = lcd_param[LCD_HEIGHT_INDEX];
	
		    
		screen->lcdc_aclk = lcd_param[LCDC_ACLK_INDEX];
		screen->pixclock = lcd_param[OUT_CLK_INDEX];
		screen->left_margin = lcd_param[H_BP_INDEX];
		screen->right_margin = lcd_param[H_FP_INDEX];
		screen->hsync_len = lcd_param[H_PW_INDEX];
		screen->upper_margin = lcd_param[V_BP_INDEX];
		screen->lower_margin = lcd_param[V_FP_INDEX];
		screen->vsync_len = lcd_param[V_PW_INDEX];
	
		
		screen->pin_hsync = HSYNC_POL; //Pin polarity 
		screen->pin_vsync = VSYNC_POL;
		screen->pin_den = DEN_POL;
		screen->pin_dclk = lcd_param[DCLK_POL_INDEX];
	
		
		screen->swap_rb = lcd_param[SWAP_RB_INDEX];
		screen->swap_rg = SWAP_RG;
		screen->swap_gb = SWAP_GB;
		screen->swap_delta = 0;
		screen->swap_dumy = 0;
	#else // if not defined (CONFIG_MACH_RK_FAC)
		screen->type = SCREEN_TYPE;
		screen->face = OUT_FACE;
		screen->lvds_format = LVDS_FORMAT;  //lvds data format

	
		screen->x_res = H_VD;		//screen resolution
		screen->y_res = V_VD;

		screen->width = LCD_WIDTH;
		screen->height = LCD_HEIGHT;

	    
		screen->lcdc_aclk = LCDC_ACLK; // Timing 
		screen->pixclock = DCLK;
		screen->left_margin = H_BP;
		screen->right_margin = H_FP;
		screen->hsync_len = H_PW;
		screen->upper_margin = V_BP;
		screen->lower_margin = V_FP;
		screen->vsync_len = V_PW;

	
		screen->pin_hsync = HSYNC_POL; //Pin polarity 
		screen->pin_vsync = VSYNC_POL;
		screen->pin_den = DEN_POL;
		screen->pin_dclk = DCLK_POL;

	
		screen->swap_rb = SWAP_RB; // Swap rule 
		screen->swap_rg = SWAP_RG;
		screen->swap_gb = SWAP_GB;
		screen->swap_delta = 0;
		screen->swap_dumy = 0;
	#endif // (CONFIG_MACH_RK_FAC)
	
	#if defined(CONFIG_MIPI_DSI)
       		/* MIPI DSI */
		#if defined(MIPI_DSI_LANE)       
    			screen->dsi_lane = MIPI_DSI_LANE;
		#else
			screen->dsi_lane = 4;
		#endif
    		//screen->dsi_video_mode = MIPI_DSI_VIDEO_MODE;
		#if defined(MIPI_DSI_HS_CLK)    
    			screen->hs_tx_clk = MIPI_DSI_HS_CLK;
		#else    
			screen->hs_tx_clk = 1000000000;        //1GHz
		#endif

	#endif


	/* Operation function*/
	#if defined(RK_SCREEN_INIT)  //some screen need to init by spi or i2c
		screen->init = rk_lcd_init;
	   	screen->standby = rk_lcd_standby;
		if(lcd_info)
	       		gLcd_info = lcd_info;	
	#endif

	#if defined(USE_RK_DSP_LUT)
		screen->dsp_lut = dsp_lut;
	#endif
	
	#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF) 
	    	screen->sscreen_get = set_scaler_info;
	#endif

	msleep(100);

#if defined(CONFIG_MIPI_DSI)
 	lcd_io_init();
	msleep(200);
    	dsi_probe_current_chip();
	msleep(100);
#endif

#endif 
}