void mdp_dma_s_update(struct msm_fb_data_type *mfd) { down(&mfd->dma->mutex); if ((mfd) && (!mfd->dma->busy) && (mfd->panel_power_on)) { down(&mfd->sem); mdp_enable_irq(MDP_DMA_S_TERM); if (mfd->panel_info.type == MDDI_PANEL) mdp_enable_irq(MDP_DMA_S_TERM); else mdp_enable_irq(MDP_DMA_E_TERM); mfd->dma->busy = TRUE; INIT_COMPLETION(mfd->dma->comp); mfd->ibuf_flushed = TRUE; mdp_dma_s_update_lcd(mfd); up(&mfd->sem); /* wait until DMA finishes the current job */ wait_for_completion_killable(&mfd->dma->comp); if (mfd->panel_info.type == MDDI_PANEL) mdp_disable_irq(MDP_DMA_S_TERM); else mdp_disable_irq(MDP_DMA_E_TERM); /* signal if pan function is waiting for the update completion */ if (mfd->pan_waiting) { mfd->pan_waiting = FALSE; complete(&mfd->pan_comp); } } up(&mfd->dma->mutex); }
void mdp_dma_s_update(struct msm_fb_data_type *mfd) { if(mfd == NULL){ printk(KERN_ERR "error: %s: the input is null\n",__func__); return; } down(&mfd->dma->mutex); if ((mfd) && (!mfd->dma->busy) && (mfd->panel_power_on)) { down(&mfd->sem); mdp_enable_irq(MDP_DMA_S_TERM); if (mfd->panel_info.type == MDDI_PANEL) mdp_enable_irq(MDP_DMA_S_TERM); else mdp_enable_irq(MDP_DMA_E_TERM); mfd->dma->busy = TRUE; INIT_COMPLETION(mfd->dma->comp); mfd->ibuf_flushed = TRUE; mdp_dma_s_update_lcd(mfd); up(&mfd->sem); wait_for_completion_killable(&mfd->dma->comp); if (mfd->panel_info.type == MDDI_PANEL) mdp_disable_irq(MDP_DMA_S_TERM); else mdp_disable_irq(MDP_DMA_E_TERM); if (mfd->pan_waiting) { mfd->pan_waiting = FALSE; complete(&mfd->pan_comp); } } up(&mfd->dma->mutex); }
void mdp_dma_s_update(struct msm_fb_data_type *mfd) { down(&mfd->dma->mutex); if ((mfd) && (!mfd->dma->busy) && (mfd->panel_power_on)) { mfd->dma->busy = TRUE; INIT_COMPLETION(mfd->dma->comp); down(&mfd->sem); mfd->ibuf_flushed = TRUE; mdp_dma_s_update_lcd(mfd); up(&mfd->sem); // wait until DMA finishes the current job wait_for_completion_interruptible(&mfd->dma->comp); // signal if pan function is waiting for the update completion if (mfd->pan_waiting) { mfd->pan_waiting = FALSE; complete(&mfd->pan_comp); } } up(&mfd->dma->mutex); }