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>
This commit is contained in:
Ingrid Gallardo 2014-09-16 18:49:05 -07:00 committed by David Keitel
parent c4b78f594f
commit 45f8f6e095

View file

@ -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 ?