示例#1
0
static void mdfld_dsi_dbi_commit(struct drm_encoder *encoder)
{
	struct mdfld_dsi_encoder *dsi_encoder = MDFLD_DSI_ENCODER(encoder);
	struct mdfld_dsi_dbi_output *dbi_output =
					MDFLD_DSI_DBI_OUTPUT(dsi_encoder);
	struct drm_device *dev = dbi_output->dev;
	struct drm_psb_private *dev_priv = dev->dev_private;
	struct psb_drm_dpu_rect rect;

	mdfld_dsi_dbi_set_power(encoder, true);
	dbi_output->mode_flags &= ~MODE_SETTING_IN_ENCODER;

	rect.x = rect.y = 0;
	rect.width = 864;
	rect.height = 480;

	if (dbi_output->channel_num == 1) {
		dev_priv->dsr_fb_update |= MDFLD_DSR_2D_3D_2;
		/*if dpu enabled report a fullscreen damage*/
		mdfld_dbi_dpu_report_damage(dev, MDFLD_PLANEC, &rect);
	} else {
		dev_priv->dsr_fb_update |= MDFLD_DSR_2D_3D_0;
		mdfld_dbi_dpu_report_damage(dev, MDFLD_PLANEA, &rect);
	}
	dbi_output->mode_flags |= MODE_SETTING_ENCODER_DONE;
}
示例#2
0
int mdfld_dsi_dbi_dsr_off(struct drm_device * dev, struct psb_drm_dpu_rect * rect)
{
	struct drm_psb_private * dev_priv = dev->dev_private;
	struct mdfld_dbi_dpu_info * dpu_info = dev_priv->dbi_dpu_info;
	
	mdfld_dbi_dpu_report_damage(dev, MDFLD_PLANEA, rect);
	
	/*if dual display mode*/
	if(dpu_info->dbi_output_num == 2)
		mdfld_dbi_dpu_report_damage(dev, MDFLD_PLANEC, rect);
	
	/*force dsi to exit DSR mode*/
	mdfld_dpu_exit_dsr(dev);
	
	return 0;
}
示例#3
0
static void pyr_dsi_dbi_commit(struct drm_encoder * encoder) 
{
	struct mdfld_dsi_encoder * dsi_encoder = MDFLD_DSI_ENCODER(encoder);
	struct mdfld_dsi_dbi_output * dbi_output = MDFLD_DSI_DBI_OUTPUT(dsi_encoder);
	struct drm_device * dev = dbi_output->dev;
	struct drm_psb_private * dev_priv = dev->dev_private;
	
/*DSI DPU was still on debugging, will remove this option later*/
#ifdef CONFIG_MDFLD_DSI_DPU		
	struct psb_drm_dpu_rect rect;
#endif
	
	PSB_DEBUG_ENTRY("\n");

	pyr_dsi_dbi_set_power(encoder, true);
	
	dbi_output->mode_flags &= ~MODE_SETTING_IN_ENCODER;

#ifdef CONFIG_MDFLD_DSI_DPU
	rect.x = rect.y = 0;
	rect.width = 864;
	rect.height = 480;
#endif	
	
	if(dbi_output->channel_num == 1) {
		dev_priv->dsr_fb_update |= MDFLD_DSR_2D_3D_2;
#ifdef CONFIG_MDFLD_DSI_DPU
		/*if dpu enabled report a fullscreen damage*/
		mdfld_dbi_dpu_report_damage(dev, MDFLD_PLANEC, &rect);
#endif
	} else {
		dev_priv->dsr_fb_update |= MDFLD_DSR_2D_3D_0;
		
#ifdef CONFIG_MDFLD_DSI_DPU		
		mdfld_dbi_dpu_report_damage(dev, MDFLD_PLANEA, &rect);
		/*start dpu timer*/
		if (dev_priv->platform_rev_id == MDFLD_PNW_A0)
			mdfld_dbi_dpu_timer_start(dev_priv->dbi_dpu_info);
#else 
		if (dev_priv->platform_rev_id == MDFLD_PNW_A0)
			mdfld_dbi_dsr_timer_start(dev_priv->dbi_dsr_info);
#endif
	}

	dbi_output->mode_flags |= MODE_SETTING_ENCODER_DONE;
}
示例#4
0
int mdfld_dbi_dpu_report_fullscreen_damage(struct drm_device * dev)
{
	struct drm_psb_private * dev_priv;
	struct mdfld_dbi_dpu_info * dpu_info;
	struct mdfld_dsi_config  * dsi_config;
	struct psb_drm_dpu_rect rect;
	int i;

	if(!dev) {
		DRM_ERROR("Invalid parameter\n");
		return -EINVAL;
	}

	dev_priv = dev->dev_private;
	dpu_info = dev_priv ? dev_priv->dbi_dpu_info : NULL;

	if(!dpu_info) {
		DRM_ERROR("No dpu info found\n");
		return -EINVAL;
	}

	for(i=0; i<dpu_info->dbi_output_num; i++) {
		dsi_config = dev_priv->dsi_configs[i];
		if(dsi_config) {
			rect.x = rect.y = 0;
			rect.width = dsi_config->fixed_mode->hdisplay;
			rect.height = dsi_config->fixed_mode->vdisplay;
			mdfld_dbi_dpu_report_damage(dev,
						    i ? (MDFLD_PLANEC) : (MDFLD_PLANEA),
						    &rect);

		}
	}

	/*exit DSR state*/
	mdfld_dpu_exit_dsr(dev);

	return 0;
}