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

Commit 8fe9294f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Dont attach pagetable for unused iommu contextbank"

parents 7fffab94 9d277f45
Loading
Loading
Loading
Loading
+17 −6
Original line number Diff line number Diff line
@@ -722,12 +722,20 @@ static int kgsl_attach_pagetable_iommu_domain(struct kgsl_mmu *mmu)
			 * If there is a 2nd default pagetable then priv domain
			 * is attached to this pagetable
			 */
			if (mmu->priv_bank_table &&
					(KGSL_IOMMU_CONTEXT_PRIV == j))
			if (KGSL_IOMMU_CONTEXT_PRIV == j) {
				if (mmu->priv_bank_table)
					iommu_pt = mmu->priv_bank_table->priv;
			if (mmu->securepagetable &&
					(KGSL_IOMMU_CONTEXT_SECURE == j))
				else
					continue;
			}

			if (KGSL_IOMMU_CONTEXT_SECURE == j) {
				if (mmu->securepagetable)
					iommu_pt = mmu->securepagetable->priv;
				else
					continue;
			}

			if (!iommu_unit->dev[j].attached) {
				ret = iommu_attach_device(iommu_pt->domain,
							iommu_unit->dev[j].dev);
@@ -1547,6 +1555,9 @@ static int kgsl_iommu_start(struct kgsl_mmu *mmu)
		struct kgsl_iommu_unit *iommu_unit = &iommu->iommu_units[i];
		for (j = 0; j < iommu_unit->dev_count; j++) {

			if (!iommu_unit->dev[j].attached)
				continue;

			/*
			 * For IOMMU V1 do not halt IOMMU on pagefault if
			 * FT pagefault policy is set accordingly