diff options
author | Abhijit Kulkarni <kabhijit@codeaurora.org> | 2017-02-09 19:04:43 -0800 |
---|---|---|
committer | Abhijit Kulkarni <kabhijit@codeaurora.org> | 2017-02-15 19:27:22 -0800 |
commit | 9a5cb63822cb91d7840a21ba9728e4d557c95ab4 (patch) | |
tree | 3a2745d6be3ba611101abde41b2e8975289e3f5d /drivers/media | |
parent | 3a7e752617514960c5cecdf84e12b13dc63c04c7 (diff) |
msm: mdss: fix secure session power vote
This change fixes the clock and gdsc disable for smmu.
During transitioning to secure session, smmu session
is detached but vote for clock and gdsc is not removed
since smmu hardware is still being used. So there remains
an additional vote and this renders smmu related clocks
and bimc gdsc always on when we transition back to
non-secure state. This change fixes the unbalance of this vote.
CRs-Fixed: 2004902
Change-Id: I363a4acfd17b96afc05cfe78cd9a4defba674f55
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/msm/sde/rotator/sde_rotator_base.h | 1 | ||||
-rw-r--r-- | drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/media/platform/msm/sde/rotator/sde_rotator_base.h b/drivers/media/platform/msm/sde/rotator/sde_rotator_base.h index 92ea32d9e819..a240b43b7c70 100644 --- a/drivers/media/platform/msm/sde/rotator/sde_rotator_base.h +++ b/drivers/media/platform/msm/sde/rotator/sde_rotator_base.h @@ -118,6 +118,7 @@ struct sde_smmu_client { struct sde_module_power mp; struct reg_bus_client *reg_bus_clt; bool domain_attached; + bool domain_reattach; int domain; }; diff --git a/drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c b/drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c index 46001fa7b429..1ec39626e09a 100644 --- a/drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c +++ b/drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c @@ -247,6 +247,14 @@ int sde_smmu_attach(struct sde_rot_data_type *mdata) goto err; } sde_smmu->domain_attached = true; + if (sde_smmu->domain_reattach) { + SDEROT_DBG( + "domain[%i] re-attach\n", + i); + /* remove extra vote */ + sde_smmu_enable_power(sde_smmu, false); + sde_smmu->domain_reattach = false; + } SDEROT_DBG("iommu v2 domain[%i] attached\n", i); } } else { @@ -292,6 +300,12 @@ int sde_smmu_detach(struct sde_rot_data_type *mdata) arm_iommu_detach_device(sde_smmu->dev); SDEROT_DBG("iommu domain[%i] detached\n", i); sde_smmu->domain_attached = false; + + /* + * since we are leaving the clock vote, on + * re-attaching do not vote for clocks + */ + sde_smmu->domain_reattach = true; } else { sde_smmu_enable_power(sde_smmu, false); |