diff options
| author | Ujwal Patel <ujwalp@codeaurora.org> | 2014-09-23 17:12:41 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:34:50 -0700 |
| commit | cbd31a3ca65a70609e49d697ff05d538d25840d6 (patch) | |
| tree | 20d6c5f811aa312a2364ec2093fbe9d3fecfdfc7 | |
| parent | 6ce8c0f7988983e051ca118c98ca67e932d6ba57 (diff) | |
msm: mdss: allow extra SMPs during pipe reuse on high tier targets
There are use-cases where pipe is reused with a lower resolution than
previous one. In such cases, it is possible that SMP requirement is lower
than before. Current implementation will reject pipe configuration where
any SMP change is requested. This may lead to GPU fall-back option and
eventually consume more power. But on high end targets we have enough
number of SMPs available for use such that we can still allow the use-case
and not run out of SMPs to use. Based on this knowledge, change the logic
to allow extra SMPs during pipe reuse.
Change-Id: Icad5ca284a6b5ec1810d65bb1755d2f9572db7f0
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pipe.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pipe.c b/drivers/video/fbdev/msm/mdss_mdp_pipe.c index 22b9a2b6a242..a80f206452aa 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pipe.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pipe.c @@ -119,6 +119,20 @@ static void mdss_mdp_pipe_nrt_vbif_setup(struct mdss_data_type *mdata, return; } +static inline bool is_unused_smp_allowed(void) +{ + struct mdss_data_type *mdata = mdss_mdp_get_mdata(); + + switch (MDSS_GET_MAJOR_MINOR(mdata->mdp_rev)) { + case MDSS_GET_MAJOR_MINOR(MDSS_MDP_HW_REV_103): + case MDSS_GET_MAJOR_MINOR(MDSS_MDP_HW_REV_105): + case MDSS_GET_MAJOR_MINOR(MDSS_MDP_HW_REV_109): + return true; + default: + return false; + } +} + static u32 mdss_mdp_smp_mmb_reserve(struct mdss_mdp_pipe_smp_map *smp_map, size_t n, bool force_alloc) { @@ -138,7 +152,8 @@ static u32 mdss_mdp_smp_mmb_reserve(struct mdss_mdp_pipe_smp_map *smp_map, * that calls for change in smp configuration (addition/removal * of smp blocks), so that fallback solution happens. */ - if (i != 0 && n != i && !force_alloc) { + if (i != 0 && !force_alloc && + (((n < i) && !is_unused_smp_allowed()) || (n > i))) { pr_debug("Can't change mmb config, num_blks: %zu alloc: %d\n", n, i); return 0; @@ -485,20 +500,6 @@ static u32 mdss_mdp_calc_per_plane_num_blks(u32 ystride, return num_blks; } -static inline bool is_unused_smp_allowed(void) -{ - struct mdss_data_type *mdata = mdss_mdp_get_mdata(); - - switch (MDSS_GET_MAJOR_MINOR(mdata->mdp_rev)) { - case MDSS_GET_MAJOR_MINOR(MDSS_MDP_HW_REV_103): - case MDSS_GET_MAJOR_MINOR(MDSS_MDP_HW_REV_105): - case MDSS_GET_MAJOR_MINOR(MDSS_MDP_HW_REV_109): - return true; - default: - return false; - } -} - int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe) { struct mdss_data_type *mdata = mdss_mdp_get_mdata(); |
