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

Commit 89cc3b1c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: avoid pipe_in_use check in recovery path"

parents b778ad58 8e51935b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1213,7 +1213,7 @@ int mdss_mdp_wb_addr_setup(struct mdss_data_type *mdata,
	u32 num_wb, u32 num_intf_wb);
	u32 num_wb, u32 num_intf_wb);


void mdss_mdp_pipe_clk_force_off(struct mdss_mdp_pipe *pipe);
void mdss_mdp_pipe_clk_force_off(struct mdss_mdp_pipe *pipe);
int mdss_mdp_pipe_fetch_halt(struct mdss_mdp_pipe *pipe);
int mdss_mdp_pipe_fetch_halt(struct mdss_mdp_pipe *pipe, bool is_recovery);
int mdss_mdp_pipe_panic_signal_ctrl(struct mdss_mdp_pipe *pipe, bool enable);
int mdss_mdp_pipe_panic_signal_ctrl(struct mdss_mdp_pipe *pipe, bool enable);
void mdss_mdp_bwcpanic_ctrl(struct mdss_data_type *mdata, bool enable);
void mdss_mdp_bwcpanic_ctrl(struct mdss_data_type *mdata, bool enable);
int mdss_mdp_pipe_destroy(struct mdss_mdp_pipe *pipe);
int mdss_mdp_pipe_destroy(struct mdss_mdp_pipe *pipe);
@@ -1288,7 +1288,7 @@ void mdss_mdp_pipe_calc_pixel_extn(struct mdss_mdp_pipe *pipe);
int mdss_mdp_wb_set_secure(struct msm_fb_data_type *mfd, int enable);
int mdss_mdp_wb_set_secure(struct msm_fb_data_type *mfd, int enable);
int mdss_mdp_wb_get_secure(struct msm_fb_data_type *mfd, uint8_t *enable);
int mdss_mdp_wb_get_secure(struct msm_fb_data_type *mfd, uint8_t *enable);
void mdss_mdp_ctl_restore(bool locked);
void mdss_mdp_ctl_restore(bool locked);
int  mdss_mdp_ctl_reset(struct mdss_mdp_ctl *ctl);
int  mdss_mdp_ctl_reset(struct mdss_mdp_ctl *ctl, bool is_recovery);
int mdss_mdp_wait_for_xin_halt(u32 xin_id, bool is_vbif_nrt);
int mdss_mdp_wait_for_xin_halt(u32 xin_id, bool is_vbif_nrt);
void mdss_mdp_set_ot_limit(struct mdss_mdp_set_ot_params *params);
void mdss_mdp_set_ot_limit(struct mdss_mdp_set_ot_params *params);
int mdss_mdp_cmd_set_autorefresh_mode(struct mdss_mdp_ctl *ctl,
int mdss_mdp_cmd_set_autorefresh_mode(struct mdss_mdp_ctl *ctl,
+7 −7
Original line number Original line Diff line number Diff line
@@ -3407,7 +3407,7 @@ end:
 * This function called during control path reset and will halt
 * This function called during control path reset and will halt
 * all the pipes staged on the mixer.
 * all the pipes staged on the mixer.
 */
 */
static void mdss_mdp_pipe_reset(struct mdss_mdp_mixer *mixer)
static void mdss_mdp_pipe_reset(struct mdss_mdp_mixer *mixer, bool is_recovery)
{
{
	unsigned long pipe_map = mixer->pipe_mapped;
	unsigned long pipe_map = mixer->pipe_mapped;
	u32 bit = 0;
	u32 bit = 0;
@@ -3420,7 +3420,7 @@ static void mdss_mdp_pipe_reset(struct mdss_mdp_mixer *mixer)


		pipe = mdss_mdp_pipe_search(mdata, 1 << bit);
		pipe = mdss_mdp_pipe_search(mdata, 1 << bit);
		if (pipe) {
		if (pipe) {
			mdss_mdp_pipe_fetch_halt(pipe);
			mdss_mdp_pipe_fetch_halt(pipe, is_recovery);
			if (sw_rst_avail)
			if (sw_rst_avail)
				mdss_mdp_pipe_clk_force_off(pipe);
				mdss_mdp_pipe_clk_force_off(pipe);
		}
		}
@@ -3435,7 +3435,7 @@ static void mdss_mdp_pipe_reset(struct mdss_mdp_mixer *mixer)
 *
 *
 * Note: called within atomic context.
 * Note: called within atomic context.
 */
 */
int mdss_mdp_ctl_reset(struct mdss_mdp_ctl *ctl)
int mdss_mdp_ctl_reset(struct mdss_mdp_ctl *ctl, bool is_recovery)
{
{
	u32 status = 1;
	u32 status = 1;
	int cnt = 20;
	int cnt = 20;
@@ -3456,10 +3456,10 @@ int mdss_mdp_ctl_reset(struct mdss_mdp_ctl *ctl)
	} while (cnt > 0 && status);
	} while (cnt > 0 && status);


	if (mixer) {
	if (mixer) {
		mdss_mdp_pipe_reset(mixer);
		mdss_mdp_pipe_reset(mixer, is_recovery);


		if (ctl->mfd->split_mode == MDP_DUAL_LM_SINGLE_DISPLAY)
		if (ctl->mfd->split_mode == MDP_DUAL_LM_SINGLE_DISPLAY)
			mdss_mdp_pipe_reset(ctl->mixer_right);
			mdss_mdp_pipe_reset(ctl->mixer_right, is_recovery);
	}
	}


	if (!cnt)
	if (!cnt)
@@ -4352,9 +4352,9 @@ int mdss_mdp_display_wait4pingpong(struct mdss_mdp_ctl *ctl, bool use_lock)
	}
	}


	if (recovery_needed) {
	if (recovery_needed) {
		mdss_mdp_ctl_reset(ctl);
		mdss_mdp_ctl_reset(ctl, true);
		if (sctl)
		if (sctl)
			mdss_mdp_ctl_reset(sctl);
			mdss_mdp_ctl_reset(sctl, true);


		mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_DSI_RESET_WRITE_PTR,
		mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_DSI_RESET_WRITE_PTR,
			NULL, CTL_INTF_EVENT_FLAG_DEFAULT);
			NULL, CTL_INTF_EVENT_FLAG_DEFAULT);
+1 −1
Original line number Original line Diff line number Diff line
@@ -890,7 +890,7 @@ static void mdss_mdp_cmd_intf_recovery(void *data, int event)
	}
	}


	if (atomic_read(&ctx->koff_cnt)) {
	if (atomic_read(&ctx->koff_cnt)) {
		mdss_mdp_ctl_reset(ctx->ctl);
		mdss_mdp_ctl_reset(ctx->ctl, true);
		reset_done = true;
		reset_done = true;
	}
	}


+1 −1
Original line number Original line Diff line number Diff line
@@ -561,7 +561,7 @@ static int mdss_mdp_video_stop(struct mdss_mdp_ctl *ctl, int panel_power_state)


	MDSS_XLOG(ctl->num, ctl->vsync_cnt);
	MDSS_XLOG(ctl->num, ctl->vsync_cnt);


	mdss_mdp_ctl_reset(ctl);
	mdss_mdp_ctl_reset(ctl, false);
	ctl->intf_ctx[MASTER_CTX] = NULL;
	ctl->intf_ctx[MASTER_CTX] = NULL;


	if (ctl->cdm) {
	if (ctl->cdm) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -1213,7 +1213,7 @@ static void mdss_mdp_overlay_cleanup(struct msm_fb_data_type *mfd,
	mutex_lock(&mdp5_data->list_lock);
	mutex_lock(&mdp5_data->list_lock);
	list_for_each_entry(pipe, destroy_pipes, list) {
	list_for_each_entry(pipe, destroy_pipes, list) {
		/* make sure pipe fetch has been halted before freeing buffer */
		/* make sure pipe fetch has been halted before freeing buffer */
		if (mdss_mdp_pipe_fetch_halt(pipe)) {
		if (mdss_mdp_pipe_fetch_halt(pipe, false)) {
			/*
			/*
			 * if pipe is not able to halt. Enter recovery mode,
			 * if pipe is not able to halt. Enter recovery mode,
			 * by un-staging any pipes that are attached to mixer
			 * by un-staging any pipes that are attached to mixer
@@ -2564,7 +2564,7 @@ static void mdss_mdp_recover_underrun_handler(struct mdss_mdp_ctl *ctl,
		return;
		return;
	}
	}


	mdss_mdp_ctl_reset(ctl);
	mdss_mdp_ctl_reset(ctl, true);
	schedule_work(&ctl->remove_underrun_handler);
	schedule_work(&ctl->remove_underrun_handler);
}
}


Loading