diff options
| author | Jeevan Shriram <jshriram@codeaurora.org> | 2015-02-10 19:01:46 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:40:03 -0700 |
| commit | 729e8d3d5b7217a64dddedd9291470d9db0ad3db (patch) | |
| tree | 54cc7450a7a0e91e82ff820060a87160ee4f813c | |
| parent | 031ca704fc87da241927c9119b7582a1b06571af (diff) | |
msm: mdss: update bandwidth equation when pingpong split enabled
When pingpong split is enabled, single DSPP drives the two DSI
panels and bandwidth needs to be adjusted based on the complete
panel width. In the existing implementation, only left half of the
panel is being considered for bandwidth vote. This change addresses
issue with bandwidth calculations when pingpong split is enabled.
Change-Id: I24ab9dee80c75f25f8c41501f6b635d98de512a2
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
(cherry picked from commit 812bbe33e782cde79f7b56ac417aa11597fecfe3)
[veeras@codeaurora.org: Resolve merge conflict in mdss_mdp_ctl.c]
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp.h | 29 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_ctl.c | 39 |
2 files changed, 38 insertions, 30 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp.h b/drivers/video/fbdev/msm/mdss_mdp.h index 07c7753284df..363d009c9768 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.h +++ b/drivers/video/fbdev/msm/mdss_mdp.h @@ -742,6 +742,35 @@ static inline int mdss_mdp_line_buffer_width(void) return MAX_LINE_BUFFER_WIDTH; } +static inline u32 get_panel_yres(struct mdss_panel_info *pinfo) +{ + u32 yres; + + yres = pinfo->yres + pinfo->lcdc.border_top + + pinfo->lcdc.border_bottom; + return yres; +} + +static inline u32 get_panel_xres(struct mdss_panel_info *pinfo) +{ + u32 xres; + + xres = pinfo->xres + pinfo->lcdc.border_left + + pinfo->lcdc.border_right; + return xres; +} + +static inline u32 get_panel_width(struct mdss_mdp_ctl *ctl) +{ + u32 width; + + width = get_panel_xres(&ctl->panel_data->panel_info); + if (ctl->panel_data->next && is_pingpong_split(ctl->mfd)) + width += get_panel_xres(&ctl->panel_data->next->panel_info); + + return width; +} + static inline int mdss_mdp_panic_signal_support_mode( struct mdss_data_type *mdata) { diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c index d369a47006bc..20451241c874 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -460,24 +460,6 @@ exit: return; } -static inline u32 get_panel_yres(struct mdss_panel_info *pinfo) -{ - u32 yres; - - yres = pinfo->yres + pinfo->lcdc.border_top + - pinfo->lcdc.border_bottom; - return yres; -} - -static inline u32 get_panel_xres(struct mdss_panel_info *pinfo) -{ - u32 xres; - - xres = pinfo->xres + pinfo->lcdc.border_left + - pinfo->lcdc.border_right; - return xres; -} - static u32 get_pipe_mdp_clk_rate(struct mdss_mdp_pipe *pipe, struct mdss_rect src, struct mdss_rect dst, u32 fps, u32 v_total, u32 flags) @@ -632,6 +614,9 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, } else if (mixer->type == MDSS_MDP_MIXER_TYPE_INTF) { struct mdss_panel_info *pinfo; + if (!mixer->ctl) + return -EINVAL; + pinfo = &mixer->ctl->panel_data->panel_info; if (pinfo->type == MIPI_VIDEO_PANEL) { fps = pinfo->panel_max_fps; @@ -640,9 +625,14 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, fps = mdss_panel_get_framerate(pinfo); v_total = mdss_panel_get_vtotal(pinfo); } - xres = get_panel_xres(pinfo); + xres = get_panel_width(mixer->ctl); is_fbc = pinfo->fbc.enabled; h_total = mdss_panel_get_htotal(pinfo, false); + + if (is_pingpong_split(mixer->ctl->mfd)) + h_total += mdss_panel_get_htotal( + &mixer->ctl->panel_data->next->panel_info, + false); } else { v_total = mixer->height; xres = mixer->width; @@ -2109,17 +2099,6 @@ static int mdss_mdp_ctl_fbc_enable(int enable, return 0; } -static inline u32 get_panel_width(struct mdss_mdp_ctl *ctl) -{ - u32 width; - - width = get_panel_xres(&ctl->panel_data->panel_info); - if (ctl->panel_data->next && is_pingpong_split(ctl->mfd)) - width += get_panel_xres(&ctl->panel_data->next->panel_info); - - return width; -} - int mdss_mdp_ctl_setup(struct mdss_mdp_ctl *ctl) { struct mdss_mdp_ctl *split_ctl; |
