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

Commit 9bc827fe authored by Shrenuj Bansal's avatar Shrenuj Bansal
Browse files

msm: kgsl: Populate the compat virtual pt regions for the secure pt



When mapping an external dma buffer, if the FORCE_32BIT flag is
set we use the compat_va_start and end to look for our gpuaddr.
Hence, we need to populate those fields when initializing the
secure pagetable.

Change-Id: Icbbf90c05fa2b949fb1191c6a89edad28392fc2a
Signed-off-by: default avatarShrenuj Bansal <shrenujb@codeaurora.org>
parent d96b4bb7
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -485,6 +485,8 @@ static void setup_64bit_pagetable(struct kgsl_mmu *mmu,
		struct kgsl_iommu_pt *pt)
		struct kgsl_iommu_pt *pt)
{
{
	if (mmu->secured && pagetable->name == KGSL_MMU_SECURE_PT) {
	if (mmu->secured && pagetable->name == KGSL_MMU_SECURE_PT) {
		pt->compat_va_start = KGSL_IOMMU_SECURE_BASE;
		pt->compat_va_end = KGSL_IOMMU_SECURE_END;
		pt->va_start = KGSL_IOMMU_SECURE_BASE;
		pt->va_start = KGSL_IOMMU_SECURE_BASE;
		pt->va_end = KGSL_IOMMU_SECURE_END;
		pt->va_end = KGSL_IOMMU_SECURE_END;
	} else {
	} else {
@@ -512,6 +514,8 @@ static void setup_32bit_pagetable(struct kgsl_mmu *mmu,
{
{
	if (mmu->secured) {
	if (mmu->secured) {
		if (pagetable->name == KGSL_MMU_SECURE_PT) {
		if (pagetable->name == KGSL_MMU_SECURE_PT) {
			pt->compat_va_start = KGSL_IOMMU_SECURE_BASE;
			pt->compat_va_end = KGSL_IOMMU_SECURE_END;
			pt->va_start = KGSL_IOMMU_SECURE_BASE;
			pt->va_start = KGSL_IOMMU_SECURE_BASE;
			pt->va_end = KGSL_IOMMU_SECURE_END;
			pt->va_end = KGSL_IOMMU_SECURE_END;
		} else {
		} else {