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

Commit d4e34bfe 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: fix rotator failures when pixel format changes"

parents a31b8289 1d8e1976
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@ static int mdss_mdp_rotator_pipe_dequeue(struct mdss_mdp_rotator_session *rot)
					       head);

			rc = mdss_mdp_rotator_busy_wait(tmp);
			mdss_mdp_smp_release(tmp->pipe);
			list_del(&tmp->head);
			if (rc) {
				pr_err("no pipe attached to session=%d\n",
@@ -496,6 +497,7 @@ int mdss_mdp_rotator_setup(struct msm_fb_data_type *mfd,
	struct mdss_mdp_rotator_session *rot = NULL;
	struct mdss_mdp_format_params *fmt;
	u32 bwc_enabled;
	bool format_changed = false;
	int ret = 0;

	mutex_lock(&rotator_lock);
@@ -529,6 +531,10 @@ int mdss_mdp_rotator_setup(struct msm_fb_data_type *mfd,
			ret = -ENODEV;
			goto rot_err;
		}

		if (rot->format != fmt->format)
			format_changed = true;

	} else {
		pr_err("invalid rotator session id=%x\n", req->id);
		ret = -EINVAL;
@@ -590,6 +596,12 @@ int mdss_mdp_rotator_setup(struct msm_fb_data_type *mfd,

	rot->params_changed++;

	/* If the format changed, release the smp alloc */
	if (format_changed && rot->pipe) {
		mdss_mdp_rotator_busy_wait(rot);
		mdss_mdp_smp_release(rot->pipe);
	}

	ret = __mdss_mdp_rotator_pipe_reserve(rot);
	if (!ret && rot->next)
		ret = __mdss_mdp_rotator_pipe_reserve(rot->next);