From 44e70385b99ebdeb3c2adced8dfd670bd4b1920e Mon Sep 17 00:00:00 2001 From: Ingrid Gallardo Date: Fri, 11 Jul 2014 14:56:59 -0700 Subject: msm: mdss: Add debugfs parameter to disable prefill BW Add parameter in debugfs to avoid using prefill calculations for the bandwidth vote. Change-Id: I7e1d748128335e6ced4d094d77544005e393e218 Signed-off-by: Ingrid Gallardo --- drivers/video/fbdev/msm/mdss.h | 1 + drivers/video/fbdev/msm/mdss_debug.c | 3 +++ drivers/video/fbdev/msm/mdss_mdp_ctl.c | 10 +++++++--- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/msm/mdss.h b/drivers/video/fbdev/msm/mdss.h index 338d17278342..142fc68174a3 100644 --- a/drivers/video/fbdev/msm/mdss.h +++ b/drivers/video/fbdev/msm/mdss.h @@ -177,6 +177,7 @@ struct mdss_data_type { struct mdss_fudge_factor ib_factor_overlap; struct mdss_fudge_factor clk_factor; + u32 disable_prefill; u32 *clock_levels; u32 nclk_lvl; diff --git a/drivers/video/fbdev/msm/mdss_debug.c b/drivers/video/fbdev/msm/mdss_debug.c index b629829083f1..9a7619bbbab5 100644 --- a/drivers/video/fbdev/msm/mdss_debug.c +++ b/drivers/video/fbdev/msm/mdss_debug.c @@ -564,6 +564,9 @@ static int mdss_debugfs_perf_init(struct mdss_debug_data *mdd, debugfs_create_u64("min_bus_vote", 0644, mdd->perf, (u64 *)&mdata->perf_tune.min_bus_vote); + debugfs_create_u32("disable_prefill", 0644, mdd->perf, + (u32 *)&mdata->disable_prefill); + debugfs_create_file("disable_panic", 0644, mdd->perf, (struct mdss_data_type *)mdata, &mdss_perf_panic_enable); diff --git a/drivers/video/fbdev/msm/mdss_mdp_ctl.c b/drivers/video/fbdev/msm/mdss_mdp_ctl.c index 26a9d725ac4c..f29598ebe89b 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_ctl.c +++ b/drivers/video/fbdev/msm/mdss_mdp_ctl.c @@ -359,6 +359,7 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, struct mdss_rect src, dst; bool is_fbc = false; struct mdss_mdp_prefill_params prefill_params; + struct mdss_data_type *mdata = mdss_mdp_get_mdata(); if (!pipe || !perf || !pipe->mixer_left) return -EINVAL; @@ -462,7 +463,9 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, prefill_params.is_hflip = pipe->flags & MDP_FLIP_LR; prefill_params.is_cmd = !mixer->ctl->is_video_mode; - if (is_single_layer) + if (mdata->disable_prefill != 0) + perf->prefill_bytes = 0; + else if (is_single_layer) perf->prefill_bytes = mdss_mdp_perf_calc_pipe_prefill_single(&prefill_params); else if (!prefill_params.is_cmd) @@ -472,9 +475,10 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe, perf->prefill_bytes = mdss_mdp_perf_calc_pipe_prefill_cmd(&prefill_params); - pr_debug("mixer=%d pnum=%d clk_rate=%u bw_overlap=%llu prefill=%d\n", + 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); + perf->prefill_bytes, mdata->disable_prefill ? + "prefill is disabled" : ""); return 0; } -- cgit v1.2.3