void mdp4_dtv_overlay(struct msm_fb_data_type *mfd) { struct fb_info *fbi = mfd->fbi; uint8 *buf; int bpp; struct mdp4_overlay_pipe *pipe; if (!mfd->panel_power_on) return; /* no need to power on cmd block since it's lcdc mode */ bpp = fbi->var.bits_per_pixel / 8; buf = (uint8 *) fbi->fix.smem_start; buf += fbi->var.xoffset * bpp + fbi->var.yoffset * fbi->fix.line_length; mutex_lock(&mfd->dma->ov_mutex); pipe = dtv_pipe; pipe->srcp0_addr = (uint32) buf; mdp4_overlay_rgb_setup(pipe); if (mfd->ov_start) { mdp4_overlay_dtv_wait4_ov_done(mfd, pipe); mfd->ov_end = true; } mdp4_overlay_dtv_ov_done_push(mfd, pipe); mdp4_stat.kickoff_dtv++; mutex_unlock(&mfd->dma->ov_mutex); }
void mdp4_overlay_dtv_wait_for_ov(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe) { if (mfd->ov_end) { mfd->ov_end = false; return; } mdp4_overlay_dtv_wait4_ov_done(mfd, pipe); }
void mdp4_overlay_dtv_ov_done_push(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe) { mdp4_overlay_reg_flush(pipe, 1); if (pipe->flags & MDP_OV_PLAY_NOWAIT) return; mdp4_overlay_dtv_wait4_ov_done(mfd); }
void mdp4_overlay_dtv_ov_done_push(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe) { mdp4_overlay_dtv_ov_start(mfd); if (pipe->flags & MDP_OV_PLAY_NOWAIT) return; mdp4_overlay_dtv_wait4_ov_done(mfd, pipe); /* change mdp clk while mdp is idle` */ mdp4_set_perf_level(); }
void mdp4_overlay_dtv_wait_for_ov(struct msm_fb_data_type *mfd, struct mdp4_overlay_pipe *pipe) { mdp4_overlay_dtv_wait4_ov_done(mfd, pipe); mdp4_set_perf_level(); }