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

Commit 1f71195b authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Add iommu fault flag and dma range for kona targets"

parents 3181877c 5e3454c3
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -372,6 +372,8 @@
				<&apps_smmu 0xC01 0x400>,
				<&apps_smmu 0xC40 0x400>,
				<&apps_smmu 0xC41 0x400>;
			qcom,iommu-faults = "non-fatal";
			dma-ranges = <0x7400000 0x7400000 0xd8c00000>;
			label = "ife";
			ife_iova_mem_map: iova-mem-map {
				/* IO region is approximately 3.4 GB */
@@ -390,6 +392,8 @@
			iommus = <&apps_smmu 0x2040 0x400>,
				<&apps_smmu 0x2440 0x400>;
			label = "jpeg";
			qcom,iommu-faults = "non-fatal";
			dma-ranges = <0x7400000 0x7400000 0xd8c00000>;
			jpeg_iova_mem_map: iova-mem-map {
				/* IO region is approximately 3.4 GB */
				iova-mem-region-io {
@@ -425,6 +429,8 @@
				<&apps_smmu 0x2420 0x400>,
				<&apps_smmu 0x2421 0x400>;
			label = "icp";
			qcom,iommu-faults = "non-fatal";
			dma-ranges = <0xda00000 0xda00000 0xace00000>;
			icp_iova_mem_map: iova-mem-map {
				iova-mem-region-firmware {
					/* Firmware region is 5MB */
@@ -479,6 +485,8 @@
			iommus = <&apps_smmu 0x20C0 0x400>,
				<&apps_smmu 0x24C0 0x400>;
			label = "cpas-cdm0";
			qcom,iommu-faults = "non-fatal";
			dma-ranges = <0x7400000 0x7400000 0xd8c00000>;
			cpas_cdm_iova_mem_map: iova-mem-map {
				iova-mem-region-io {
					/* IO region is approximately 3.4 GB */
@@ -501,6 +509,8 @@
			compatible = "qcom,msm-cam-smmu-cb";
			iommus = <&apps_smmu 0x2080 0x400>,
				<&apps_smmu 0x2480 0x400>;
			qcom,iommu-faults = "non-fatal";
			dma-ranges = <0x7400000 0x7400000 0xd8c00000>;
			label = "fd";
			fd_iova_mem_map: iova-mem-map {
				iova-mem-region-io {
+0 −5
Original line number Diff line number Diff line
@@ -907,11 +907,6 @@ int cam_hw_cdm_probe(struct platform_device *pdev)
	cam_smmu_set_client_page_fault_handler(cdm_core->iommu_hdl.non_secure,
		cam_hw_cdm_iommu_fault_handler, cdm_hw);

	rc = cam_smmu_ops(cdm_core->iommu_hdl.non_secure, CAM_SMMU_ATTACH);
	if (rc < 0) {
		CAM_ERR(CAM_CDM, "Attach iommu non secure handle failed");
		goto destroy_non_secure_hdl;
	}
	cdm_core->iommu_hdl.secure = -1;

	cdm_core->work_queue = alloc_workqueue(cdm_core->name,
+0 −9
Original line number Diff line number Diff line
@@ -1721,7 +1721,6 @@ int cam_fd_hw_mgr_deinit(struct device_node *of_node)

	cam_req_mgr_workq_destroy(&g_fd_hw_mgr.work);

	cam_smmu_ops(g_fd_hw_mgr.device_iommu.non_secure, CAM_SMMU_DETACH);
	cam_smmu_destroy_handle(g_fd_hw_mgr.device_iommu.non_secure);
	g_fd_hw_mgr.device_iommu.non_secure = -1;

@@ -1839,12 +1838,6 @@ int cam_fd_hw_mgr_init(struct device_node *of_node,
		goto destroy_mutex;
	}

	rc = cam_smmu_ops(g_fd_hw_mgr.device_iommu.non_secure, CAM_SMMU_ATTACH);
	if (rc) {
		CAM_ERR(CAM_FD, "FD attach iommu handle failed, rc=%d", rc);
		goto destroy_smmu;
	}

	rc = cam_cdm_get_iommu_handle("fd", &g_fd_hw_mgr.cdm_iommu);
	if (rc)
		CAM_DBG(CAM_FD, "Failed to acquire the CDM iommu handles");
@@ -1923,8 +1916,6 @@ int cam_fd_hw_mgr_init(struct device_node *of_node,
	return rc;

detach_smmu:
	cam_smmu_ops(g_fd_hw_mgr.device_iommu.non_secure, CAM_SMMU_DETACH);
destroy_smmu:
	cam_smmu_destroy_handle(g_fd_hw_mgr.device_iommu.non_secure);
	g_fd_hw_mgr.device_iommu.non_secure = -1;
destroy_mutex:
+0 −8
Original line number Diff line number Diff line
@@ -4665,12 +4665,6 @@ int cam_icp_hw_mgr_init(struct device_node *of_node, uint64_t *hw_mgr_hdl,
		goto icp_get_hdl_failed;
	}

	rc = cam_smmu_ops(icp_hw_mgr.iommu_hdl, CAM_SMMU_ATTACH);
	if (rc) {
		CAM_ERR(CAM_ICP, "icp attach failed: %d", rc);
		goto icp_attach_failed;
	}

	rc = cam_smmu_get_handle("cam-secure", &icp_hw_mgr.iommu_sec_hdl);
	if (rc) {
		CAM_ERR(CAM_ICP, "get secure mmu handle failed: %d", rc);
@@ -4691,8 +4685,6 @@ int cam_icp_hw_mgr_init(struct device_node *of_node, uint64_t *hw_mgr_hdl,
	cam_smmu_destroy_handle(icp_hw_mgr.iommu_sec_hdl);
	icp_hw_mgr.iommu_sec_hdl = -1;
secure_hdl_failed:
	cam_smmu_ops(icp_hw_mgr.iommu_hdl, CAM_SMMU_DETACH);
icp_attach_failed:
	cam_smmu_destroy_handle(icp_hw_mgr.iommu_hdl);
	icp_hw_mgr.iommu_hdl = -1;
icp_get_hdl_failed:
+0 −9
Original line number Diff line number Diff line
@@ -4897,12 +4897,6 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl)
		return -EINVAL;
	}

	if (cam_smmu_ops(g_ife_hw_mgr.mgr_common.img_iommu_hdl,
		CAM_SMMU_ATTACH)) {
		CAM_ERR(CAM_ISP, "Attach iommu handle failed.");
		goto attach_fail;
	}

	if (cam_smmu_get_handle("cam-secure",
		&g_ife_hw_mgr.mgr_common.img_iommu_hdl_secure)) {
		CAM_ERR(CAM_ISP, "Failed to get secure iommu handle");
@@ -5016,9 +5010,6 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl)
		g_ife_hw_mgr.mgr_common.img_iommu_hdl_secure);
	g_ife_hw_mgr.mgr_common.img_iommu_hdl_secure = -1;
secure_fail:
	cam_smmu_ops(g_ife_hw_mgr.mgr_common.img_iommu_hdl,
		CAM_SMMU_DETACH);
attach_fail:
	cam_smmu_destroy_handle(g_ife_hw_mgr.mgr_common.img_iommu_hdl);
	g_ife_hw_mgr.mgr_common.img_iommu_hdl = -1;
	return rc;
Loading