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

Commit 94df0727 authored by Shrenuj Bansal's avatar Shrenuj Bansal
Browse files

msm: kgsl: Do not attach secure PT if already attached



Add a check to see if the secure PT has already been attached and
do not try to keep attaching it over and over during
kgsl_iommu_start().

Change-Id: If9b4cb2408890d1d19c2a4f39f7ce10db1c86286
Signed-off-by: default avatarShrenuj Bansal <shrenujb@codeaurora.org>
parent 7d0b0926
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1003,11 +1003,13 @@ static int _setup_secure_context(struct kgsl_mmu *mmu)
	}
	iommu_pt = mmu->securepagetable->priv;

	if (!iommu_pt->attached) {
		ret = iommu_attach_device(iommu_pt->domain, ctx->dev);
		if (ret) {
			KGSL_CORE_ERR("Failed to attach, err %d\n", ret);
			goto done;
		}
	}
	ctx->default_pt = mmu->securepagetable;

	ret = iommu_domain_get_attr(iommu_pt->domain, DOMAIN_ATTR_CONTEXT_BANK,