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

Commit d60d7e26 authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: update mixer pipe_mapped value during overlay_off



The pipe_mapped and pipe_next_map are used to keep track of the
pipes staged in the mixer. The former is used to keep track of the
pipes which are currently used by the hw while the latter keeps track
of the pipes staged for the next frame. During overlay off, this seems
to be off track as only the pipe_next_map would have the updated status
and both would be in sync only after the next commit cycle. This would
cause the mixer to check for invalid pipes during the ctl_stop. Fix the
pipe_mapped state to have the current staged pipes during overlay_off.

Change-Id: I554f753441c54ceedb9dec809effc1119063e59d
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent 72ee5cb1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1409,7 +1409,8 @@ struct mdss_mdp_ctl *mdss_mdp_ctl_mixer_switch(struct mdss_mdp_ctl *ctl,
					       u32 return_type);
void mdss_mdp_set_roi(struct mdss_mdp_ctl *ctl,
	struct mdss_rect *l_roi, struct mdss_rect *r_roi);

void mdss_mdp_mixer_update_pipe_map(struct mdss_mdp_ctl *master_ctl,
		int mixer_mux);
int mdss_mdp_wb_set_format(struct msm_fb_data_type *mfd, u32 dst_format);
int mdss_mdp_wb_get_format(struct msm_fb_data_type *mfd,
					struct mdp_mixer_cfg *mixer_cfg);
+1 −1
Original line number Diff line number Diff line
@@ -3662,7 +3662,7 @@ int mdss_mdp_ctl_reset(struct mdss_mdp_ctl *ctl, bool is_recovery)
 * This function keeps track of the current mixer configuration in the hardware.
 * It's callers responsibility to call with master control.
 */
static void mdss_mdp_mixer_update_pipe_map(struct mdss_mdp_ctl *master_ctl,
void mdss_mdp_mixer_update_pipe_map(struct mdss_mdp_ctl *master_ctl,
		       int mixer_mux)
{
	struct mdss_mdp_mixer *mixer = mdss_mdp_mixer_get(master_ctl,
+5 −0
Original line number Diff line number Diff line
@@ -4713,6 +4713,11 @@ static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)

ctl_stop:
	mutex_lock(&mdp5_data->ov_lock);
	/* set the correct pipe_mapped before ctl_stop */
	mdss_mdp_mixer_update_pipe_map(mdp5_data->ctl,
			MDSS_MDP_MIXER_MUX_LEFT);
	mdss_mdp_mixer_update_pipe_map(mdp5_data->ctl,
			MDSS_MDP_MIXER_MUX_RIGHT);
	rc = mdss_mdp_ctl_stop(mdp5_data->ctl, mfd->panel_power_state);
	if (rc == 0) {
		if (mdss_fb_is_power_off(mfd)) {