/** * LCD ON. * * Set LCD On via MIPI interface . * Set Backlight on. */ static int mipi_novatek_disp_on(struct platform_device *pdev) { struct msm_fb_data_type *mfd; struct mipi_panel_info *mipi; int disp_bl_cont_gpio; disp_bl_cont_gpio = (system_rev>1)?GPIO_LCD_BOOSTER_EN:GPIO_LCD_BOOSTER_EN_EMUL; pr_info("****** %s *******\n", __func__); mfd = platform_get_drvdata(pdev); if (unlikely(!mfd)) return -ENODEV; if (unlikely(mfd->key != MFD_KEY)) return -EINVAL; mipi = &mfd->panel_info.mipi; if (mipi->mode == DSI_VIDEO_MODE) mipi_novatek_disp_send_cmd(mfd, PANEL_ON, false); #if defined(CONFIG_FB_MDP4_ENHANCE) is_negativeMode_on(); #endif mipi_novatek_disp_send_cmd(mfd, PANEL_READY_TO_ON, false); pr_debug("%s: DISP_BL_CONT_GPIO High\n", __func__); gpio_set_value(disp_bl_cont_gpio , 1); is_lcd_on = LCD_STATUS_ON; #if !defined(CONFIG_HAS_EARLYSUSPEND) mipi_novatek_disp_send_cmd(mfd, PANEL_LATE_ON, false); #endif #if defined(CONFIG_MIPI_SAMSUNG_ESD_REFRESH) set_esd_enable(); #endif pr_info("%s:Display on completed\n", __func__); return 0; }
static int mipi_hx8389b_lcd_on(struct platform_device *pdev) { struct msm_fb_data_type *mfd; struct mipi_panel_info *mipi; mfd = platform_get_drvdata(pdev); if (!mfd) return -ENODEV; if (mfd->key != MFD_KEY) return -EINVAL; mipi = &mfd->panel_info.mipi; if (!mfd->cont_splash_done) { mfd->cont_splash_done = 1; return 0; } #if defined(CONFIG_FB_MDP4_ENHANCE) is_negativeMode_on(); #endif printk(KERN_ERR "[LCD] mipi_hx8389b_lcd_on\n"); if (mipi->mode == DSI_VIDEO_MODE) { mutex_lock(&dsi_tx_mutex); mipi_dsi_cmds_tx(&hx8389b_tx_buf, hx8389b_video_display_on_cmds, ARRAY_SIZE(hx8389b_video_display_on_cmds)); mutex_unlock(&dsi_tx_mutex); } if (cabc_switch) lcd_cabc_on(); else lcd_cabc_off(); #if defined(CONFIG_BACKLIGHT_IC_KTD3102) pr_info("%s: DISP_BL_CONT_GPIO High\n", __func__); gpio_set_value(DISP_BL_CONT_GPIO, 1); #endif flag_lcd_on_off = 1; return 0; }
static void mipi_samsung_disp_late_resume(struct early_suspend *h) { struct msm_fb_data_type *mfd; #if defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_CMD_QHD_PT) \ || defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_WVGA_PT) \ || defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_HD_PT) is_negativeMode_on(); #endif mfd = platform_get_drvdata(msd.msm_pdev); if (unlikely(!mfd)) { pr_info("%s NO PDEV.\n", __func__); return; } if (unlikely(mfd->key != MFD_KEY)) { pr_info("%s MFD_KEY is not matched.\n", __func__); return; } #if defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_CMD_QHD_PT) \ || defined(CONFIG_FB_MSM_MIPI_MAGNA_OLED_VIDEO_WVGA_PT) reset_gamma_level(); mfd->resume_state = MIPI_RESUME_STATE; mipi_samsung_disp_backlight(mfd); #endif #if defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_HD_PT) \ || defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_WVGA_PT) \ || defined(CONFIG_FB_MSM_MIPI_MAGNA_OLED_VIDEO_QHD_PT) \ || defined(CONFIG_FB_MSM_MIPI_MAGNA_OLED_VIDEO_WVGA_PT) mfd->resume_state = MIPI_RESUME_STATE; #endif #if !defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_HD_PT) && \ !defined(CONFIG_FB_MSM_MIPI_MAGNA_OLED_VIDEO_QHD_PT) && \ !defined(CONFIG_FB_MSM_MIPI_MAGNA_OLED_VIDEO_WVGA_PT) && \ !defined(CONFIG_FB_MSM_MIPI_SAMSUNG_OLED_VIDEO_WVGA_PT) mipi_samsung_disp_send_cmd(mfd, PANEL_LATE_ON, true); #endif pr_info("%s", __func__); }
static int mipi_samsung_disp_on(struct platform_device *pdev) { struct msm_fb_data_type *mfd; struct mipi_panel_info *mipi; static int boot_on; #ifdef __DEBUG__ static int test=0 ; #endif mfd = platform_get_drvdata(pdev); if (unlikely(!mfd)) return -ENODEV; if (unlikely(mfd->key != MFD_KEY)) return -EINVAL; mipi = &mfd->panel_info.mipi; #ifdef USE_READ_ID if (unlikely(!boot_on)) { msd.mpd->manufacture_id = mipi_samsung_manufacture_id(mfd); /*Display was initialized in bootloader,same settings are carried when splash is enabled*/ } #endif #if defined(CONFIG_FB_MDP4_ENHANCE) is_negativeMode_on(); #endif #ifdef __DEBUG__ if(test==0) if(0) dumpreg(1); test++; #endif mipi_samsung_disp_send_cmd(mfd, PANEL_READY_TO_ON, false); if(!boot_on) boot_on = 1; else msleep(100); #if defined(CONFIG_ESD_ERR_FG_RECOVERY) enable_irq(err_fg_gpio); #endif #ifndef CONFIG_MACH_CANE_EUR_3G pr_info("%s: DISP_BL_CONT_GPIO High\n", __func__); gpio_set_value(DISP_BL_CONT_GPIO, 1); #endif #if !defined(CONFIG_HAS_EARLYSUSPEND) mipi_samsung_disp_send_cmd(mfd, PANEL_LATE_ON, false); #endif #if defined(CONFIG_MACH_CANE_EUR_3G) mfd->resume_state = MIPI_RESUME_STATE; #endif return 0; }