void mdp4_dtv_overlay(struct msm_fb_data_type *mfd)
{
	struct mdp4_overlay_pipe *pipe;
	if (!mfd->panel_power_on)
		return;
	if (!dtv_pipe) {
		pr_debug("%s: no mixer1 base layer pipe allocated!\n",
			 __func__);
		return;
	}
	mutex_lock(&mfd->dma->ov_mutex);
	if (dtv_pipe == NULL) {
		if (mdp4_overlay_dtv_set(mfd, NULL)) {
			pr_warn("%s: dtv_pipe == NULL\n", __func__);
			mutex_unlock(&mfd->dma->ov_mutex);
			return;
		}
	}

	pipe = dtv_pipe;
	if (pipe->pipe_type == OVERLAY_TYPE_RGB) {
		pipe->srcp0_addr = (uint32) mfd->ibuf.buf;
		mdp4_overlay_rgb_setup(pipe);
	}
	mdp4_mixer_stage_up(pipe);
	mdp4_overlay_reg_flush(pipe, 0);
	mdp4_overlay_dtv_start();
	mdp4_overlay_dtv_ov_done_push(mfd, pipe);
	mdp4_iommu_unmap(pipe);
	mutex_unlock(&mfd->dma->ov_mutex);
}
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);
}
Beispiel #3
0
int mdp4_overlay_dtv_unset(struct msm_fb_data_type *mfd,
			struct mdp4_overlay_pipe *pipe)
{
	int result = 0;

	pipe->flags &= ~MDP_OV_PLAY_NOWAIT;
	mdp4_overlay_dtv_ov_done_push(mfd, pipe);

	if (pipe->mixer_stage == MDP4_MIXER_STAGE_BASE &&
			pipe->pipe_type == OVERLAY_TYPE_RGB) {
		result = mdp4_dtv_stop(mfd);
		dtv_pipe = NULL;
	}
	return result;
}