diff options
| author | Ujwal Patel <ujwalp@codeaurora.org> | 2014-08-06 09:40:24 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:32:29 -0700 |
| commit | 30a12e0aecfe4ce8ec49d7c390f409df1a7286ac (patch) | |
| tree | d92d37e61ef71bd0314b952621dc9bc53dcbe4a2 /drivers/video/fbdev | |
| parent | c8aa18ff3265f9f21c096643cd85c022e8d5b697 (diff) | |
msm: mdss: fix mdp clock calculations for rotator
MDP clock requirement for rotator depends solely on source dimensions,
rot_clk = (src_w * src_h * fps). Fix current calculations where MDP clock
rate is incorrectly calculated as rot_clk = (dst_h * dst_h *fps). New
calculations are valid even when down-scale is done along with rotation.
Change-Id: I30d98b7a62beeb3a559a9c5f26de43c014fd25fd
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_ctl.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c index 85dee43cbea5..420c36f352ee 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -450,7 +450,7 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, { struct mdss_mdp_mixer *mixer; int fps = DEFAULT_FRAME_RATE; - u32 quota, rate, v_total, src_h, xres = 0, h_total = 0; + u32 quota, rate, v_total = 0, src_h, xres = 0, h_total = 0; struct mdss_rect src, dst; bool is_fbc = false; struct mdss_mdp_prefill_params prefill_params; @@ -466,7 +466,6 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, if (mixer->rotator_mode) { fps = DEFAULT_ROTATOR_FRAME_RATE; - v_total = pipe->flags & MDP_ROT_90 ? pipe->dst.w : pipe->dst.h; } else if (mixer->type == MDSS_MDP_MIXER_TYPE_INTF) { struct mdss_panel_info *pinfo; @@ -517,15 +516,18 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, else quota *= pipe->src_fmt->bpp; - rate = dst.w; - if (src_h > dst.h) - rate = (rate * src_h) / dst.h; - - rate *= v_total * fps; if (mixer->rotator_mode) { + rate = pipe->src.w * pipe->src.h * fps; rate /= 4; /* block mode fetch at 4 pix/clk */ + quota *= 2; /* bus read + write */ } else { + rate = dst.w; + if (src_h > dst.h) + rate = (rate * src_h) / dst.h; + + rate *= v_total * fps; + quota = mult_frac(quota, v_total, dst.h); if (!mixer->ctl->is_video_mode) quota = mult_frac(quota, h_total, xres); |
