diff options
| author | Sushil Chauhan <sushilchauhan@codeaurora.org> | 2014-08-14 16:15:08 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:33:17 -0700 |
| commit | 605143088e9cc297cbec2db5c843db443e51cc01 (patch) | |
| tree | 4e66490e67de6de16a6fba19702c390e1d7ebab7 /drivers/video/fbdev | |
| parent | 163b13ebfd831053ab656d3c15cb47818d96683c (diff) | |
msm: mdss: Do not consider solid fill request in bandwidth logic
MDP_SOLID_FILL request does not require any data fetch on the bus,
so do not consider it in the optimal bandwidth logic.
Change-Id: I7ddfde78d94a42cfeba6aa0af7e805eba95bc699
Signed-off-by: Sushil Chauhan <sushilchauhan@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdp3_ppp.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/video/fbdev/msm/mdp3_ppp.c b/drivers/video/fbdev/msm/mdp3_ppp.c index 474bc37d133b..82edd467582d 100644 --- a/drivers/video/fbdev/msm/mdp3_ppp.c +++ b/drivers/video/fbdev/msm/mdp3_ppp.c @@ -403,9 +403,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; } @@ -1045,7 +1054,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); @@ -1078,8 +1087,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); } |
