Esempio n. 1
0
static void mdp4_dsi_video_wait4ov(int cndx)
{
	struct vsycn_ctrl *vctrl;

	if (cndx >= MAX_CONTROLLER) {
		pr_err("%s: out or range: cndx=%d\n", __func__, cndx);
		return;
	}

	vctrl = &vsync_ctrl_db[cndx];

	if (atomic_read(&vctrl->suspend) > 0)
		return;

	if (!wait_for_completion_timeout(
			&vctrl->ov_comp, msecs_to_jiffies(100))){
		pr_err("%s %d  TIMEOUT_\n", __func__, __LINE__);
#ifdef CONFIG_MACH_LGE
		/* LGE_CHANGE
		 * Workaround for BLT hang issue
		 * 2012-10-29, [email protected]
		 */
		mdp4_dsi_video_blt_stop(vctrl->mfd);
		mdp4_dsi_video_blt_start(vctrl->mfd);
#endif
	}
}
Esempio n. 2
0
static void mdp4_overlay_dsi_video_dma_busy_wait(struct msm_fb_data_type *mfd)
{
	unsigned long flag;
	int need_wait = 0;

	pr_debug("%s: start pid=%d\n", __func__, current->pid);

	spin_lock_irqsave(&mdp_spin_lock, flag);
	if (mfd->dma->busy == TRUE) {
		INIT_COMPLETION(mfd->dma->comp);
		need_wait++;
	}
	spin_unlock_irqrestore(&mdp_spin_lock, flag);

	if (need_wait) {
		/* wait until DMA finishes the current job */
		pr_debug("%s: pending pid=%d\n", __func__, current->pid);
#if defined (LGE_BLT_LOCKUP_WR)
		if(!wait_for_completion_timeout(&mfd->dma->comp, 1*HZ*0.5)) {
			printk("BLT mode change count  %u \n", blt_ent);
			mdp4_dsi_video_blt_stop(mfd);
			mdp4_dsi_video_blt_start(mfd);
		}
#else
		wait_for_completion(&mfd->dma->comp);
#endif
	}
	pr_debug("%s: done pid=%d\n", __func__, current->pid);
}