示例#1
0
static int mipi_renesas_lcd_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;

	ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

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

	if (renesas_state.disp_on == true) {
		mutex_lock(&renesas_state.lcd_mutex);
    		mipi_set_tx_power_mode(0);

		mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_display_off_cmds,
				ARRAY_SIZE(renesas_display_off_cmds));

		renesas_state.disp_on = false;
		renesas_state.disp_initialized = false;
		mipi_set_tx_power_mode(1);	
		mutex_unlock(&renesas_state.lcd_mutex);

#ifdef CONFIG_F_SKYDISP_SILENT_BOOT
        sky_sys_rst_set_silent_boot_backlight(0);
        is_silent_boot_mode_n_bl_off = 0;
#endif
	}

	EXIT_FUNC2();
	return 0;
}
示例#2
0
static int __init mipi_sony_lcd_init(void)
{
    ENTER_FUNC2();

#if defined(CONFIG_F_SKYDISP_SILENT_BOOT) && defined(CONFIG_PANTECH_RESET_REASON)
    is_silent_boot_mode = sky_sys_rst_get_silent_boot_mode();
    is_backlight_on_before_reset = sky_sys_rst_get_silent_boot_backlight();
    
    if(is_silent_boot_mode == 1 && is_backlight_on_before_reset == 0)
    {
        printk("This time is silent boot mode.\n");
        is_silent_boot_mode_n_bl_off = 1;
    }
    else
        printk("This time is NOT silent boot mode.\n");
#endif 

    sony_state.disp_powered_up = true;

    mipi_dsi_buf_alloc(&sony_tx_buf, DSI_BUF_SIZE);
    mipi_dsi_buf_alloc(&sony_rx_buf, DSI_BUF_SIZE);

    EXIT_FUNC2();

    return platform_driver_register(&this_driver);
}
static int mipi_samsung_oled_hd_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
//	u32 tmp;
    
    	ENTER_FUNC2();
    
	mfd = platform_get_drvdata(pdev);

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;
    
	if (samsung_oled_hd_state.disp_on == true) {
	//	is_sleep = TRUE;
        samsung_oled_hd_state.disp_initialized = false;
        samsung_oled_hd_state.disp_on = false;
        printk("[PANTECH_LCD] power off state (oled_hd panel).... \n");
#ifdef CONFIG_PANTECH_HDMI_PW_CTRL_ON_LCD
	if (!HDMI_Get_Cable_State()) {
		hdmi_autodetect_control(HDMI_PW_OFF);
		HDMI_Schedule_Control(0);
	}

#endif	
    	}	   
    
    	EXIT_FUNC2();
	return 0;
}
static int __init mipi_renesas_lcd_init(void)
{
    ENTER_FUNC2();

#ifdef CONFIG_F_SKYDISP_CHANGE_BL_TABLE_WHEN_OFFLINE_CHARGING
    is_offline_charging_mode = pantech_charging_status();
    printk("is_offline_charging_mode : %d\n", is_offline_charging_mode);
#endif

#ifdef CONFIG_F_SKYDISP_SILENT_BOOT
    is_silent_boot_mode = pantech_sys_rst_is_silent_boot_mode();
    is_backlight_on_before_reset = pantech_sys_reset_backlight_flag_get();	
    
    if(is_silent_boot_mode == 1 && is_backlight_on_before_reset == 0)
    {
        printk("This time is silent boot mode.\n");
        is_silent_boot_mode_n_bl_off = 1;
    }
    else
        printk("This time is NOT silent boot mode.\n");
#endif        

    renesas_state.disp_powered_up = true;

    mipi_dsi_buf_alloc(&renesas_tx_buf, DSI_BUF_SIZE);
    mipi_dsi_buf_alloc(&renesas_rx_buf, DSI_BUF_SIZE);

    EXIT_FUNC2();

    return platform_driver_register(&this_driver);
}
示例#5
0
static int __init mipi_sony_lcd_init(void)
{
    ENTER_FUNC2();

    lcd_gpio_init(lcd_gpio_init_table, ARRAY_SIZE(lcd_gpio_init_table), 1);

#ifdef FEATURE_SKY_BACLIGHT_MAX8831
    led_i2c_api_Init();
#endif

	gpio_set_value_cansleep(LCD_DET, GPIO_LOW_VALUE);
    sony_state.disp_powered_up = true;

    mipi_dsi_buf_alloc(&sony_tx_buf, DSI_BUF_SIZE);
    mipi_dsi_buf_alloc(&sony_rx_buf, DSI_BUF_SIZE);

#if 1//def CONFIG_SW_RESET
	if (msm_reset_reason_read_only()) {
		first_enable = 0;
		prev_bl_level = 0;
	}
#endif

    EXIT_FUNC2();

    return platform_driver_register(&this_driver);
}
示例#6
0
static int mipi_sony_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;

    ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

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

	//mutex_lock(&mfd->dma->ov_mutex);
	if (sony_state.disp_initialized == false) {
		//PRINT("[LIVED] LCD RESET!!\n");
		gpio_set_value_cansleep(LCD_RESET, GPIO_LOW_VALUE);
		usleep(10);//msleep(1);
		gpio_set_value_cansleep(LCD_RESET, GPIO_HIGH_VALUE);
		usleep(10);//msleep(120);
#ifdef USE_INITIAL_SEQ
		mipi_dsi_cmds_tx(mfd, &sony_tx_buf, sony_display_init_cmds,
				ARRAY_SIZE(sony_display_init_cmds));
#endif
		sony_state.disp_initialized = true;
	}
	mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_on_cmds,
			ARRAY_SIZE(sony_display_on_cmds));
	sony_state.disp_on = true;
	//mutex_unlock(&mfd->dma->ov_mutex);

	EXIT_FUNC2();
	return 0;
}
示例#7
0
static int mipi_sony_lcd_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;

    ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

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

    //mutex_lock(&mfd->dma->ov_mutex); 
	if (sony_state.disp_on == true) {
		gpio_set_value_cansleep(LCD_RESET, GPIO_LOW_VALUE);
		usleep(10);//msleep(1);
		gpio_set_value_cansleep(LCD_RESET, GPIO_HIGH_VALUE);
		usleep(10);//msleep(120);

		mipi_samsung_lcd_off_running=1;
		mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_off_cmds,
				ARRAY_SIZE(sony_display_off_cmds));
		mipi_samsung_lcd_off_running=0;
		sony_state.disp_on = false;
		sony_state.disp_initialized = false;
	}
    //mutex_unlock(&mfd->dma->ov_mutex);    
    EXIT_FUNC2();
	return 0;
}
示例#8
0
static int mipi_oscar_lcd_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;

    ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

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

	if (oscar_state.disp_on == true) {
	
			mipi_dsi_cmds_tx(mfd, &oscar_tx_buf, oscar_sleep_in,
				ARRAY_SIZE(oscar_sleep_in));
		
		oscar_state.disp_on = false;
		oscar_state.disp_initialized = false;
	}
    backlight_cnt = false;
	oscar_state.disp_powered_up = false;

	EXIT_FUNC2();
	return 0;

}
static int mipi_himax_lcd_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;

    ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

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

	if (himax_state.disp_on == true) {
		gpio_set_value_cansleep(gpio43, GPIO_LOW_VALUE);
		usleep(10);
		gpio_set_value_cansleep(gpio43, GPIO_HIGH_VALUE);
		usleep(10);

		mipi_dsi_cmds_tx(mfd, &himax_tx_buf, himax_sleep_in_cmds,
				ARRAY_SIZE(himax_sleep_in_cmds));
		himax_state.disp_on = false;
		himax_state.disp_initialized = false;
	    EXIT_FUNC2();
	}
      
	return 0;
}
static int mipi_sony_lcd_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
	struct dcs_cmd_req cmdreq;
#endif

    ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;
	
    mutex_lock(&sony_state.lcd_mutex);	
	
    if (sony_state.disp_on == true) {
        sony_state.disp_on = false;
        sony_state.disp_initialized = false;		
        //mipi_set_tx_power_mode(0);
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
		cmdreq.cmds = sony_display_off_cmds;
		cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_off_cmds);
		cmdreq.flags = CMD_REQ_COMMIT;
		cmdreq.rlen = 0;
		cmdreq.cb = NULL;

		mipi_dsi_cmdlist_put(&cmdreq);
#else
        mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_off_cmds,
                ARRAY_SIZE(sony_display_off_cmds));
#endif

#if defined(CONFIG_F_SKYDISP_SILENT_BOOT) && defined(CONFIG_PANTECH_ERR_CRASH_LOGGING)
	pantech_sys_reset_backlight_flag_set(false);	
        is_silent_boot_mode_n_bl_off = 0;
#endif		
        //mipi_set_tx_power_mode(1);	
    }
	
#ifdef CONFIG_F_SKYDISP_EF52_KK_TEARING_WORKAROUND
    mfd->ibuf.vsync_enable = FALSE;
#endif

#ifdef FEATURE_RENESAS_BL_CTRL_CHG
    wrdisbv[1] = 0;

	if(gpio_get_value_cansleep(gpio_lcd_bl_en))
      		gpio_set_value_cansleep(gpio_lcd_bl_en, GPIO_LOW_VALUE);
#endif

    mutex_unlock(&sony_state.lcd_mutex);	

    EXIT_FUNC2();
    return 0;
}
示例#11
0
static int __init mipi_samsung_oled_init(void)
{
    ENTER_FUNC2();

    samsung_oled_state.disp_powered_up = true;

    mipi_dsi_buf_alloc(&samsung_oled_tx_buf, DSI_BUF_SIZE);
    mipi_dsi_buf_alloc(&samsung_oled_rx_buf, DSI_BUF_SIZE);

    EXIT_FUNC2();

    return platform_driver_register(&this_driver);
}
示例#12
0
static int mipi_sony_lcd_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
	struct dcs_cmd_req cmdreq;
#endif

    ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;
	
    mutex_lock(&sony_state.lcd_mutex);	
	
    if (sony_state.disp_on == true) {
        //mipi_set_tx_power_mode(0);
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
	cmdreq.cmds = sony_display_off_cmds;
	cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_off_cmds);
	cmdreq.flags = CMD_REQ_COMMIT;
	cmdreq.rlen = 0;
	cmdreq.cb = NULL;

	mipi_dsi_cmdlist_put(&cmdreq);
#else
        mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_off_cmds,
                ARRAY_SIZE(sony_display_off_cmds));
#endif
        sony_state.disp_on = false;
        sony_state.disp_initialized = false;

#ifdef CONFIG_F_SKYDISP_SILENT_BOOT
        sky_sys_rst_set_silent_boot_backlight(0);
        is_silent_boot_mode_n_bl_off = 0;
#endif		
        //mipi_set_tx_power_mode(1);	
    }

    mutex_unlock(&sony_state.lcd_mutex);	

#ifdef FEATURE_RENESAS_BL_CTRL_CHG
    wrdisbv[1] = 0;
#endif

    EXIT_FUNC2();
    return 0;
}
示例#13
0
static int __init mipi_oscar_lcd_init(void)
{
    ENTER_FUNC2();

    oscar_state.disp_powered_up = true;
	id_read_flag = false;

    mipi_dsi_buf_alloc(&oscar_tx_buf, DSI_BUF_SIZE);
    mipi_dsi_buf_alloc(&oscar_rx_buf, DSI_BUF_SIZE);

    EXIT_FUNC2();

    return platform_driver_register(&this_driver);

}
示例#14
0
int mipi_sony_force_lcd_off(void)
{
	struct msm_fb_data_type *mfd;
	struct fb_info *info; 
	struct dcs_cmd_req cmdreq;

	ENTER_FUNC2();

	info = registered_fb[0];
	mfd = (struct msm_fb_data_type *)info->par;

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;
	
    mutex_lock(&sony_state.lcd_mutex);	
	
    if (sony_state.disp_on == true) {
		//mipi_set_tx_power_mode(0);
		cmdreq.cmds = sony_display_off_cmds;
		cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_off_cmds);
		cmdreq.flags = CMD_REQ_COMMIT;
		cmdreq.rlen = 0;
		cmdreq.cb = NULL;

		mipi_dsi_cmdlist_put(&cmdreq);

        sony_state.disp_on = false;
        sony_state.disp_initialized = false;

#if defined(CONFIG_F_SKYDISP_SILENT_BOOT) && defined(CONFIG_PANTECH_RESET_REASON)
        sky_sys_rst_set_silent_boot_backlight(0);
        is_silent_boot_mode_n_bl_off = 0;
#endif		
        //mipi_set_tx_power_mode(1);	
    }

    mutex_unlock(&sony_state.lcd_mutex);	

#ifdef FEATURE_RENESAS_BL_CTRL_CHG
    wrdisbv[1] = 0;
#endif

    EXIT_FUNC2();
    return 0;
}
示例#15
0
static int mipi_samsung_oled_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
	u32 tmp;
    
    ENTER_FUNC2();
    
	mfd = platform_get_drvdata(pdev);

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;
    
	if (samsung_oled_state.disp_on == true) {
#if 0
	   	gpio_set_value_cansleep(gpio43, 0);
	  	usleep(10);
	  	gpio_set_value_cansleep(gpio43, 1);
	  	usleep(10);
		
		mipi_dsi_sw_reset();
#endif
		tmp = MIPI_INP(MIPI_DSI_BASE + 0xA8);
		tmp &= ~(1<<28);
		MIPI_OUTP(MIPI_DSI_BASE + 0xA8, tmp);
		wmb();
           
		is_sleep = FALSE;
        samsung_oled_state.disp_initialized = false;
        samsung_oled_state.disp_on = false;
	    printk("[PANTECH_LCD] power off state (oled panel).... \n");
#ifdef CONFIG_PANTECH_F_HDMI_PW_CTRL_ON_LCD
				if (!HDMI_Get_Cable_State()) {
					hdmi_autodetect_control(HDMI_PW_OFF);
					HDMI_Schedule_Control(0);
				}

#endif	

    }   
    
    EXIT_FUNC2();
	return 0;
}
示例#16
0
void android_poweroff(void)
{
    struct fb_info *info; 
    struct msm_fb_data_type *mfd;

    info = registered_fb[0];
	mfd = (struct msm_fb_data_type *)info->par;
	if(mfd->panel_power_on == FALSE)
		return;
	
	mipi_set_tx_power_mode(0);	
	mipi_dsi_cmds_tx(mfd, &oscar_tx_buf, oscar_sleep_in,
				ARRAY_SIZE(oscar_sleep_in));
	mipi_set_tx_power_mode(1);
	gpio_direction_output(gpio43, 0);
	mdelay(110);
	//mipi_dsi_cdp_panel_power(0);
	mipi_dsi_cdp_panel_power_Oscar(0);
	EXIT_FUNC2();

}
示例#17
0
static int mipi_samsung_oled_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;

    ENTER_FUNC2();
    
	mfd = platform_get_drvdata(pdev);

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

       if (samsung_oled_state.disp_initialized == false) {
			is_first = TRUE;
    	    samsung_oled_state.disp_initialized = true;
	 	  	usleep(10);
	   		
			gpio_set_value_cansleep(gpio43, 0);
	 		usleep(10);
           	gpio_set_value_cansleep(gpio43, 1);  // lcd panel reset 
            msleep(10);
		
			/* bllp bit initialized ... */
            mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_init_cmds,
                   ARRAY_SIZE(samsung_oled_display_init_cmds));

			is_sleep = FALSE;
	        printk("[PANTECH_LCD] power on state (oled panel).... \n");

#ifdef CONFIG_PANTECH_F_HDMI_PW_CTRL_ON_LCD
		hdmi_autodetect_control(HDMI_PW_ON);
		HDMI_Schedule_Control(1);
#endif	
       }
       samsung_oled_state.disp_on = true;
       
   EXIT_FUNC2();
	return 0;
}
static int mipi_renesas_lcd_off(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;

	ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

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

	if (renesas_state.disp_on == true) {
#if defined(FEATURE_RENESAS_BL_ON_DEBUG)
        gpio_set_value_cansleep(gpio_lcd_bl_ctl, GPIO_LOW_VALUE);
        gpio_set_value_cansleep(gpio_lcd_bl_en, GPIO_LOW_VALUE);
#endif

		mutex_lock(&renesas_state.lcd_mutex);
    		mipi_set_tx_power_mode(0);

		mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_display_off_cmds,
				ARRAY_SIZE(renesas_display_off_cmds));

		renesas_state.disp_on = false;
		renesas_state.disp_initialized = false;
		mipi_set_tx_power_mode(1);	
		mutex_unlock(&renesas_state.lcd_mutex);

#ifdef CONFIG_F_SKYDISP_SILENT_BOOT
        pantech_sys_reset_backlight_flag_set(false);	
        is_silent_boot_mode_n_bl_off = 0;
#endif
	}

	EXIT_FUNC2();
	return 0;
}
示例#19
0
static void mipi_samsung_oled_set_backlight(struct msm_fb_data_type *mfd)
{
	unsigned long flags;
	ENTER_FUNC2();


	if((prev_bl != mfd->bl_level) || (is_first==TRUE)){
    	now_bl = mfd->bl_level; 
		prev_bl = now_bl;
	} else {
		printk("[PANTECH_LCD:%s] Equal backlight value ... pass ....\n",__func__);
		return;
	}

	printk(KERN_ERR "[PANTECH_LCD:] %s:%d(is_sleep:%d,is_first:%d)\n", __FUNCTION__, (mfd->bl_level),is_sleep, is_first);

    if((samsung_oled_state.disp_initialized != true) || (samsung_oled_state.disp_on == false)) {
			printk("[PANTECH_LCD:%s] Panel is off state....Ignore backlight value... \n",__func__);
			return;
	}

#ifdef D_SKY_BACKLIGHT_CONTROL

	if((is_sleep==TRUE) && (samsung_oled_state.disp_on == true)) {
		   msleep(50);
		   is_sleep = FALSE;
           mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_on_cmds,
                   ARRAY_SIZE(samsung_oled_display_on_cmds));
		   printk("[PANTECH_LCD:%s] wakeup state (oled panel).... \n",__func__);
	}
	local_save_flags(flags);
	local_irq_disable();

		switch (now_bl) {
	case 15:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_300,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_300));
		break;
	case 14:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_280,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_280));
		break;
	case 13:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_260,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_260));
		break;
	case 12:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_240,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_240));
		break;
	case 11:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_220,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_220));
		break;
	case 10:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_200,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_200));
		break;
	case 9:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_180,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_180));
		break;
	case 8:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_160,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_160));
		break;
	case 7:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_140,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_140));
		break;
	case 6:
		default:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_120,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_120));
		break;
	case 5:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_100,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_100));
		break;
	case 4:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_80,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_80));
		break;
	case 3:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_60,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_60));
		break;
	case 2:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_40,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_40));
		break;
	case 1:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_display_gamma_cmds_30,
			ARRAY_SIZE(samsung_oled_display_gamma_cmds_30));
		break;
	case 0:
		if(!is_first) {
            mipi_dsi_cmds_tx(mfd, &samsung_oled_tx_buf, samsung_oled_screen_off_cmds,
             	      ARRAY_SIZE(samsung_oled_screen_off_cmds));
			is_sleep = TRUE;
		    printk("[PANTECH_LCD:%s] sleep state (oled panel).... \n",__func__);
		}else
			is_first = FALSE;
		break;
	}	

	local_irq_restore(flags);
#endif
	EXIT_FUNC2();
}
示例#20
0
//extern void LCD_gpio_set_vci_control(int on);
static int mipi_sony_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
	struct dcs_cmd_req cmdreq;
#endif
	ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;
	
    	mutex_lock(&sony_state.lcd_mutex);	

	if (sony_state.disp_initialized == false) {
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
		cmdreq.cmds = sony_display_init_cmds;
		cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_init_cmds);
		cmdreq.flags = CMD_REQ_COMMIT;
		cmdreq.rlen = 0;
		cmdreq.cb = NULL;
		mipi_dsi_cmdlist_put(&cmdreq);

#else
		mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_init_cmds,
				ARRAY_SIZE(sony_display_init_cmds));
#endif
		sony_state.disp_initialized = true;
	}

#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
		cmdreq.cmds = sony_display_on_cmds;
		cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_on_cmds);
		cmdreq.flags = CMD_REQ_COMMIT;
		cmdreq.rlen = 0;
		cmdreq.cb = NULL;
		mipi_dsi_cmdlist_put(&cmdreq);

#else
	mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_on_cmds,
			ARRAY_SIZE(sony_display_on_cmds));
#endif
	sony_state.disp_on = true;
#if (1)// kkcho_temp
#if (0) 
	if(sony_state.acl_flag == true){
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
		cmdreq.cmds = sony_display_cabc_off_cmds;
		cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_cabc_off_cmds);
		cmdreq.flags = CMD_REQ_COMMIT;
		cmdreq.rlen = 0;
		cmdreq.cb = NULL;
		mipi_dsi_cmdlist_put(&cmdreq);

#else
		mipi_dsi_cmds_tx(mfd, &sony_tx_buf, sony_display_cabc_off_cmds,
									ARRAY_SIZE(sony_display_cabc_off_cmds));
#endif
	}
	else{ 
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
		cmdreq.cmds = sony_display_cabc_on_cmds;
		cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_cabc_on_cmds);
		cmdreq.flags = CMD_REQ_COMMIT;
		cmdreq.rlen = 0;
		cmdreq.cb = NULL;
		mipi_dsi_cmdlist_put(&cmdreq);
#else	
	mipi_dsi_cmds_tx(mfd, &sony_tx_buf, sony_display_cabc_on_cmds,
			ARRAY_SIZE(sony_display_cabc_on_cmds));
#endif
	}
//#else
#endif	// if 0
	
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
		cmdreq.cmds = sony_display_cabc_on_cmds;
		cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_cabc_on_cmds);
		cmdreq.flags = CMD_REQ_COMMIT;
		cmdreq.rlen = 0;
		cmdreq.cb = NULL;
		mipi_dsi_cmdlist_put(&cmdreq);
#else	
	mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_cabc_on_cmds,
				ARRAY_SIZE(sony_display_cabc_on_cmds));
#endif 

#endif // if 1 //kkcho_temp
	mutex_unlock(&sony_state.lcd_mutex);	

#ifdef CONFIG_F_SKYDISP_SILENT_BOOT
    // In case of reset when silentboot mode(doing boot), only when is_silent_boot_mode_n_bl_off == 0, do it.
    // If always do it, display silentboot image eventhough reset occur when backlight off.
    if(is_silent_boot_mode_n_bl_off == 0)
        sky_sys_rst_set_silent_boot_backlight(1);
#endif

#ifdef BOOT_TOUCH_RESET
	// touch reset code
	if(touch_init == false)
	{
		gpio_direction_output(TOUCH_RST_GPIO, 1);
		gpio_set_value(TOUCH_RST_GPIO, 0);
		msleep(50);
		gpio_set_value(TOUCH_RST_GPIO, 1);
		touch_init = true;
	}
#endif
	
	EXIT_FUNC2();
	return 0;
}
示例#21
0
static int mipi_oscar_lcd_on(struct platform_device *pdev)
{


	struct msm_fb_data_type *mfd;
	struct fb_info *fbi;

    ENTER_FUNC2();

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

	if (oscar_state.disp_initialized == false) {
		
		mdelay(25);
		gpio_direction_output(gpio43, 0);
	 	udelay(10);
        gpio_direction_output(gpio43, 1);  // lcd panel reset 
        mdelay(10);

		
		mipi_set_tx_power_mode(0);	
		mipi_dsi_cmds_tx(mfd, &oscar_tx_buf, oscar_display_init_cmds,
				ARRAY_SIZE(oscar_display_init_cmds));
		mipi_set_tx_power_mode(1);	
		
#ifdef SAMSUNG_LCD_MIPI_CELL
	if(id_read_flag == false){                 //read ID3
		mipi_set_tx_power_mode(0);
		mipi_dsi_cmd_bta_sw_trigger(); 
		mipi_oscar_lcd_read(mfd);
		mipi_set_tx_power_mode(1);
		printk("oscar_mipi_cell-read\n");
		id_read_flag = true;
	}
#endif

#ifdef CONFIG_ACL_FOR_AMOLED		
		
			mipi_set_tx_power_mode(0);
			switch(oscar_state.acl_data)
			{
				case 10: mipi_dsi_cmds_tx(mfd, &oscar_tx_buf, oscar_acl_control10,
								ARRAY_SIZE(oscar_acl_control10));
						break;
				case 30: mipi_dsi_cmds_tx(mfd, &oscar_tx_buf, oscar_acl_control30,
								ARRAY_SIZE(oscar_acl_control30));
				
						break;
				case 50: mipi_dsi_cmds_tx(mfd, &oscar_tx_buf, oscar_acl_control50,
								ARRAY_SIZE(oscar_acl_control50));
				
						break;
			}
			mipi_set_tx_power_mode(1);
		
#endif	
		if(first == 0){
			mipi_set_tx_power_mode(0);
			mipi_dsi_cmds_tx(mfd, &oscar_tx_buf, oscar_sleep_out,
				ARRAY_SIZE(oscar_sleep_out));
			mipi_set_tx_power_mode(1);
			first =true;
			
		}
		oscar_state.disp_initialized = true;
	}

#ifdef SAMSUNG_LCD_MIPI_CELL
	mipi_set_tx_power_mode(0);					//after read id, 
	mipi_dsi_cmds_tx(mfd, &oscar_tx_buf, Cell_on_cmd,
			ARRAY_SIZE(Cell_on_cmd));
	mipi_set_tx_power_mode(1);		
#endif
	oscar_state.disp_on = true;

	printk(KERN_WARNING"mipi_oscar_lcd_acl_data = %d, %d\n",oscar_state.acl_data,oscar_state.acl_data);

	EXIT_FUNC2();

	return 0;
}
static int mipi_samsung_oled_hd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
#if (BOARD_VER > WS10) 
	int noled_det;
#endif

    	ENTER_FUNC2();
    
	mfd = platform_get_drvdata(pdev);

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

       if (samsung_oled_hd_state.disp_initialized == false) {
    	    samsung_oled_hd_state.disp_initialized = true;
	   		
  	    	gpio_set_value_cansleep(gpio43, 0);
 	    	usleep(10);
            gpio_set_value_cansleep(gpio43, 1);  // lcd panel reset 
 	    	usleep(10);
         // mdelay(10);
           // mdelay(1);
		
            mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_init_cmds,
                   ARRAY_SIZE(samsung_oled_hd_display_init_cmds));

/*
            mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_sleepout_cmds,
                   ARRAY_SIZE(samsung_oled_hd_display_sleepout_cmds));

            mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_on1_cmds,
                   ARRAY_SIZE(samsung_oled_hd_display_on1_cmds));
*/			
#if (BOARD_VER > WS10) 
            noled_det = gpio_get_value(OLED_DET);
	    
	    if(noled_det)
		 printk("[PANTECH_LCD] OLED Panel Connector State : Disconnect !!!(%d)\n",noled_det);
	    else
		 printk("[PANTECH_LCD] OLED Panel Connector State : Connect !!!(%d)\n",noled_det);

	    
	    if((!is_read)&(!noled_det))
#else
 	    if(!is_read)
#endif
		{
			mipi_dsi_cmd_bta_sw_trigger(); 
	    	mipi_samsung_oled_hd_read_id(mfd);
	 	  	mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_300,
				ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_300));
			is_read = TRUE;
	    }else{
	  	 	mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_20,
				ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_20));
	    }
		
        
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_on2_cmds,
                  ARRAY_SIZE(samsung_oled_hd_display_on2_cmds));

	   is_sleep = FALSE;

	    printk("[PANTECH_LCD] power on state (oled_hd panel).... \n");
#ifdef D_SKY_OLED_TEMP
	 	    is_oled_temp_check();
#endif

  	   samsung_oled_hd_state.disp_on = true;
#ifdef CONFIG_PANTECH_HDMI_PW_CTRL_ON_LCD
		hdmi_autodetect_control(HDMI_PW_ON);
		HDMI_Schedule_Control(1);
#endif	
       }
       
       EXIT_FUNC2();
       return 0;
}
static void mipi_samsung_oled_hd_set_backlight(struct msm_fb_data_type *mfd)
{
	ENTER_FUNC2();

#ifdef D_SKY_BACKLIGHT_CONTROL
	if(prev_bl != mfd->bl_level) {
    		now_bl = mfd->bl_level; 
	} else {
		printk("[PANTECH_LCD:%s] Equal backlight value ... pass ....(prev_bl = %d, mfd->bl_level = %d)\n",__func__,prev_bl,mfd->bl_level);
		return;
	}

	printk(KERN_ERR "[PANTECH_LCD:] %s: Set : %d (is_stanby_mode:%d)\n", __FUNCTION__, (mfd->bl_level),is_sleep);

    if((samsung_oled_hd_state.disp_initialized != true) || (samsung_oled_hd_state.disp_on == false)) {
			printk("[PANTECH_LCD:%s] Panel is off state....Ignore backlight value... \n",__func__);
			return;
	}

	mutex_lock(&mfd->dma->ov_mutex);
    mipi_set_tx_power_mode(0);
	
	if((is_sleep==TRUE) && (samsung_oled_hd_state.disp_on == true)) {
	   is_sleep = FALSE;
           mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_wakeup_cmds,
                   ARRAY_SIZE(samsung_oled_hd_display_wakeup_cmds));
		   printk("[PANTECH_LCD:%s] wakeup state (oled_hd panel).... \n",__func__);
		   
	}

	switch (now_bl) {
	case 15:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_300,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_300));
		break;
	case 14:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_280,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_280));
		break;
	case 13:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_260,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_260));
		break;
	case 12:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_240,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_240));
		break;
	case 11:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_220,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_220));
		break;
	case 10:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_200,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_200));
		break;
	case 9:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_180,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_180));
		break;
	case 8:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_160,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_160));
		break;
	case 7:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_140,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_140));
		break;
	case 6:
		default:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_120,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_120));
		break;
	case 5:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_100,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_100));
		break;
	case 4:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_80,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_80));
		break;
	case 3:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_60,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_60));
		break;
	case 2:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_40,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_40));
		break;
	case 1:
	   mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_display_gamma_cmds_20,
			ARRAY_SIZE(samsung_oled_hd_display_gamma_cmds_20));
		break;
	case 0:
            mipi_dsi_cmds_tx(mfd, &samsung_oled_hd_tx_buf, samsung_oled_hd_screen_off_cmds,
             	      ARRAY_SIZE(samsung_oled_hd_screen_off_cmds));
	    is_sleep = TRUE;
	    printk("[PANTECH_LCD:%s] sleep state (oled_hd panel).... \n",__func__);
		break;
	}	

	prev_bl = now_bl;

   	mipi_set_tx_power_mode(1);
	mutex_unlock(&mfd->dma->ov_mutex);

#endif
	EXIT_FUNC2();
}
static int mipi_renesas_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;

    ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

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

#ifndef SKY_LCD_SINGLE_WIRE_LB_CON
#ifdef CONFIG_F_SKYDISP_CHANGE_BL_TABLE_WHEN_OFFLINE_CHARGING
    if(is_offline_charging_mode == 1)
    {
        // Configure cabc_ctrl_con[1] to turn off CABC.
        cabc_ctrl_con[1] = 0; // CABC OFF
    }
#endif
#endif 
   
#if 0 
	if (!lcd_on_skip_during_bootup)
	{
		lcd_on_skip_during_bootup = true;
		renesas_state.disp_initialized = true;
		renesas_state.disp_on = true;

        goto out;
	}
#endif

	if (renesas_state.disp_initialized == false) {
#if defined(FEATURE_RENESAS_BL_ON_DEBUG)
#ifndef SKY_LCD_SINGLE_WIRE_LB_CON
		cabc_data_val[2] = bl_table[0];
#endif // SKY_LCD_SINGLE_WIRE_LB_CON
#endif 
		// vci enable 
		gpio_set_value(LCD_VCI_EN, GPIO_HIGH_VALUE);
		msleep(20);
		// reset low
		gpio_set_value_cansleep(gpio_lcd_mipi_reset, GPIO_LOW_VALUE); 
		msleep(10);
		// reset high
		gpio_set_value_cansleep(gpio_lcd_mipi_reset, GPIO_HIGH_VALUE);
		msleep(10);

		mutex_lock(&renesas_state.lcd_mutex);	
		mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_part1,
				ARRAY_SIZE(renesas_part1));
		//mutex_unlock(&renesas_state.lcd_mutex);

		switch (renesas_state.test_control_flag) {
		case 0:  //default
			mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_1Column,
					ARRAY_SIZE(renesas_1Column));
			break;
		case 1:
			mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_1HDot,
					ARRAY_SIZE(renesas_1HDot));
			PRINT("[kkcho]renesas_1HDot bl_level\n");
			break;
		case 2:
			mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_2HDot,
					ARRAY_SIZE(renesas_2HDot));
			PRINT("[kkcho]renesas_2HDot bl_level\n");
			break;
		case 3:
			mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_3HDot,
					ARRAY_SIZE(renesas_3HDot));
			PRINT("[kkcho]renesas_3HDot bl_level\n");
			break;
		case 4:
			mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_3Column,
					ARRAY_SIZE(renesas_3Column));	
			PRINT("[kkcho]renesas_3Column bl_level\n");
			break;
		default:
			mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_1Column,
					ARRAY_SIZE(renesas_1Column));
			break;
		}

		//mutex_lock(&renesas_state.lcd_mutex);	
		mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_part2,
				ARRAY_SIZE(renesas_part2));
		mutex_unlock(&renesas_state.lcd_mutex);

		renesas_state.disp_initialized = true;
#if defined(FEATURE_RENESAS_BL_ON_DEBUG)
        gpio_set_value_cansleep(gpio_lcd_bl_en, GPIO_HIGH_VALUE);
        gpio_set_value_cansleep(gpio_lcd_bl_ctl, GPIO_HIGH_VALUE);
#endif
	}

	mutex_lock(&renesas_state.lcd_mutex);
	mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_display_on_cmds,
		ARRAY_SIZE(renesas_display_on_cmds));

	mipi_dsi_cmds_tx(&renesas_tx_buf, renesas_sleep_out_cmds,
			ARRAY_SIZE(renesas_sleep_out_cmds));	
	mutex_unlock(&renesas_state.lcd_mutex);

//============================================
//	read test
//============================================
#ifdef SKY_LCD_MIPI_TEST_READ
	mipi_renesas_read_buf(pdev);
#endif 
//============================================
	renesas_state.disp_on = true;

//out:
#ifdef CONFIG_F_SKYDISP_SILENT_BOOT
    // In case of reset when silentboot mode(doing boot), only when is_silent_boot_mode_n_bl_off == 0, do it.
    // If always do it, display silentboot image eventhough reset occur when backlight off.
    if(is_silent_boot_mode_n_bl_off == 0)
        pantech_sys_reset_backlight_flag_set(true);	
#endif

	EXIT_FUNC2();
	return 0;
}
示例#25
0
static void mipi_sony_set_backlight(struct msm_fb_data_type *mfd)
{
	int bl_level;	
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
	struct dcs_cmd_req cmdreq;
#endif

#ifndef FEATURE_RENESAS_BL_CTRL_CHG
	if (prev_bl_level == mfd->bl_level)
		return;
#endif

#ifdef PANTECH_LCD_MIPI_CONTROL_CHANGE
	if (sony_state.disp_on == false){
		printk(KERN_INFO"[#######SKY_LCD#######] bl-set return during disp-off \n");
		return;
	}

	if (msmfb_early_suspend_get_state()){ 
	  	printk(KERN_INFO"[#######SKY_LCD#######] bl-set return during suspend \n");
		return;
	}
	
#endif

	ENTER_FUNC2();
	
	bl_level=mfd->bl_level;
	printk(KERN_INFO"[SKY_LCD]mipi_sony_set_backlight prev_bl_level = %d bl_level =%d \n",prev_bl_level,mfd->bl_level);
	
#ifdef CONFIG_F_SKYDISP_SILENT_BOOT
	if (is_silent_boot_mode_n_bl_off == 1) {
	    printk(KERN_ERR"DONOT set backlight because this time is silentboot mode.\n");
	    return;
	}
#endif
	mutex_lock(&sony_state.lcd_mutex);	

	wrdisbv[1] = mipi_sony_backlight_tbl[bl_level];

	if(!gpio_get_value_cansleep(gpio_lcd_bl_en))
		 gpio_set_value_cansleep(gpio_lcd_bl_en, GPIO_HIGH_VALUE);

	mipi_set_tx_power_mode(0);
	
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
	cmdreq.cmds = sony_display_cabc_bl_set_cmds;
	cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_cabc_bl_set_cmds);
	cmdreq.flags = CMD_REQ_COMMIT;
	cmdreq.rlen = 0;
	cmdreq.cb = NULL;

	mipi_dsi_cmdlist_put(&cmdreq);
#else
	mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_cabc_bl_set_cmds,
			ARRAY_SIZE(sony_display_cabc_bl_set_cmds));
#endif
	prev_bl_level = mfd->bl_level;	
	mipi_set_tx_power_mode(1);

	mutex_unlock(&sony_state.lcd_mutex);	

	EXIT_FUNC2();  
}
示例#26
0
//extern void LCD_gpio_set_vci_control(int on);
static int mipi_sony_lcd_on(struct platform_device *pdev)
{
	struct msm_fb_data_type *mfd;
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
	struct dcs_cmd_req cmdreq;
#endif
	ENTER_FUNC2();

	mfd = platform_get_drvdata(pdev);

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

#ifdef FEATURE_SKYDISP_BOOT_ANI_SKIP_BUG_FIX
	if (!lcd_on_skip_during_bootup)
	{
		lcd_on_skip_during_bootup = true;
		sony_state.disp_initialized = true;
		sony_state.disp_on = true;
		goto out;
	}
#endif

	mutex_lock(&sony_state.lcd_mutex);	

	if(!gpio_get_value_cansleep(gpio_lcd_bl_en))
		 gpio_set_value_cansleep(gpio_lcd_bl_en, GPIO_HIGH_VALUE);


	if (sony_state.disp_initialized == false) {
#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
		cmdreq.cmds = sony_display_init_cmds;
		cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_init_cmds);
		cmdreq.flags = CMD_REQ_COMMIT;
		cmdreq.rlen = 0;
		cmdreq.cb = NULL;
		mipi_dsi_cmdlist_put(&cmdreq);

#else
		mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_init_cmds,
				ARRAY_SIZE(sony_display_init_cmds));
#endif
		sony_state.disp_initialized = true;
	}

#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
		cmdreq.cmds = sony_display_on_cmds;
		cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_on_cmds);
		cmdreq.flags = CMD_REQ_COMMIT;
		cmdreq.rlen = 0;
		cmdreq.cb = NULL;
		mipi_dsi_cmdlist_put(&cmdreq);

#else
	mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_on_cmds,
			ARRAY_SIZE(sony_display_on_cmds));
#endif
	sony_state.disp_on = true;

#ifdef MIPI_CMDSTX_CHANGE_TO_CMDLISTPUT
	cmdreq.cmds = sony_display_cabc_on_cmds;
	cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_cabc_on_cmds);
	cmdreq.flags = CMD_REQ_COMMIT;
	cmdreq.rlen = 0;
	cmdreq.cb = NULL;
	mipi_dsi_cmdlist_put(&cmdreq);
#else	
	mipi_dsi_cmds_tx(&sony_tx_buf, sony_display_cabc_on_cmds,
				ARRAY_SIZE(sony_display_cabc_on_cmds));
#endif 

	mutex_unlock(&sony_state.lcd_mutex);	

#ifdef FEATURE_SKYDISP_BOOT_ANI_SKIP_BUG_FIX
	out:
#endif
#if defined(CONFIG_F_SKYDISP_SILENT_BOOT) && defined(CONFIG_PANTECH_RESET_REASON)
	// In case of reset when silentboot mode(doing boot), only when is_silent_boot_mode_n_bl_off == 0, do it.
	// If always do it, display silentboot image eventhough reset occur when backlight off.
	if(is_silent_boot_mode_n_bl_off == 0)
	    sky_sys_rst_set_silent_boot_backlight(1);
#endif

#ifdef BOOT_TOUCH_RESET // touch reset code
#ifdef PANTECH_LCD_REQUEST_GPIO_TOUCHRESET
	if (touch_init == false) {
		pr_info("[LIVED] %s touch_init=%d, gpio_init=%d\n", __func__, touch_init, gpio_init);
		if (gpio_init == false) {
			if (gpio_request(touch_reset_gpio, "TOUCH_RESET_GPIO") != 0) {
				pr_err("[LCD]%s: fail to request touch_reset_gpio=%d, touch_init=%d, gpio_init=%d\n",
						__func__, touch_reset_gpio, touch_init, gpio_init);
			}

			gpio_init = true;
		}
		gpio_direction_output(TOUCH_RST_GPIO, 1);
		gpio_set_value(TOUCH_RST_GPIO, GPIO_LOW_VALUE);
		msleep(50);
		gpio_set_value(TOUCH_RST_GPIO, GPIO_HIGH_VALUE);
		touch_init = true;
	}
#else
	if (touch_init == false) {
		gpio_direction_output(TOUCH_RST_GPIO, 1);
		gpio_set_value(TOUCH_RST_GPIO, GPIO_LOW_VALUE);
		msleep(50);
		gpio_set_value(TOUCH_RST_GPIO, GPIO_HIGH_VALUE);
		touch_init = true;
	}
#endif
#endif	
	EXIT_FUNC2();
	return 0;
}
示例#27
0
int mipi_sony_force_lcd_on(void)
{
	struct msm_fb_data_type *mfd;
	struct fb_info *info; 

	struct dcs_cmd_req cmdreq;

	ENTER_FUNC2();

	info = registered_fb[0];
	mfd = (struct msm_fb_data_type *)info->par;

	if (!mfd)
		return -ENODEV;
	if (mfd->key != MFD_KEY)
		return -EINVAL;
	
    	mutex_lock(&sony_state.lcd_mutex);	

	if (sony_state.disp_initialized == false) {
		cmdreq.cmds = sony_display_init_cmds;
		cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_init_cmds);
		cmdreq.flags = CMD_REQ_COMMIT;
		cmdreq.rlen = 0;
		cmdreq.cb = NULL;
		mipi_dsi_cmdlist_put(&cmdreq);
		sony_state.disp_initialized = true;
	}

	cmdreq.cmds = sony_display_on_cmds;
	cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_on_cmds);
	cmdreq.flags = CMD_REQ_COMMIT;
	cmdreq.rlen = 0;
	cmdreq.cb = NULL;
	mipi_dsi_cmdlist_put(&cmdreq);

	sony_state.disp_on = true;

	cmdreq.cmds = sony_display_cabc_on_cmds;
	cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_cabc_on_cmds);
	cmdreq.flags = CMD_REQ_COMMIT;
	cmdreq.rlen = 0;
	cmdreq.cb = NULL;
	mipi_dsi_cmdlist_put(&cmdreq);

	wrdisbv[1] = 0;
	cmdreq.cmds = sony_display_cabc_bl_set_cmds;
	cmdreq.cmds_cnt = ARRAY_SIZE(sony_display_cabc_bl_set_cmds);
	cmdreq.flags = CMD_REQ_COMMIT;
	cmdreq.rlen = 0;
	cmdreq.cb = NULL;
	mipi_dsi_cmdlist_put(&cmdreq);

	mutex_unlock(&sony_state.lcd_mutex);	

#if defined(CONFIG_F_SKYDISP_SILENT_BOOT) && defined(CONFIG_PANTECH_RESET_REASON)
    // In case of reset when silentboot mode(doing boot), only when is_silent_boot_mode_n_bl_off == 0, do it.
    // If always do it, display silentboot image eventhough reset occur when backlight off.
    if(is_silent_boot_mode_n_bl_off == 0)
        sky_sys_rst_set_silent_boot_backlight(1);
#endif


#ifdef BOOT_TOUCH_RESET
	//gpio_direction_output(TOUCH_RST_GPIO, 1);
	gpio_set_value(TOUCH_RST_GPIO, GPIO_LOW_VALUE);
	msleep(50);
	gpio_set_value(TOUCH_RST_GPIO, GPIO_HIGH_VALUE);

#endif
	
	EXIT_FUNC2();
	return 0;
}