diff options
author | Rajeev Kulkarni <krajeev@codeaurora.org> | 2017-01-26 16:44:52 -0800 |
---|---|---|
committer | Rajeev Kulkarni <krajeev@codeaurora.org> | 2017-02-09 10:16:45 -0800 |
commit | 78e048f819aaa3c044202416aff45a4716c5e7c6 (patch) | |
tree | e7734cc4dd7e95f8d9922f5c6f7a6a09b131c2aa /drivers/media | |
parent | 37c5f804a2e32623ddbe51e68c527bae7be81582 (diff) |
mm:camera: Do not detach isp node during smmu detach.
After smmu detach, isp registers become unavailable in
secure camera usecase. In this case if user space tries
to access isp registers after detach, it results in
violation. Detach will happen when isp node is closed,
since after close the user driver will not access isp
at all.
CRs-Fixed: 2004677
Change-Id: Icf707b3bfcd7f8b62b97f784db780a1c19ae8cab
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c b/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c index de29692414d2..f7eb0f8ac5a8 100644 --- a/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c +++ b/drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -1179,26 +1179,6 @@ int msm_isp_smmu_attach(struct msm_isp_buf_mgr *buf_mgr, rc = msm_isp_buf_get_scratch(buf_mgr); if (rc) goto err2; - } else { - if (buf_mgr->attach_ref_cnt > 0) - buf_mgr->attach_ref_cnt--; - else - pr_err("%s: Error! Invalid ref_cnt %d\n", - __func__, buf_mgr->attach_ref_cnt); - - if (buf_mgr->attach_ref_cnt == 0) { - rc = msm_isp_buf_put_scratch(buf_mgr); - if (buf_mgr->secure_enable == SECURE_MODE) - rc |= cam_smmu_ops(buf_mgr->iommu_hdl, - CAM_SMMU_DETACH_SEC_VFE_NS_STATS); - else - rc |= cam_smmu_ops(buf_mgr->iommu_hdl, - CAM_SMMU_DETACH); - if (rc < 0) { - pr_err("%s: img/stats smmu detach error, rc :%d\n", - __func__, rc); - } - } } mutex_unlock(&buf_mgr->lock); |