void mdp4_lcdc_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 = lcdc_pipe;
	pipe->srcp0_addr = (uint32) buf;
	mdp4_overlay_rgb_setup(pipe);
	mdp4_overlay_vsync_push(mfd, pipe);
	mdp4_stat.kickoff_lcdc++;
	mdp4_overlay_resource_release();
	mutex_unlock(&mfd->dma->ov_mutex);
}
void mdp4_dsi_cmd_overlay(struct msm_fb_data_type *mfd)
{
	if(dsi_pipe && dsi_pipe->is_3d) {
		mdp4_overlay_handle_padding(mfd, true);
	}

	mutex_lock(&mfd->dma->ov_mutex);

	if (mfd && mfd->panel_power_on) {
		mdp4_dsi_cmd_dma_busy_wait(mfd, dsi_pipe);

	if (dsi_pipe && dsi_pipe->blt_addr)
		mdp4_dsi_blt_dmap_busy_wait(mfd);
	mdp4_overlay_update_dsi_cmd(mfd);

	if (mfd->esd_fixup) {
		mutex_unlock(&mfd->dma->ov_mutex);
		mfd->esd_fixup((uint32_t)mfd);
		mutex_lock(&mfd->dma->ov_mutex);
	}

	mdp4_dsi_cmd_kickoff_ui(mfd, dsi_pipe);
	mdp4_stat.kickoff_dsi++;

	/* signal if pan function is waiting for the update completion */
		if (mfd->pan_waiting) {
			mfd->pan_waiting = FALSE;
			complete(&mfd->pan_comp);
		}
	}
	/* mask to work-around to fix camera preview issue */
	mdp4_overlay_resource_release();
	mutex_unlock(&mfd->dma->ov_mutex);
}
void mdp4_dsi_cmd_overlay(struct msm_fb_data_type *mfd)
{
	mutex_lock(&mfd->dma->ov_mutex);

	if (mfd && mfd->panel_power_on) {
		mdp4_dsi_cmd_dma_busy_wait(mfd);


if (dsi_pipe && dsi_pipe->blt_addr)
		mdp4_dsi_blt_dmap_busy_wait(mfd);

		mdp4_overlay_update_dsi_cmd(mfd);

		mdp4_dsi_cmd_kickoff_ui(mfd, dsi_pipe);


		mdp4_stat.kickoff_dsi++;

	/* signal if pan function is waiting for the update completion */
		if (mfd->pan_waiting) {
			mfd->pan_waiting = FALSE;
			complete(&mfd->pan_comp);
		}
	}
	mdp4_overlay_resource_release();
	mutex_unlock(&mfd->dma->ov_mutex);
}
void mdp4_mddi_overlay(struct msm_fb_data_type *mfd)
{
	mutex_lock(&mfd->dma->ov_mutex);

	if (mfd && mfd->panel_power_on) {
		mdp4_mddi_dma_busy_wait(mfd);
		mdp4_overlay_update_lcd(mfd);

		if (mdp_hw_revision < MDP4_REVISION_V2_1) {
			/* dmas dmap switch */
			if (mdp4_overlay_mixer_play(mddi_pipe->mixer_num)
						== 0) {
				mdp4_dma_s_update_lcd(mfd, mddi_pipe);
				mdp4_mddi_dma_s_kickoff(mfd, mddi_pipe);
			} else
				mdp4_mddi_kickoff_ui(mfd, mddi_pipe);
		} else	/* no dams dmap switch  */
			mdp4_mddi_kickoff_ui(mfd, mddi_pipe);

		mdp4_stat.kickoff_mddi++;

	/* signal if pan function is waiting for the update completion */
		if (mfd->pan_waiting) {
			mfd->pan_waiting = FALSE;
			complete(&mfd->pan_comp);
		}
	}
	mdp4_overlay_resource_release();
	mutex_unlock(&mfd->dma->ov_mutex);
}
示例#5
0
void mdp4_mddi_overlay(struct msm_fb_data_type *mfd)
{
	mutex_lock(&mfd->dma->ov_mutex);

	if (mfd && mfd->panel_power_on) {
#ifndef CONFIG_SHLCDC_BOARD
		mdp4_mddi_dma_busy_wait(mfd);
#endif /*CONFIG_SHLCDC_BOARD*/
		mdp4_overlay_update_lcd(mfd);

		if (mdp_hw_revision < MDP4_REVISION_V2_1) {
			/* dmas dmap switch */
#ifdef CONFIG_SHLCDC_BOARD
		if ((mdp4_overlay_pipe_staged(mddi_pipe->mixer_num) <= 1) 
			&& ( mddi_pipe->src_h == mddi_pipe->dst_h )
			&& ( mddi_pipe->src_w == mddi_pipe->dst_w )) {
#else
			if (mdp4_overlay_mixer_play(mddi_pipe->mixer_num)
						== 0) {
#endif	/* CONFIG_SHLCDC_BOARD */
				mdp4_dma_s_update_lcd(mfd, mddi_pipe);
				mdp4_mddi_dma_s_kickoff(mfd, mddi_pipe);
			} else
				mdp4_mddi_kickoff_ui(mfd, mddi_pipe);
		} else	/* no dams dmap switch  */
			mdp4_mddi_kickoff_ui(mfd, mddi_pipe);

		mdp4_stat.kickoff_mddi++;

	/* signal if pan function is waiting for the update completion */
		if (mfd->pan_waiting) {
			mfd->pan_waiting = FALSE;
			complete(&mfd->pan_comp);
		}
	}
	mdp4_overlay_resource_release();
	mutex_unlock(&mfd->dma->ov_mutex);

}

int mdp4_mddi_overlay_cursor(struct fb_info *info, struct fb_cursor *cursor)
{
	struct msm_fb_data_type *mfd = info->par;
	mutex_lock(&mfd->dma->ov_mutex);
	if (mfd && mfd->panel_power_on) {
#ifndef CONFIG_SHLCDC_BOARD
		mdp4_mddi_dma_busy_wait(mfd);
#endif	/* CONFIG_SHLCDC_BOARD */
		mdp_hw_cursor_update(info, cursor);
	}
	mutex_unlock(&mfd->dma->ov_mutex);
	return 0;
}
示例#6
0
void mdp4_dsi_cmd_overlay(struct msm_fb_data_type *mfd)
{
    if (atomic_read(&ov_unset)) {
        PR_DISP_INFO("%s(%d)found ov unset is called, skip frame update\n", __func__, __LINE__);
        return;
    }
    if (dsi_pipe && dsi_pipe->is_3d) {
        atomic_set(&ov_play, 1);
        if (mfd && mfd->enable_uipadding == PADDING_ENABLE)
            mdp4_overlay_handle_padding(mfd, true);
    }

    if (mfd->esd_fixup)
        mfd->esd_fixup((uint32_t)mfd);

    mutex_lock(&mfd->dma->ov_mutex);

    if (mfd && mfd->panel_power_on) {
        mdp4_dsi_cmd_dma_busy_wait(mfd, dsi_pipe);

        if (dsi_pipe && dsi_pipe->blt_addr)
            mdp4_dsi_blt_dmap_busy_wait(mfd);
        mdp4_overlay_update_dsi_cmd(mfd);


        mdp4_dsi_cmd_kickoff_ui(mfd, dsi_pipe);
        mdp4_stat.kickoff_dsi++;

        /* signal if pan function is waiting for the update completion */
        if (mfd->pan_waiting) {
            mfd->pan_waiting = FALSE;
            complete(&mfd->pan_comp);
        }
    }
    /* mask to work-around to fix camera preview issue */
    mdp4_overlay_resource_release();
    mutex_unlock(&mfd->dma->ov_mutex);

    if (dsi_pipe && dsi_pipe->is_3d) {
        atomic_set(&ov_play, 0);
        if (atomic_read(&ov_unset)) {
            PR_DISP_INFO("%s(%d) ov play finished completion ov_comp\n", __func__, __LINE__);
            complete(&ov_comp);
        }
    }
}
void mdp4_atv_overlay(struct msm_fb_data_type *mfd)
{
	struct fb_info *fbi = mfd->fbi;
	uint8 *buf;
	int bpp;
	unsigned long flag;
	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 = atv_pipe;
	pipe->srcp0_addr = (uint32) buf;
	mdp4_overlay_rgb_setup(pipe);
	mdp4_overlay_reg_flush(pipe, 1); /* rgb2 and mixer1 */

	printk(KERN_INFO "mdp4_atv_overlay: pipe=%x ndx=%d\n",
					(int)pipe, pipe->pipe_ndx);

	/* enable irq */
	spin_lock_irqsave(&mdp_spin_lock, flag);
	mdp_enable_irq(MDP_OVERLAY1_TERM);
	INIT_COMPLETION(atv_pipe->comp);
	mfd->dma->waiting = TRUE;
	outp32(MDP_INTR_CLEAR, INTR_OVERLAY1_DONE);
	mdp_intr_mask |= INTR_OVERLAY1_DONE;
	outp32(MDP_INTR_ENABLE, mdp_intr_mask);
	spin_unlock_irqrestore(&mdp_spin_lock, flag);
	wait_for_completion_killable(&atv_pipe->comp);
	mdp_disable_irq(MDP_OVERLAY1_TERM);

	mdp4_stat.kickoff_atv++;
	mdp4_overlay_resource_release();
	mutex_unlock(&mfd->dma->ov_mutex);
}
示例#8
0
void mdp4_mddi_overlay(struct msm_fb_data_type *mfd)
{
	mutex_lock(&mfd->dma->ov_mutex);

	if (mfd && mfd->panel_power_on) {
		mdp4_mddi_dma_busy_wait(mfd);
		mdp4_overlay_update_lcd(mfd);

		if (mdp_hw_revision < MDP4_REVISION_V2_1) {
			/* dmas dmap switch */
			if (mdp4_overlay_mixer_play(mddi_pipe->mixer_num)
						== 0) {
				mdp4_dma_s_update_lcd(mfd, mddi_pipe);
				mdp4_mddi_dma_s_kickoff(mfd, mddi_pipe);
			} else
				mdp4_mddi_kickoff_ui(mfd, mddi_pipe);
		} else	/* no dams dmap switch  */
			mdp4_mddi_kickoff_ui(mfd, mddi_pipe);

		mdp4_stat.kickoff_mddi++;

	/* signal if pan function is waiting for the update completion */
		if (mfd->pan_waiting) {
			mfd->pan_waiting = FALSE;
			complete(&mfd->pan_comp);
		}
	}
	mdp4_overlay_resource_release();
	mutex_unlock(&mfd->dma->ov_mutex);
    /*< DTS2011101103751 wangjiongfeng 20111011 begin */
    #ifdef CONFIG_HUAWEI_KERNEL
    /* avoid to the ui thread occupy the ov_mutex continuously.If overlay_is_set is true,then schedule */
    if (overlay_is_set)
	{	
		schedule();
	}
    #endif
    /* DTS2011101103751 wangjiongfeng 20111011 end >*/
}