summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayant Shekhar <jshekhar@codeaurora.org>2017-01-06 12:03:58 +0530
committerJayant Shekhar <jshekhar@codeaurora.org>2017-01-08 12:05:53 +0530
commit25cd29c57bd874ecf10488fa7a636e43665568d4 (patch)
treea5478177c51f405f528e22241a39579108641d00
parent5142c18bae30439decd1c139999b54197e2aae91 (diff)
msm: mdss: Fix equation to calculate prefill count for amortization
Traffic shaper count for calculating high layer should include low layer height along with low layer ypos. Fix the high layer end value by adding height of the low layer. Change-Id: Icbe1157d9506747d8670f4b7f66c183d98e920fe Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_pipe.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pipe.c b/drivers/video/fbdev/msm/mdss_mdp_pipe.c
index 4d42e42035c3..a9e8cca6435e 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_pipe.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_pipe.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -2460,7 +2460,8 @@ static u32 __get_ts_count(struct mdss_mdp_pipe *pipe,
if (pipe &&
pipe->multirect.mode == MDSS_MDP_PIPE_MULTIRECT_SERIAL) {
__get_ordered_rects(pipe, &low_pipe, &high_pipe);
- ts_ypos = high_pipe->dst.y - low_pipe->dst.y - 1;
+ ts_ypos = high_pipe->dst.y -
+ (low_pipe->dst.y + low_pipe->dst.h) - 1;
rate_factor = TS_CLK / fps;
ts_count = mult_frac(ts_ypos, rate_factor, v_total);
MDSS_XLOG(ts_ypos, rate_factor, ts_count);
@@ -2534,7 +2535,7 @@ static u32 __get_ts_bytes(struct mdss_mdp_pipe *pipe,
/* calculate ts bytes as the sum of both rects */
ts_bytes_low = __calc_ts_bytes(&low_pipe->src, fps,
low_pipe->src_fmt->bpp);
- ts_bytes_high = __calc_ts_bytes(&low_pipe->src, fps,
+ ts_bytes_high = __calc_ts_bytes(&high_pipe->src, fps,
high_pipe->src_fmt->bpp);
ts_bytes = ts_bytes_low + ts_bytes_high;