/*setting for support continuous splash */
static int mipi_nt35512_lcd_on(struct platform_device *pdev)
{
	boolean para_debug_flag = FALSE;
	uint32 para_num = 0;
	struct msm_fb_data_type *mfd;
	mfd = platform_get_drvdata(pdev);
	
	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL; 
	

	para_debug_flag = lcd_debug_malloc_get_para( "nt35512_lcd_init_table_debug", 
			(void**)&nt35512_lcd_init_table_debug,&para_num);

	lcd_reset();
	mipi_set_tx_power_mode(1);//Low power mode 
	
	if( (TRUE == para_debug_flag) && (NULL != nt35512_lcd_init_table_debug))
	{
		process_mipi_table(mfd,&nt35512_tx_buf,nt35512_lcd_init_table_debug,
			para_num, lcd_panel_wvga);
	}
	else
	{
		/*Add nt35512 video mode for byd*/
		if (MIPI_VIDEO_NT35512_BOE_WVGA == lcd_panel_wvga  ){
			process_mipi_table(mfd,&nt35512_tx_buf,(struct sequence*)&nt35512_boe_lcd_init_table,
				ARRAY_SIZE(nt35512_boe_lcd_init_table), lcd_panel_wvga);
		}
		else if ( MIPI_VIDEO_NT35512_BYD_WVGA == lcd_panel_wvga ){
			process_mipi_table(mfd,&nt35512_tx_buf,(struct sequence*)&nt35512_byd_lcd_init_table,
				ARRAY_SIZE(nt35512_byd_lcd_init_table), lcd_panel_wvga);
		}

	}
	mipi_set_tx_power_mode(0);	//High speed mode 
	
	if((TRUE == para_debug_flag)&&(NULL != nt35512_lcd_init_table_debug))
	{
		lcd_debug_free_para((void *)nt35512_lcd_init_table_debug);
	}
	
	if (!mfd->cont_splash_done) 
	{
		mfd->cont_splash_done = 1;
		nt35512_cabc_enable_table[1].reg = 0x00064;
		process_mipi_table(mfd,&nt35512_tx_buf,(struct sequence*)&nt35512_cabc_enable_table,
			ARRAY_SIZE(nt35512_cabc_enable_table), lcd_panel_wvga);
	}
	
	LCD_DEBUG("leave mipi_nt35512_lcd_on \n");
	return 0;
}
static int nt35510_config_auto_cabc(struct msmfb_cabc_config cabc_cfg,struct msm_fb_data_type *mfd)
{
	int ret = 0;

	switch(cabc_cfg.mode)
	{
		case CABC_MODE_UI:
			/* the value of cabc register should be 24 in UI mode */
			nt35510_auto_cabc_set_table[1].reg=0x00024;
			nt35510_auto_cabc_set_table[3].reg=0x00001;
			break;
		case CABC_MODE_MOVING:
		case CABC_MODE_STILL:
			/* the value of cabc register should be 2C in moving mode and still mode */
			nt35510_auto_cabc_set_table[1].reg=0x0002C;
			nt35510_auto_cabc_set_table[3].reg=0x00003;
			break;
		default:
			LCD_DEBUG("%s: invalid cabc mode: %d\n", __func__, cabc_cfg.mode);
	        ret = -EINVAL;
			break;
	}
	if(likely(0 == ret))
	{
		process_mipi_table(mfd,&nt35510_tx_buf,(struct sequence*)&nt35510_auto_cabc_set_table,
			 ARRAY_SIZE(nt35510_auto_cabc_set_table), lcd_panel_wvga);
	}

	LCD_DEBUG("%s: change cabc mode to %d\n",__func__,cabc_cfg.mode);
	return ret;
}
Example #3
0
void rsp61408_set_cabc_backlight(struct msm_fb_data_type *mfd,uint32 bl_level)
{
    rsp61408_wvga_write_cabc_brightness_table[2].reg = bl_level;

    process_mipi_table(mfd,&rsp61408_tx_buf,(struct sequence*)&rsp61408_wvga_write_cabc_brightness_table,
                       ARRAY_SIZE(rsp61408_wvga_write_cabc_brightness_table), lcd_panel_wvga);
}
/***************************************************************
Function: hx8369b_config_auto_cabc
Description: Set CABC configuration
Parameters:
    struct msmfb_cabc_config cabc_cfg: CABC configuration struct
Return:
    0: success
***************************************************************/
static int hx8369b_config_auto_cabc(struct msmfb_cabc_config cabc_cfg,struct msm_fb_data_type *mfd)
{
	int ret = 0;

	switch(cabc_cfg.mode)
	{
		case CABC_MODE_UI:
			hx8369b_auto_cabc_set_table[1].reg=0x00001;
			break;
		case CABC_MODE_MOVING:
		case CABC_MODE_STILL:
			hx8369b_auto_cabc_set_table[1].reg=0x00003;
			break;
		default:
			LCD_DEBUG("%s: invalid cabc mode: %d\n", __func__, cabc_cfg.mode);
	        ret = -EINVAL;
			break;
	}
	if(likely(0 == ret))
	{
		process_mipi_table(mfd,&hx8369b_tx_buf,(struct sequence*)&hx8369b_auto_cabc_set_table,
			 ARRAY_SIZE(hx8369b_auto_cabc_set_table), lcd_panel_wvga);
	}

	LCD_DEBUG("%s: change cabc mode to %d\n",__func__,cabc_cfg.mode);
	return ret;
}
/*lcd cabc control function*/
void hx8369b_set_cabc_backlight(struct msm_fb_data_type *mfd,uint32 bl_level)
{	
	hx8369b_wvga_write_cabc_brightness_table[1].reg = bl_level; 

	process_mipi_table(mfd,&hx8369b_tx_buf,(struct sequence*)&hx8369b_wvga_write_cabc_brightness_table,
		 ARRAY_SIZE(hx8369b_wvga_write_cabc_brightness_table), lcd_panel_wvga);
}
void hx8357c_set_cabc_backlight(struct msm_fb_data_type *mfd,uint32 bl_level)
{	
	hx8357c_cabc_enable_table[1].reg = bl_level; // 1 will be changed if modify init code

	process_mipi_table(mfd,&hx8357c_tx_buf,(struct sequence*)&hx8357c_cabc_enable_table,
		 ARRAY_SIZE(hx8357c_cabc_enable_table), lcd_panel_hvga);
}
void nt35516_set_cabc_backlight(struct msm_fb_data_type *mfd,uint32 bl_level)
{	
	nt35516_cabc_enable_table[1].reg = bl_level; // 1 will be changed if modify init code

	process_mipi_table(mfd,&nt35516_tx_buf,(struct sequence*)&nt35516_cabc_enable_table,
		 ARRAY_SIZE(nt35516_cabc_enable_table), lcd_panel_qhd);
}
/*setting for support continuous splash */
static int mipi_hx8369b_lcd_on(struct platform_device *pdev)
{

	boolean para_debug_flag = FALSE;
	uint32 para_num = 0;
	struct msm_fb_data_type *mfd;
	mfd = platform_get_drvdata(pdev);
	
	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL; 

	para_debug_flag = lcd_debug_malloc_get_para( "hx8369b_lcd_init_table_debug", 
			(void**)&hx8369b_lcd_init_table_debug,&para_num);
	
	lcd_reset();
	mipi_set_tx_power_mode(1);//Low power mode 
	
	if( (TRUE == para_debug_flag) && (NULL != hx8369b_lcd_init_table_debug))
	{
		process_mipi_table(mfd,&hx8369b_tx_buf,hx8369b_lcd_init_table_debug,
			para_num, lcd_panel_wvga);
	}
	else
	{
		process_mipi_table(mfd,&hx8369b_tx_buf,(struct sequence*)&hx8369b_tianma_lcd_init_table,
			ARRAY_SIZE(hx8369b_tianma_lcd_init_table), lcd_panel_wvga);
	}
	
	mipi_set_tx_power_mode(0);//High speed mode 
	
	if((TRUE == para_debug_flag)&&(NULL != hx8369b_lcd_init_table_debug))
	{
		lcd_debug_free_para((void *)hx8369b_lcd_init_table_debug);
	}
	
	if (!mfd->cont_splash_done) {
		mfd->cont_splash_done = 1;
		hx8369b_wvga_write_cabc_brightness_table[1].reg = 0x00064;
		process_mipi_table(mfd,&hx8369b_tx_buf,(struct sequence*)&hx8369b_wvga_write_cabc_brightness_table,
			ARRAY_SIZE(hx8369b_wvga_write_cabc_brightness_table), lcd_panel_wvga);
	}
	
	LCD_DEBUG("leave mipi_otm8018b_lcd_on \n");
	return 0;
}
/*lcd cabc control function*/
void nt35510_set_cabc_backlight(struct msm_fb_data_type *mfd,uint32 bl_level)
{	
    /* move the reset to lcd_on */
    
    nt35510_wvga_write_cabc_brightness_table[1].reg = bl_level; 

	process_mipi_table(mfd,&nt35510_tx_buf,(struct sequence*)&nt35510_wvga_write_cabc_brightness_table,
		 ARRAY_SIZE(nt35510_wvga_write_cabc_brightness_table), lcd_panel_wvga);
}
/*lcd cabc control function*/
void nt35510_fwvga_set_cabc_backlight(struct msm_fb_data_type *mfd,uint32 bl_level)
{
    /* clean up ack_err_status */
	mipi_nt35510_read_register(mfd);
	nt35510_fwvga_write_cabc_brightness_table[1].reg = bl_level; 

	process_mipi_table(mfd,&nt35510_fwvga_tx_buf,(struct sequence*)&nt35510_fwvga_write_cabc_brightness_table,
		 ARRAY_SIZE(nt35510_fwvga_write_cabc_brightness_table), lcd_panel_fwvga);
}
static int mipi_nt35516_lcd_on(struct platform_device *pdev)
{
	
	/*delete some lines */
	boolean para_debug_flag = FALSE;
	uint32 para_num = 0;
	struct msm_fb_data_type *mfd;
	mfd = platform_get_drvdata(pdev);

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL; 

	/*delete some lines */
	para_debug_flag = lcd_debug_malloc_get_para( "nt35516_lcd_init_table_debug", 
            (void**)&nt35516_lcd_init_table_debug,&para_num);

    if( (TRUE == para_debug_flag) && (NULL != nt35516_lcd_init_table_debug))
    {
        process_mipi_table(mfd,&nt35516_tx_buf,nt35516_lcd_init_table_debug,
		     para_num, lcd_panel_qhd);
    }
	else
	{
		/* change mipi transmit mode to low power when load sequences */
		mipi_set_tx_power_mode(1);
		process_mipi_table(mfd,&nt35516_tx_buf,(struct sequence*)&nt35516_hvga_standby_exit_table,
		 	ARRAY_SIZE(nt35516_hvga_standby_exit_table), lcd_panel_qhd);
		mipi_set_tx_power_mode(0);
		/*delete some lines */
	}

	if((TRUE == para_debug_flag)&&(NULL != nt35516_lcd_init_table_debug))
	{
		lcd_debug_free_para((void *)nt35516_lcd_init_table_debug);
	}
	
	pr_info("leave mipi_nt35516_lcd_on \n");
	return 0;
}
/*Interface for dynamic gamma*/
int mipi_nt35516_set_dynamic_gamma(enum danymic_gamma_mode  gamma_mode,struct msm_fb_data_type *mfd)
{
	int ret = 0;
	switch(gamma_mode)
	{
		case GAMMA25:
			process_mipi_table(mfd,&nt35516_tx_buf,(struct sequence*)&tianma_nt35516_gamma_25,
					ARRAY_SIZE(tianma_nt35516_gamma_25), lcd_panel_qhd);
			break ;
		case GAMMA22:
			process_mipi_table(mfd,&nt35516_tx_buf,(struct sequence*)&tianma_nt35516_gamma_22,
					ARRAY_SIZE(tianma_nt35516_gamma_22), lcd_panel_qhd);
			break;
		default:
			LCD_DEBUG("%s: invalid dynamic_gamma: %d\n", __func__,gamma_mode);
			ret = -EINVAL;
			break;
	}
	LCD_DEBUG("%s: change gamma mode to %d\n",__func__,gamma_mode);
	return ret;
}
/*lcd resume function*/
static int mipi_nt35510_lcd_on(struct platform_device *pdev)
{
	boolean para_debug_flag = FALSE;
	uint32 para_num = 0;
	struct msm_fb_data_type *mfd;
	mfd = platform_get_drvdata(pdev);

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL; 

	para_debug_flag = lcd_debug_malloc_get_para( "nt35510_lcd_init_table_debug", 
			(void**)&nt35510_lcd_init_table_debug,&para_num);

	if( (TRUE == para_debug_flag) && (NULL != nt35510_lcd_init_table_debug))
	{
		process_mipi_table(mfd,&nt35510_tx_buf,nt35510_lcd_init_table_debug,
		     para_num, lcd_panel_wvga);
	}
	else
	{
		mipi_set_tx_power_mode(1);
		process_mipi_table(mfd,&nt35510_tx_buf,(struct sequence*)&nt35510_wvga_standby_exit_table,
		 	ARRAY_SIZE(nt35510_wvga_standby_exit_table), lcd_panel_wvga);
		mipi_set_tx_power_mode(0);
	}

	if((TRUE == para_debug_flag)&&(NULL != nt35510_lcd_init_table_debug))
	{
		lcd_debug_free_para((void *)nt35510_lcd_init_table_debug);
	}
	

	mipi_nt35510_read_register(mfd);

    LCD_DEBUG("leave mipi_nt35510_lcd_on \n");
	return 0;
}
int mipi_nt35510_set_dynamic_gamma(enum danymic_gamma_mode  gamma_mode,struct msm_fb_data_type *mfd)
{
	int ret = 0;
	
	switch(gamma_mode)
	{
		case GAMMA25:
			if(MIPI_CMD_NT35510_BOE_WVGA == lcd_panel_wvga)
			{
				process_mipi_table(mfd,&nt35510_tx_buf,(struct sequence*)&nt35510_gamma_25,
						ARRAY_SIZE(nt35510_gamma_25), lcd_panel_wvga);
			}
			else
			{
				process_mipi_table(mfd,&nt35510_tx_buf,(struct sequence*)&chimei_nt35510_gamma_25,
						ARRAY_SIZE(chimei_nt35510_gamma_25), lcd_panel_wvga);
			}
			break;
		case GAMMA22:
			if(MIPI_CMD_NT35510_BOE_WVGA == lcd_panel_wvga)
			{
				process_mipi_table(mfd,&nt35510_tx_buf,(struct sequence*)&nt35510_gamma_22,
						ARRAY_SIZE(nt35510_gamma_22), lcd_panel_wvga);
			}
			else
			{
				process_mipi_table(mfd,&nt35510_tx_buf,(struct sequence*)&chimei_nt35510_gamma_22,
						ARRAY_SIZE(chimei_nt35510_gamma_22), lcd_panel_wvga);
			}
			break;
		default:
			LCD_DEBUG("%s: invalid dynamic_gamma: %d\n", __func__,gamma_mode);
			ret = -EINVAL;
			break;
	}
	LCD_DEBUG("%s: change gamma mode to %d\n",__func__,gamma_mode);
	return ret;
}
Example #15
0
static int mipi_rsp61408_lcd_off(struct platform_device *pdev)
{
    struct msm_fb_data_type *mfd;
    mfd = platform_get_drvdata(pdev);

    if (!mfd)
        return -ENODEV;
    if (mfd->key != MFD_KEY)
        return -EINVAL;

    process_mipi_table(mfd,&rsp61408_tx_buf,(struct sequence*)&rsp61408_wvga_standby_enter_table,
                       ARRAY_SIZE(rsp61408_wvga_standby_enter_table), lcd_panel_wvga);
    pr_info("leave mipi_rsp61408_lcd_off \n");
    return 0;
}
static int mipi_nt35510_lcd_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	mfd = platform_get_drvdata(pdev);

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;
	/* clean up ack_err_status */
	mipi_nt35510_read_register(mfd);

	process_mipi_table(mfd,&nt35510_tx_buf,(struct sequence*)&nt35510_wvga_standby_enter_table,
		 ARRAY_SIZE(nt35510_wvga_standby_enter_table), lcd_panel_wvga);
    LCD_DEBUG("leave mipi_nt35510_lcd_off \n");
	return 0;
}
/*lcd suspend function*/
static int mipi_otm8018b_lcd_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	mfd = platform_get_drvdata(pdev);

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;
#if 0
	process_mipi_table(mfd,&otm8018b_tx_buf,(struct sequence*)&otm8018b_wvga_standby_enter_table,
		 ARRAY_SIZE(otm8018b_wvga_standby_enter_table), lcd_panel_wvga);
#endif
	lcd_reset();
	LCD_DEBUG("leave mipi_otm8018b_lcd_off \n");
	return 0;
}