diff options
| author | Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org> | 2017-05-19 19:35:31 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-05-22 23:49:01 -0700 |
| commit | 09ab1c8a4ab2f7747068c8e8ba087e054e59d576 (patch) | |
| tree | f19790a95da2bce616309afe972adf4e4aab41d7 | |
| parent | 60be71604a84d2e047215cb702d6324379a353bb (diff) | |
msm: sde: Reset the iommu_attached flag after detach
When the secure camera starts, we detach the secure CB. We don't
reset the iommu_attached flag to avoid iommu attach during the
secure session. The improper flag value is causing imbalance in
the clock voting, and is causing crashes when secure camera use
cases are run back to back with device suspend/resume.
The sde_smmu_attach function already takes care of avoiding attach
during secure session. So, we can reset the flag to avoid imbalance
in the clock voting.
Change-Id: Ie57e930031800a0edc8e4a511451d6d8a2290eec
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
| -rw-r--r-- | drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c | 7 |
1 files changed, 2 insertions, 5 deletions
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 58cb160f118e..9273c0e95230 100644 --- a/drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c +++ b/drivers/media/platform/msm/sde/rotator/sde_rotator_smmu.c @@ -486,11 +486,8 @@ int sde_smmu_secure_ctrl(int enable) mdata->iommu_attached = true; } else { rc = sde_smmu_detach(mdata); - /* - * keep iommu_attached equal to true, - * so that driver does not attemp to attach - * while in secure state - */ + if (!rc) + mdata->iommu_attached = false; } mutex_unlock(&sde_smmu_ref_cnt_lock); |
