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

Commit ed24a32f authored by Akhil P Oommen's avatar Akhil P Oommen Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Skip crashdumper if MMU is not attached



Crashdumper requires its context bank initialized and a valid pagetable
attached. So skip crasdumper if this is not the case during recovery.

This check is required because GMU might leave GX HS ON before we
initialize MMU during GPU wake up which in turn will trigger crashdumper
while collecting snapshot.

Change-Id: I6b3852718139cd2a2241b526755bfc797ac1f76a
Signed-off-by: default avatarAkhil P Oommen <akhilpo@codeaurora.org>
parent bc91cb8c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1603,6 +1603,8 @@ static void _a6xx_do_crashdump(struct kgsl_device *device)
	if (a6xx_capturescript.gpuaddr == 0 ||
		a6xx_crashdump_registers.gpuaddr == 0)
		return;
	if (!test_bit(KGSL_MMU_STARTED, &device->mmu.flags))
		return;

	/* IF the SMMU is stalled we cannot do a crash dump */
	kgsl_regread(device, A6XX_RBBM_STATUS3, &val);
+5 −1
Original line number Diff line number Diff line
@@ -1675,7 +1675,9 @@ static int kgsl_iommu_start(struct kgsl_mmu *mmu)
	}

	/* Make sure the hardware is programmed to the default pagetable */
	return kgsl_iommu_set_pt(mmu, mmu->defaultpagetable);
	kgsl_iommu_set_pt(mmu, mmu->defaultpagetable);
	set_bit(KGSL_MMU_STARTED, &mmu->flags);
	return 0;
}

static int
@@ -2052,6 +2054,8 @@ static void kgsl_iommu_stop(struct kgsl_mmu *mmu)
		for (i = 0; i < KGSL_IOMMU_CONTEXT_MAX; i++)
			_detach_context(&iommu->ctx[i]);
	}

	clear_bit(KGSL_MMU_STARTED, &mmu->flags);
}

static u64
+1 −0
Original line number Diff line number Diff line
@@ -695,6 +695,7 @@ static struct kgsl_pagetable *nommu_getpagetable(struct kgsl_mmu *mmu,
static int nommu_init(struct kgsl_mmu *mmu)
{
	mmu->features |= KGSL_MMU_GLOBAL_PAGETABLE;
	set_bit(KGSL_MMU_STARTED, &mmu->flags);
	return 0;
}

+3 −0
Original line number Diff line number Diff line
@@ -164,6 +164,9 @@ struct kgsl_mmu {
	} priv;
};

/* KGSL MMU FLAGS */
#define KGSL_MMU_STARTED BIT(0)

#define KGSL_IOMMU_PRIV(_device) (&((_device)->mmu.priv.iommu))

extern struct kgsl_mmu_ops kgsl_iommu_ops;