void disp_ext_refresh_seq( struct msm_fb_data_type *mfd, unsigned int cmd ) { struct msm_fb_data_type *mipi_novatek_wxga_mfd; DISP_LOCAL_LOG_EMERG("DISP disp_ext_refresh_seq S\n"); #ifndef CONFIG_FB_MSM_MIPI_DSI_RENESAS_CM mipi_novatek_wxga_mfd = mipi_novatek_wxga_get_mfd(); #else mipi_novatek_wxga_mfd = mipi_renesas_cm_get_mfd(); #endif if( mipi_novatek_wxga_mfd == NULL ) { pr_debug("%s:bot found device\n", __func__); return; } if( disp_ext_reflesh_get_start() != 1 ) { DISP_LOCAL_LOG_EMERG("%s:refresh not start\n", __func__); return; } #ifndef CONFIG_FB_MSM_MIPI_DSI_RENESAS_CM mdp4_dsi_cmd_dma_busy_wait(mipi_novatek_wxga_mfd); mdp4_dsi_blt_dmap_busy_wait(mipi_novatek_wxga_mfd); mipi_dsi_mdp_busy_wait(mipi_novatek_wxga_mfd); #else mdp4_dsi_cmd_busy(); mipi_dsi_mdp_busy_wait(); #endif if( cmd == MIPI_REFREH_SEQ_ALL ) { mdp4_dsi_clock_mod(); disp_ext_refresh_te_monitor_timer_release(); disp_ext_reflesh_set_start(0); #ifndef CONFIG_FB_MSM_MIPI_DSI_RENESAS_CM mipi_set_tx_power_mode(1); mipi_novatek_wxga_initial_sequence( mipi_novatek_wxga_mfd ); mipi_set_tx_power_mode(0); mipi_novatek_wxga_display_direction_sequence( mipi_novatek_wxga_mfd ); mdp4_dsi_refresh_screen_at_once( mfd ); mipi_novatek_wxga_display_on_sequence( mipi_novatek_wxga_mfd ); #else mipi_renesas_cm_refresh_exec( mipi_novatek_wxga_mfd ); #endif disp_ext_reflesh_set_sw(0); disp_ext_reflesh_set_start(1); disp_ext_reflesh_before_te_run_count_init(); disp_ext_refresh_te_monitor_timer_set(); } DISP_LOCAL_LOG_EMERG("DISP disp_ext_refresh_seq E\n"); }
int disp_ext_blc_mode_select( uint8_t mode ) { struct msm_fb_data_type *mfd; DISP_LOCAL_LOG_EMERG("DISP mipi_novatek_wxga_cabc_mode_select mode=%d S\n",mode); #ifdef CONFIG_DISP_EXT_UTIL disp_ext_util_mipitx_lock(); disp_ext_util_disp_local_lock(); #endif /* CONFIG_DISP_EXT_UTIL */ if( disp_ext_util_get_disp_state() != LOCAL_DISPLAY_ON ) { #ifdef CONFIG_DISP_EXT_UTIL disp_ext_util_disp_local_unlock(); disp_ext_util_mipitx_unlock(); #endif /* CONFIG_DISP_EXT_UTIL */ pr_err("%s:panel off\n", __func__); return -1; } if( mode > 0x01 ) { #ifdef CONFIG_DISP_EXT_UTIL disp_ext_util_disp_local_unlock(); disp_ext_util_mipitx_unlock(); #endif /* CONFIG_DISP_EXT_UTIL */ pr_err("%s:parameter err\n", __func__); return -1; } if( select_mode_ctrl == mode ) { #ifdef CONFIG_DISP_EXT_UTIL disp_ext_util_disp_local_unlock(); disp_ext_util_mipitx_unlock(); #endif /* CONFIG_DISP_EXT_UTIL */ DISP_LOCAL_LOG_EMERG("%s:Request a double. state=%d,req=%d\n",__func__,select_mode_ctrl,mode); return 0; } #ifndef CONFIG_FB_MSM_MIPI_DSI_RENESAS_CM mfd = mipi_novatek_wxga_get_mfd(); #else mfd = mipi_renesas_cm_get_mfd(); #endif if( mfd == NULL ) { #ifdef CONFIG_DISP_EXT_UTIL disp_ext_util_disp_local_unlock(); disp_ext_util_mipitx_unlock(); #endif /* CONFIG_DISP_EXT_UTIL */ pr_err("%s:mfd == NULL\n", __func__); return -1; } select_mode_ctrl=mode; msm_fb_pan_lock(); msm_fb_ioctl_ppp_lock(); msm_fb_ioctl_lut_lock(); #ifndef CONFIG_FB_MSM_MIPI_DSI_RENESAS_CM mdp4_dsi_cmd_dma_busy_wait(mfd); mdp4_dsi_blt_dmap_busy_wait(mfd); mipi_dsi_mdp_busy_wait(mfd); #else mdp4_dsi_cmd_busy(); mipi_dsi_mdp_busy_wait(); #endif if( mode == 0 ) { #ifndef CONFIG_FB_MSM_MIPI_DSI_RENESAS_CM cabc_change[1] = 0; #else cabc_mode_select_cmds = renesas_cm_blc_off_cmds; cabc_mode_select_cmds_size = ARRAY_SIZE(renesas_cm_blc_off_cmds); #endif } else { #ifndef CONFIG_FB_MSM_MIPI_DSI_RENESAS_CM cabc_change[1] = select_mode; #else cabc_mode_select_cmds = renesas_cm_blc_on_cmds; cabc_mode_select_cmds_size = ARRAY_SIZE(renesas_cm_blc_on_cmds); #endif } #ifndef CONFIG_FB_MSM_MIPI_DSI_RENESAS_CM pr_debug("%s:cabc_change[%d,%d]\n", __func__,cabc_change[0],cabc_change[1]); DISP_LOCAL_LOG_EMERG("%s:cabc_change[%d,%d]\n", __func__,cabc_change[0],cabc_change[1]); #endif #ifndef CONFIG_FB_MSM_MIPI_DSI_RENESAS_CM mipi_dsi_cmds_tx(mfd, &disp_ext_blc_tx_buf, cabc_mode_select_cmds, ARRAY_SIZE(cabc_mode_select_cmds)); #else mipi_set_tx_power_mode(0); mipi_dsi_clk_cfg(1); mipi_dsi_cmds_tx(&disp_ext_blc_tx_buf, cabc_mode_select_cmds, cabc_mode_select_cmds_size); mipi_dsi_clk_cfg(0); #endif udelay(1); msm_fb_ioctl_lut_unlock(); msm_fb_ioctl_ppp_unlock(); msm_fb_pan_unlock(); #ifdef CONFIG_DISP_EXT_UTIL disp_ext_util_disp_local_unlock(); disp_ext_util_mipitx_unlock(); #endif /* CONFIG_DISP_EXT_UTIL */ pr_debug("%s:cabc select\n", __func__); DISP_LOCAL_LOG_EMERG("DISP mipi_novatek_wxga_cabc_mode_select E\n"); return 0; }