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

Commit 47e9d4bb authored by Shrenuj Bansal's avatar Shrenuj Bansal
Browse files

msm: kgsl: Add a mechanism to enable secured MMU



MSM8996 has a different probe mechanism for the kgsl iommu node
since that node now exists in the GPU devicetree and is managed by
us. Therefore, enable the secured MMU if the secure context is
found while the DT is being parsed.

Change-Id: I037c2f78cc780e7e53dca0b31b9583355e46ee6c
Signed-off-by: default avatarShrenuj Bansal <shrenujb@codeaurora.org>
parent f9e5bba8
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1099,6 +1099,12 @@ int adreno_probe(struct platform_device *pdev)
	/* Identify the specific GPU */
	adreno_identify_gpu(adreno_dev);

	status = kgsl_device_platform_probe(device);
	if (status) {
		device->pdev = NULL;
		return status;
	}

	/*
	 * qcom,iommu-secure-id is used to identify MMUs that can handle secure
	 * content but that is only part of the story - the GPU also has to be
@@ -1110,12 +1116,6 @@ int adreno_probe(struct platform_device *pdev)
	if (!ADRENO_FEATURE(adreno_dev, ADRENO_CONTENT_PROTECTION))
		device->mmu.secured = false;

	status = kgsl_device_platform_probe(device);
	if (status) {
		device->pdev = NULL;
		return status;
	}

	status = adreno_ringbuffer_init(device);
	if (status)
		goto out;
+1 −0
Original line number Diff line number Diff line
@@ -747,6 +747,7 @@ static int _get_iommu_ctxs(struct kgsl_mmu *mmu)
		} else if (!strcmp("gfx3d_secure",
				data->iommu_ctxs[i].iommu_ctx_name)) {
			ctx = &iommu->ctx[KGSL_IOMMU_CONTEXT_SECURE];
			mmu->secured = true;
		} else if (!strcmp("gfx3d_spare",
				data->iommu_ctxs[i].iommu_ctx_name)) {
			continue;