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>
This commit is contained in:
parent
6ce8c0f798
commit
cbd31a3ca6
1 changed files with 16 additions and 15 deletions
|
@ -119,6 +119,20 @@ static void mdss_mdp_pipe_nrt_vbif_setup(struct mdss_data_type *mdata,
|
||||||
return;
|
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,
|
static u32 mdss_mdp_smp_mmb_reserve(struct mdss_mdp_pipe_smp_map *smp_map,
|
||||||
size_t n, bool force_alloc)
|
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
|
* that calls for change in smp configuration (addition/removal
|
||||||
* of smp blocks), so that fallback solution happens.
|
* 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",
|
pr_debug("Can't change mmb config, num_blks: %zu alloc: %d\n",
|
||||||
n, i);
|
n, i);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -485,20 +500,6 @@ static u32 mdss_mdp_calc_per_plane_num_blks(u32 ystride,
|
||||||
return num_blks;
|
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)
|
int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe)
|
||||||
{
|
{
|
||||||
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
|
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
|
||||||
|
|
Loading…
Add table
Reference in a new issue