diff options
| author | Ingrid Gallardo <ingridg@codeaurora.org> | 2014-09-16 18:49:05 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:34:26 -0700 |
| commit | 45f8f6e095bd9c0e89eba889d6fafaa9280d31ee (patch) | |
| tree | 0e5b87533af61f6e2012b0add7780baed8f09fb3 | |
| parent | c4b78f594f64b96593b23cc23114e8a2d015f2fd (diff) | |
msm: mdss: avoid bandwidth calculation for solid color fill
Current code tries to do the prefill bandwidth
calculation for the solid color fill use cases.
This is wrong since in this scenario driver does not
need to calculate prefill bandwidth and this could
cause a kernel panic since smps are not allocated;
add check to avoid this condition.
Change-Id: Ia5c7ec2473121b7c419fa9facb92a4f747cab43c
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_ctl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c index 6d07c7cf0356..9d52cad84910 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -541,9 +541,11 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, else perf->mdp_clk_rate = rate; - if (mixer->ctl->intf_num == MDSS_MDP_NO_INTF) { + if (mixer->ctl->intf_num == MDSS_MDP_NO_INTF || + mdata->disable_prefill || + (pipe->flags & MDP_SOLID_FILL)) { perf->prefill_bytes = 0; - return 0; + goto exit; } calc_smp_size = (flags & PERF_CALC_PIPE_CALC_SMP_SIZE) ? true : false; @@ -565,8 +567,6 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, prefill_params.is_cmd = !mixer->ctl->is_video_mode; prefill_params.pnum = pipe->num; - if (mdata->disable_prefill != 0) - perf->prefill_bytes = 0; if (flags & PERF_CALC_PIPE_SINGLE_LAYER) perf->prefill_bytes = mdss_mdp_perf_calc_pipe_prefill_single(&prefill_params); @@ -577,6 +577,7 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, perf->prefill_bytes = mdss_mdp_perf_calc_pipe_prefill_cmd(&prefill_params); +exit: pr_debug("mixer=%d pnum=%d clk_rate=%u bw_overlap=%llu prefill=%d %s\n", mixer->num, pipe->num, perf->mdp_clk_rate, perf->bw_overlap, perf->prefill_bytes, mdata->disable_prefill ? |
