static int mdp4_backlight_commit_level(struct vsycn_ctrl *vctrl)
{
	int level;
	int cnt = 0;

	if (vctrl->blight.tot) { /* has new backlight */
		if (mipi_dsi_ctrl_lock(0)) {
			level = mdp4_backlight_get_level(vctrl);
			mipi_dsi_cmd_backlight_tx(level);
			cnt++;
		}
	}

	return cnt;
}
Exemple #2
0
int mdp4_dsi_cmd_off(struct platform_device *pdev)
{
	int ret = 0;
	int cndx = 0;
	struct msm_fb_data_type *mfd;
	struct vsycn_ctrl *vctrl;
	struct mdp4_overlay_pipe *pipe;

	pr_info("%s+:\n", __func__);

	mfd = (struct msm_fb_data_type *)platform_get_drvdata(pdev);

	vctrl = &vsync_ctrl_db[cndx];
	pipe = vctrl->base_pipe;
	if (pipe == NULL) {
		pr_err("%s: NO base pipe\n", __func__);
		return ret;
	}

	atomic_set(&vctrl->suspend, 1);

	mipi_dsi_cmd_backlight_tx(150);

	mdp4_mixer_stage_down(pipe);
	mdp4_overlay_pipe_free(pipe);
	vctrl->base_pipe = NULL;

	vctrl->fake_vsync = 1;

	vsync_irq_disable(INTR_PRIMARY_RDPTR, MDP_PRIM_RDPTR_TERM);

	pr_info("%s-:\n", __func__);

	/*
	 * footswitch off
	 * this will casue all mdp register
	 * to be reset to default
	 * after footswitch on later
	 */

	return ret;
}