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

Commit d9b99bbc 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: Do not return error on same autorefresh settings"

parents 39685039 4dff470b
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -3066,22 +3066,11 @@ static inline int mdss_validate_autorefresh_param(struct mdss_mdp_ctl *ctl,
{
	int rc = 0;

	if (frame_cnt == ctl->autorefresh_frame_cnt) {
		rc = -EINVAL;
		pr_debug("No change to autorefresh parameters\n");
		goto exit;
	}

	if (frame_cnt < 0 || frame_cnt >= BIT(16)) {
		rc = -EINVAL;
		pr_err("frame cnt %d is out of range (16 bits).\n", frame_cnt);
		goto exit;
	}

	pr_debug("Setting autorefresh_enable=%d frame_cnt=%d\n",
		ctl->cmd_autorefresh_en, frame_cnt);

exit:
	return rc;
}

@@ -3116,7 +3105,7 @@ static ssize_t mdss_mdp_cmd_autorefresh_store(struct device *dev,
	if (rc) {
		pr_err("kstrtoint failed. rc=%d\n", rc);
		return rc;
	} else {
	} else if (frame_cnt != ctl->autorefresh_frame_cnt) {
		rc = mdss_validate_autorefresh_param(ctl, frame_cnt);
		if (rc)
			return rc;