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

Commit 480330c3 authored by Ramesh V's avatar Ramesh V
Browse files

msm: camera: smmu: get iommu mapping for context bank



get iommu mapping for context bank of QSMMU and arm SMMU.

Change-Id: Ie569d2e57c1d27c378d723f4c39051e0647c69c2
Signed-off-by: default avatarRamesh V <ramev@codeaurora.org>
parent 8d93546f
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <linux/dma-attrs.h>
#include <linux/of_platform.h>
#include <linux/iommu.h>
#include <linux/qcom_iommu.h>
#include <linux/dma-mapping.h>
#include <linux/msm_dma_iommu_mapping.h>
#include "cam_smmu_api.h"
@@ -1510,9 +1511,13 @@ static int cam_populate_smmu_context_banks(struct device *dev,
			cb->name, cb->is_secure, cb->scratch_buf_support);

	/* set up the iommu mapping for the  context bank */
	if (type == CAM_QSMMU) {
		ctx = msm_iommu_get_ctx(cb->name);
		CDBG("getting QSMMU ctx : %s\n", cb->name);
	} else {
		ctx = dev;
		CDBG("getting Arm SMMU ctx : %s\n", cb->name);

	}
	rc = cam_smmu_setup_cb(cb, ctx);
	if (rc < 0)
		pr_err("Error: failed to setup cb : %s\n", cb->name);