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

Commit fdc71985 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 consider solid fill request in bandwidth logic"

parents bd85042f 257fc101
Loading
Loading
Loading
Loading
+13 −5
Original line number Diff line number Diff line
@@ -401,9 +401,18 @@ int mdp3_ppp_turnon(struct msm_fb_data_type *mfd, int on_off)
	return 0;
}

bool mdp3_optimal_bw(int req_cnt)
bool mdp3_optimal_bw(struct blit_req_list *req)
{
	if (req_cnt == 1 && ppp_stat->req_q.count == 1)
	int i, solid_fill = 0;

	if (!req || (ppp_stat->req_q.count > 1))
		return false;

	for (i = 0; i < req->count; i++) {
		if (req->req_list[i].flags & MDP_SOLID_FILL)
			solid_fill++;
	}
	if ((req->count - solid_fill) <= 1)
		return true;
	return false;
}
@@ -1043,7 +1052,7 @@ static void mdp3_ppp_blit_wq_handler(struct work_struct *work)
	}

	if (!ppp_stat->bw_on) {
		ppp_stat->bw_optimal = mdp3_optimal_bw(req->count);
		ppp_stat->bw_optimal = mdp3_optimal_bw(req);
		mdp3_ppp_turnon(mfd, 1);
		if (rc < 0) {
			mutex_unlock(&ppp_stat->config_ppp_mutex);
@@ -1076,8 +1085,7 @@ static void mdp3_ppp_blit_wq_handler(struct work_struct *work)
		if (ppp_stat->wait_for_pop)
			complete(&ppp_stat->pop_q_comp);
		mutex_unlock(&ppp_stat->req_mutex);
		if (req &&
		     (ppp_stat->bw_optimal != mdp3_optimal_bw(req->count))) {
		if (req && (ppp_stat->bw_optimal != mdp3_optimal_bw(req))) {
			ppp_stat->bw_optimal = !ppp_stat->bw_optimal;
			mdp3_ppp_vote_update(mfd);
		}