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>
This commit is contained in:
Venu Yeshala 2017-05-17 23:03:59 +05:30 committed by Gerrit - the friendly Code Review server
parent a62f42964d
commit a4491e8271
2 changed files with 7 additions and 1 deletions

View file

@ -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;

View file

@ -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