msm_fb:display: correct bus bw for downscale case

The check condition for updating bus bandwidth if downscaling is
needed was always FALSE.

Change-Id: Iec0a4d13c7737d86976d76e0dfd3ec45062799fd
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
This commit is contained in:
Siddhartha Agrawal 2013-01-11 12:32:18 -08:00 committed by Stephen Boyd
parent b1423d2d61
commit dc9efbd9ff

View file

@ -2650,13 +2650,13 @@ static int mdp4_calc_pipe_mdp_bw(struct msm_fb_data_type *mfd,
/* factor 1.25 for ib */ /* factor 1.25 for ib */
pipe->bw_ib_quota = quota * MDP4_BW_IB_FACTOR / 100; pipe->bw_ib_quota = quota * MDP4_BW_IB_FACTOR / 100;
/* down scaling factor for ib */ /* down scaling factor for ib */
if ((!pipe->dst_h) && (!pipe->src_h) && if ((pipe->dst_h) && (pipe->src_h) &&
(pipe->src_h > pipe->dst_h)) { (pipe->src_h > pipe->dst_h)) {
u64 ib = quota; u32 ib = quota;
ib *= pipe->src_h; ib *= pipe->src_h;
ib /= pipe->dst_h; ib /= pipe->dst_h;
pipe->bw_ib_quota = max(ib, pipe->bw_ib_quota); pipe->bw_ib_quota = max((u64)ib, pipe->bw_ib_quota);
pr_debug("%s: src_h=%d dst_h=%d mdp ib %llu, ib_quota=%llu\n", pr_debug("%s: src_h=%d dst_h=%d mdp ib %u, ib_quota=%llu\n",
__func__, pipe->src_h, pipe->dst_h, __func__, pipe->src_h, pipe->dst_h,
ib<<shift, pipe->bw_ib_quota<<shift); ib<<shift, pipe->bw_ib_quota<<shift);
} }