int mdp4_dtv_off(struct platform_device *pdev) { struct msm_fb_data_type *mfd; int ret = 0; mfd = (struct msm_fb_data_type *)platform_get_drvdata(pdev); if (dtv_pipe != NULL) { mdp4_dtv_stop(mfd); /* delay to make sure the last frame finishes */ msleep(20); mdp4_mixer_stage_down(dtv_pipe); mdp4_overlay_pipe_free(dtv_pipe); mdp4_iommu_unmap(dtv_pipe); dtv_pipe = NULL; } mdp4_overlay_panel_mode_unset(MDP4_MIXER1, MDP4_PANEL_DTV); ret = panel_next_off(pdev); mdp4_iommu_detach(); mdp_footswitch_ctrl(FALSE); dev_info(&pdev->dev, "mdp4_overlay_dtv: off"); return ret; }
int mdp_lcdc_off(struct platform_device *pdev) { int ret = 0; struct msm_fb_data_type *mfd; mfd = (struct msm_fb_data_type *)platform_get_drvdata(pdev); mutex_lock(&mfd->dma->ov_mutex); /* MDP cmd block enable */ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE); mdp4_mixer_pipe_cleanup(lcdc_pipe->mixer_num); MDP_OUTP(MDP_BASE + LCDC_BASE, 0); lcdc_enabled = 0; /* MDP cmd block disable */ mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE); mdp_pipe_ctrl(MDP_OVERLAY0_BLOCK, MDP_BLOCK_POWER_OFF, FALSE); mdp_histogram_ctrl_all(FALSE); ret = panel_next_off(pdev); mutex_unlock(&mfd->dma->ov_mutex); /* delay to make sure the last frame finishes */ msleep(20); /* dis-engage rgb0 from mixer0 */ if (lcdc_pipe) { mdp4_mixer_stage_down(lcdc_pipe); mdp4_iommu_unmap(lcdc_pipe); } #ifdef CONFIG_MSM_BUS_SCALING mdp_bus_scale_update_request(0); #endif mdp4_iommu_detach(); return ret; }