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

Commit c6bd5f88 authored by Iliya Varadzhakov's avatar Iliya Varadzhakov Committed by Gerrit - the friendly Code Review server
Browse files

msm: cpp: Update iommu handling



CPP has to check for stream state before operate iommu
contexts.

Change-Id: I69e6266e1ff2d1cd93e7191f2c43c887154abae0
Signed-off-by: default avatarIliya Varadzhakov <ivarad@codeaurora.org>
parent 8450d1c2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2545,7 +2545,8 @@ STREAM_BUFF_END:
		break;
	}
	case VIDIOC_MSM_CPP_IOMMU_DETACH: {
		if (cpp_dev->iommu_state == CPP_IOMMU_STATE_ATTACHED) {
		if ((cpp_dev->iommu_state == CPP_IOMMU_STATE_ATTACHED) &&
			(cpp_dev->stream_cnt == 0)) {
			iommu_detach_device(cpp_dev->domain,
				cpp_dev->iommu_ctx);
			cpp_dev->iommu_state = CPP_IOMMU_STATE_DETACHED;