Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee429cd2 authored by Sachin Bhayare's avatar Sachin Bhayare Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: fix crash after partial update enable



When partial update active and blit is not performed,
then at the time of first commit DMA ROI is invalid.
Because dma source is not initialized and prevents ROI
update during commit.

Fix issue by performing mdp3_ctrl_reset before DMA ROI is updated.

Change-Id: Ic22d52a5687821de6d6c15811f4766d0735289da
Signed-off-by: default avatarSachin Bhayare <sachin.bhayare@codeaurora.org>
parent f9116c90
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -1615,21 +1615,6 @@ static int mdp3_ctrl_display_commit_kickoff(struct msm_fb_data_type *mfd,
		return 0;
	}

	if (panel_info->partial_update_enabled &&
		is_roi_valid(mdp3_session->dma->source_config, cmt_data->l_roi)
		&& update_roi(mdp3_session->dma->roi, cmt_data->l_roi)) {
			mdp3_session->dma->roi.x = cmt_data->l_roi.x;
			mdp3_session->dma->roi.y = cmt_data->l_roi.y;
			mdp3_session->dma->roi.w = cmt_data->l_roi.w;
			mdp3_session->dma->roi.h = cmt_data->l_roi.h;
			mdp3_session->dma->update_src_cfg = true;
			pr_debug("%s: ROI: x=%d y=%d w=%d h=%d\n", __func__,
				mdp3_session->dma->roi.x,
				mdp3_session->dma->roi.y,
				mdp3_session->dma->roi.w,
				mdp3_session->dma->roi.h);
	}

	panel = mdp3_session->panel;
	mutex_lock(&mdp3_res->fs_idle_pc_lock);
	if (mdp3_session->in_splash_screen ||
@@ -1658,6 +1643,21 @@ static int mdp3_ctrl_display_commit_kickoff(struct msm_fb_data_type *mfd,
	if (mfd->panel.type == MIPI_CMD_PANEL || client == MDP3_CLIENT_SPI)
		is_panel_type_cmd = true;

	if (panel_info->partial_update_enabled &&
		is_roi_valid(mdp3_session->dma->source_config, cmt_data->l_roi)
		&& update_roi(mdp3_session->dma->roi, cmt_data->l_roi)) {
			mdp3_session->dma->roi.x = cmt_data->l_roi.x;
			mdp3_session->dma->roi.y = cmt_data->l_roi.y;
			mdp3_session->dma->roi.w = cmt_data->l_roi.w;
			mdp3_session->dma->roi.h = cmt_data->l_roi.h;
			mdp3_session->dma->update_src_cfg = true;
			pr_debug("%s: ROI: x=%d y=%d w=%d h=%d\n", __func__,
				mdp3_session->dma->roi.x,
				mdp3_session->dma->roi.y,
				mdp3_session->dma->roi.w,
				mdp3_session->dma->roi.h);
	}

	mdp3_ctrl_notify(mdp3_session, MDP_NOTIFY_FRAME_BEGIN);
	data = mdp3_bufq_pop(&mdp3_session->bufq_in);
	if (data) {