diff options
| author | Adrian Salido-Moreno <adrianm@codeaurora.org> | 2012-09-11 18:30:03 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:12:51 -0700 |
| commit | c849ed7eacf8188e28ab8d7fb34d79282e81cda3 (patch) | |
| tree | 66552b13c32cc879891a836df035670705ed32fd | |
| parent | fdd6d0b2d0fab0f035d3dfb0df2a9fdaaeab09e6 (diff) | |
msm: mdss: update performance calculations to include border color
Current clock and bus scaling calculations consider only source
surface pipes to set clock rate and bus scaling factor, however
since MDP also generates pixels for border color this area also
needs to be considered for final clock and bus scaling factors
for data paths that use layer mixer.
Change-Id: I9463c01dfd0b7a301797bd036f563e15d5195dbd
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_ctl.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c index d2a98d345ae6..a86dff7c1326 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -90,18 +90,34 @@ static void mdss_mdp_perf_mixer_update(struct mdss_mdp_mixer *mixer, *bus_ib_quota = 0; *clk_rate = 0; - if (mixer->type == MDSS_MDP_MIXER_TYPE_INTF) { - struct mdss_panel_info *pinfo = &mixer->ctl->mfd->panel_info; - v_total = (pinfo->yres + pinfo->lcdc.v_back_porch + - pinfo->lcdc.v_front_porch + pinfo->lcdc.v_pulse_width); - v_active = pinfo->yres; - } else if (mixer->rotator_mode) { + if (mixer->rotator_mode) { pipe = mixer->stage_pipe[0]; /* rotator pipe */ v_total = pipe->flags & MDP_ROT_90 ? pipe->dst.w : pipe->dst.h; v_active = v_total; } else { - v_total = mixer->height; - v_active = v_total; + int is_writeback = false; + if (mixer->type == MDSS_MDP_MIXER_TYPE_INTF) { + struct mdss_panel_info *pinfo; + pinfo = &mixer->ctl->mfd->panel_info; + v_total = (pinfo->yres + pinfo->lcdc.v_back_porch + + pinfo->lcdc.v_front_porch + + pinfo->lcdc.v_pulse_width); + v_active = pinfo->yres; + + if (pinfo->type == WRITEBACK_PANEL) + is_writeback = true; + } else { + v_total = mixer->height; + v_active = v_total; + + is_writeback = true; + } + *clk_rate = mixer->width * v_total * fps; + if (is_writeback) { + /* perf for bus writeback */ + *bus_ab_quota = fps * mixer->width * mixer->height * 3; + *bus_ib_quota = *bus_ab_quota; + } } for (i = 0; i < MDSS_MDP_MAX_STAGE; i++) { @@ -118,7 +134,7 @@ static void mdss_mdp_perf_mixer_update(struct mdss_mdp_mixer *mixer, if (mixer->type == MDSS_MDP_MIXER_TYPE_INTF) quota = (quota / v_active) * v_total; - else + else if (mixer->rotator_mode) quota *= 2; /* bus read + write */ rate = pipe->dst.w; |
