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

Commit 455c5e88 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: Set the secure vmid domain attribute"

parents fb120b75 f8c83ddd
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include <linux/slab.h>
#include <linux/iommu.h>
#include <linux/msm_kgsl.h>
#include <soc/qcom/secure_buffer.h>
#include <stddef.h>

#include "kgsl.h"
@@ -558,6 +559,16 @@ static int kgsl_iommu_init_pt(struct kgsl_mmu *mmu, struct kgsl_pagetable *pt)
	iommu_domain_set_attr(iommu_pt->domain,
			DOMAIN_ATTR_COHERENT_HTW_DISABLE, &disable_htw);

	/* Provide the secure vmid domain attribute to the SMMU driver */
	if (pt->name == KGSL_MMU_SECURE_PT) {
		int secure_vmid = VMID_CP_PIXEL;

		ret = iommu_domain_set_attr(iommu_pt->domain,
			DOMAIN_ATTR_SECURE_VMID, &secure_vmid);
		if (ret)
			goto err;
	}

	pt->pt_ops = &iommu_pt_ops;
	pt->priv = iommu_pt;

+1 −4
Original line number Diff line number Diff line
@@ -825,10 +825,7 @@ kgsl_mmu_map(struct kgsl_pagetable *pagetable,
	if (kgsl_memdesc_has_guard_page(memdesc))
		size += kgsl_memdesc_guard_page_size(memdesc);

	if (KGSL_MMU_TYPE_IOMMU != kgsl_mmu_get_mmutype())
		spin_lock(&pagetable->lock);
	ret = pagetable->pt_ops->mmu_map(pagetable, memdesc);
	if (KGSL_MMU_TYPE_IOMMU == kgsl_mmu_get_mmutype())
	spin_lock(&pagetable->lock);

	if (ret)