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

Commit 6045def7 authored by Lakshmi Narayana Kalavala's avatar Lakshmi Narayana Kalavala
Browse files

msm: camera: Use only one SMMU context bank for VFE



VFE is currently using two Context Banks in the VFE
SMMU. However, one CB is sufficient. Reconfigure the
CB configuration to free up 1 CB.

Change-Id: I43316d073c17605ebe3566eb9fcaaba592fc8805
Signed-off-by: default avatarLakshmi Narayana Kalavala <lkalaval@codeaurora.org>
parent af289785
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -520,24 +520,24 @@
			compatible = "qcom,msm-smmu-v1-ctx";
			reg = <0xfda4c000 0x1000>;
			interrupts = <0 65 0>;
			qcom,iommu-ctx-sids = <0>;
			label = "vfe0";
			qcom,iommu-ctx-sids = <0 1>;
			label = "vfe";
		};

		qcom,iommu-ctx@fda4d000 {
			compatible = "qcom,msm-smmu-v1-ctx";
			reg = <0xfda4d000 0x1000>;
			interrupts = <0 65 0>;
			qcom,iommu-ctx-sids = <1>;
			label = "vfe1";
			qcom,iommu-ctx-sids = <2>;
			label = "cpp";
		};

		qcom,iommu-ctx@fda4e000 {
			compatible = "qcom,msm-smmu-v1-ctx";
			reg = <0xfda4e000 0x1000>;
			interrupts = <0 65 0>;
			qcom,iommu-ctx-sids = <2>;
			label = "cpp";
			qcom,iommu-ctx-sids = <>;
			label = "vfe_secure";
		};
	};

+3 −4
Original line number Diff line number Diff line
@@ -1376,9 +1376,8 @@ static int msm_vfe40_get_platform_data(struct vfe_device *vfe_dev)
		goto vfe_no_resource;
	}

	vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe0");
	vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe1");
	if (!vfe_dev->iommu_ctx[0] || !vfe_dev->iommu_ctx[1]) {
	vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe");
	if (!vfe_dev->iommu_ctx[0]) {
		pr_err("%s: cannot get iommu_ctx\n", __func__);
		rc = -ENODEV;
		goto vfe_no_resource;
@@ -1430,7 +1429,7 @@ static struct v4l2_subdev_internal_ops msm_vfe40_internal_ops = {
};

struct msm_vfe_hardware_info vfe40_hw_info = {
	.num_iommu_ctx = 2,
	.num_iommu_ctx = 1,
	.vfe_clk_idx = VFE40_CLK_IDX,
	.vfe_ops = {
		.irq_ops = {
+3 −4
Original line number Diff line number Diff line
@@ -1264,9 +1264,8 @@ static int msm_vfe44_get_platform_data(struct vfe_device *vfe_dev)
		goto vfe_no_resource;
	}

	vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe0");
	vfe_dev->iommu_ctx[1] = msm_iommu_get_ctx("vfe1");
	if (!vfe_dev->iommu_ctx[0] || !vfe_dev->iommu_ctx[1]) {
	vfe_dev->iommu_ctx[0] = msm_iommu_get_ctx("vfe");
	if (!vfe_dev->iommu_ctx[0]) {
		pr_err("%s: cannot get iommu_ctx\n", __func__);
		rc = -ENODEV;
		goto vfe_no_resource;
@@ -1319,7 +1318,7 @@ static struct v4l2_subdev_internal_ops msm_vfe44_internal_ops = {
};

struct msm_vfe_hardware_info vfe44_hw_info = {
	.num_iommu_ctx = 2,
	.num_iommu_ctx = 1,
	.vfe_clk_idx = VFE44_CLK_IDX,
	.vfe_ops = {
		.irq_ops = {