diff options
| author | Venu Yeshala <vyeshala@codeaurora.org> | 2017-05-17 23:03:59 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-06-04 20:10:22 -0700 |
| commit | a4491e8271ecc44cb411dd0df68428a7fa438ff8 (patch) | |
| tree | 7ced6dd9bde089a074675da670ddac7283de533f | |
| parent | a62f42964d5606a6ef123f4608f6cb5241598c25 (diff) | |
msm: camera: isp: Disable SMMU stall upon VFE page fault
Terminate fault transaction and don't stall SMMU for VFE.
CRs-Fixed: 2048270
Change-Id: I357d7b92c7c066bf2ba157bb35b4e350bcbebdda
Signed-off-by: Venu Yeshala <vyeshala@codeaurora.org>
| -rw-r--r-- | drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c | 3 | ||||
| -rw-r--r-- | drivers/media/platform/msm/camera_v2/isp/msm_buf_mgr.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c b/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c index 2030755d59d0..7d9edde62c1b 100644 --- a/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c +++ b/drivers/media/platform/msm/camera_v2/common/cam_smmu_api.c @@ -1360,11 +1360,12 @@ int cam_smmu_set_attr(int handle, uint32_t flags, int32_t *data) /* set attributes */ ret = iommu_domain_set_attr(domain, cb->attr, (void *)data); if (ret < 0) { + mutex_unlock(&iommu_cb_set.cb_info[idx].lock); pr_err("Error: set attr\n"); return -ENODEV; } } else { - return -EINVAL; + ret = -EINVAL; } mutex_unlock(&iommu_cb_set.cb_info[idx].lock); return ret; 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 5dbed80f5b85..8f3cffb4c3da 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 @@ -1166,10 +1166,15 @@ int msm_isp_smmu_attach(struct msm_isp_buf_mgr *buf_mgr, { struct msm_vfe_smmu_attach_cmd *cmd = arg; int rc = 0; + int32_t stall_disable = 1; pr_debug("%s: cmd->security_mode : %d\n", __func__, cmd->security_mode); + mutex_lock(&buf_mgr->lock); if (cmd->iommu_attach_mode == IOMMU_ATTACH) { + /* disable smmu stall on fault */ + cam_smmu_set_attr(buf_mgr->iommu_hdl, + DOMAIN_ATTR_CB_STALL_DISABLE, &stall_disable); /* * Call hypervisor thru scm call to notify secure or * non-secure mode |
