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

Commit 1c587de1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "slimbus: Detach from IOMMU Context bank during SSR"

parents fdf8739c e6c9f162
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -182,6 +182,9 @@ static int msm_slim_iommu_attach(struct msm_slim_ctrl *ctrl_dev)
	if (!ctrl_dev->iommu_desc.cb_dev)
		return 0;

	if (!IS_ERR_OR_NULL(ctrl_dev->iommu_desc.iommu_map))
		return 0;

	dev = ctrl_dev->iommu_desc.cb_dev;
	iommu_map = arm_iommu_create_mapping(&platform_bus_type,
						va_start, va_size);
@@ -1299,6 +1302,13 @@ void msm_slim_sps_exit(struct msm_slim_ctrl *dev, bool dereg)
		if (dev->pipes[i].connected)
			msm_slim_disconn_pipe_port(dev, i);
	}

	if (!IS_ERR_OR_NULL(dev->iommu_desc.iommu_map)) {
		arm_iommu_detach_device(dev->iommu_desc.cb_dev);
		arm_iommu_release_mapping(dev->iommu_desc.iommu_map);
		dev->iommu_desc.iommu_map = NULL;
	}

	if (dereg) {
		for (i = 0; i < dev->port_nums; i++) {
			if (dev->pipes[i].connected)