Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4491e82 authored by Venu Yeshala's avatar Venu Yeshala Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarVenu Yeshala <vyeshala@codeaurora.org>
parent a62f4296
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
+5 −0
Original line number Diff line number Diff line
@@ -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