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

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

Merge "msm_11ad: set geometry attr when SMMU stage1 is enabled"

parents 155c23df 6f55f741
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -643,6 +643,9 @@ static int msm_11ad_smmu_init(struct msm11ad_ctx *ctx)
	int rc;
	int force_pt_coherent = 1;
	int smmu_bypass = !ctx->smmu_s1_en;
	dma_addr_t iova_base = 0;
	dma_addr_t iova_end =  ctx->smmu_base + ctx->smmu_size - 1;
	struct iommu_domain_geometry geometry;

	if (!ctx->use_smmu)
		return 0;
@@ -700,6 +703,17 @@ static int msm_11ad_smmu_init(struct msm11ad_ctx *ctx)
					rc);
				goto release_mapping;
			}
			memset(&geometry, 0, sizeof(geometry));
			geometry.aperture_start = iova_base;
			geometry.aperture_end = iova_end;
			rc = iommu_domain_set_attr(ctx->mapping->domain,
						   DOMAIN_ATTR_GEOMETRY,
						   &geometry);
			if (rc) {
				dev_err(ctx->dev, "Set geometry attribute to SMMU failed (%d)\n",
					rc);
				goto release_mapping;
			}
		}
	}