summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorUjwal Patel <ujwalp@codeaurora.org>2014-04-02 16:40:49 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:28:42 -0700
commit39a262ff6552003aeab8e88045f9109eb7cfa1cd (patch)
tree3bebeb76e59ee4944c081d4c38c3b85add7ffe76 /drivers/video/fbdev
parent27fd7dabb7cdf95629a035adb1fbb3c41216e86b (diff)
msm: mdss: remove additional vert decimation when per pipe BW exceeds
Currently if per pipe BW exceeds pre-defined limit, we add additional vertical decimation to reduce BW. But this has inverse effect on quality. To mitigate this issue, decimate further only if user has already requested decimation else return an appropriate error which user can detect and act upon it. CRs-Fixed: 637971 Change-Id: I1c3b913036b7a1680d6c99b03d42f1204f71f89f Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_overlay.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c
index 5a30cfe6b549..5eb8d44903cc 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c
@@ -357,9 +357,22 @@ static int __mdp_pipe_tune_perf(struct mdss_mdp_pipe *pipe)
for (;;) {
rc = mdss_mdp_perf_calc_pipe(pipe, &perf, NULL, true);
- if (!rc && (perf.mdp_clk_rate <= mdata->max_mdp_clk_rate) &&
- !mdss_mdp_perf_bw_check_pipe(&perf, pipe))
- break;
+ if (!rc && (perf.mdp_clk_rate <= mdata->max_mdp_clk_rate)) {
+ rc = mdss_mdp_perf_bw_check_pipe(&perf, pipe);
+ if (!rc) {
+ break;
+ } else if ((rc == -E2BIG) && !pipe->vert_deci) {
+ /*
+ * if per pipe BW exceeds the limit and user
+ * has not requested decimation then return
+ * -E2BIG error back to user else try more
+ * decimation.
+ */
+ pr_debug("pipe%d exceeded per pipe BW\n",
+ pipe->num);
+ return rc;
+ }
+ }
/*
* if decimation is available try to reduce minimum clock rate