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

Commit 4d0727b7 authored by Rajakumar Govindaram's avatar Rajakumar Govindaram Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera2: cpp: Check IOMMU status before processing frame



The CPP HW can use invalid address if the IOMMU status is
improper. The frame command needs to be issued only if there
is valid IOMMU state.

Change-Id: I74fb7faf25088d76b5e21c9c53eabb7306f2d264
Signed-off-by: default avatarRajakumar Govindaram <rajakuma@codeaurora.org>
parent 7ec67867
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1736,6 +1736,11 @@ static int msm_cpp_cfg_frame(struct cpp_device *cpp_dev,
		return -EINVAL;
	}

	if (cpp_dev->iommu_state != CPP_IOMMU_STATE_ATTACHED) {
		pr_info("IOMMU is not attached\n");
		return -EAGAIN;
	}

	in_phyaddr = msm_cpp_fetch_buffer_info(cpp_dev,
		&new_frame->input_buffer_info,
		((new_frame->input_buffer_info.identity >> 16) & 0xFFFF),