int msm_display_on()
{
	int ret = NO_ERROR;
	struct msm_panel_info *pinfo;

	if (!panel)
		return ERR_INVALID_ARGS;

	pinfo = &(panel->panel_info);

	switch (pinfo->type) {
	case LVDS_PANEL:
		dprintf(INFO, "Turn on LVDS PANEL.\n");
		ret = mdp_lcdc_on(panel);
		if (ret)
			goto msm_display_on_out;
		ret = lvds_on(panel);
		if (ret)
			goto msm_display_on_out;
		break;
	case MIPI_VIDEO_PANEL:
		dprintf(INFO, "Turn on MIPI_VIDEO_PANEL.\n");
		ret = mdp_dsi_video_on();
		if (ret)
			goto msm_display_on_out;
		ret = mipi_dsi_on();
		if (ret)
			goto msm_display_on_out;
		break;
	case MIPI_CMD_PANEL:
		dprintf(INFO, "Turn on MIPI_CMD_PANEL.\n");
		ret = mdp_dma_on();
		if (ret)
			goto msm_display_on_out;
		ret = mipi_cmd_trigger();
		if (ret)
			goto msm_display_on_out;
		break;
	case LCDC_PANEL:
		dprintf(INFO, "Turn on LCDC PANEL.\n");
		ret = mdp_lcdc_on(panel);
		if (ret)
			goto msm_display_on_out;
		break;
	default:
		return ERR_INVALID_ARGS;
	};

	if (pinfo->on)
		ret = pinfo->on();

msm_display_on_out:
	return ret;
}
Example #2
0
static ssize_t attr_orise_lcdon(struct device *dev,
	struct device_attribute *attr, char *buf)
{
	if(!flag_lcd_node_onoff)
		return 0;
	
	flag_lcd_node_onoff = false;
	prevent_suspend();
	mipi_dsi_on(g_mdp_dev);
	allow_suspend();
	
	return 0;
}
Example #3
0
static ssize_t attr_orise_reinit(struct device *dev,
	struct device_attribute *attr, char *buf)
{
	if(flag_lcd_off) {
		printk("%s: system is suspending, don't do this!\n",__func__);
		return 0;
	}
	
	prevent_suspend();
	flag_lcd_resume = true;
	mipi_dsi_off(g_mdp_dev);
	mdelay(100);
	mipi_dsi_on(g_mdp_dev);
	allow_suspend();
	return 0;
}
Example #4
0
/* return : 0=success, 1=fail
*/
int mipi_dsi_NULL(int on)
{
	int ret = 0;

	if (!cond_mipi_dsi_NULL())
		return 1;

	in_mipi_dsi_NULL = true;
	if (on) {
		pr_info( "%s : call mipi_dsi_on\n", __func__ );
		ret = mipi_dsi_on( mipi_dsi_pdev_switch );
	} else {
		pr_info( "%s : call mipi_dsi_off\n", __func__ );
		ret = mipi_dsi_off( mipi_dsi_pdev_switch );
	}
	in_mipi_dsi_NULL = false;

	return ret;
}