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

Commit 4300d0f4 authored by Carter Cooper's avatar Carter Cooper
Browse files

msm: kgsl: Limit snapshot when GMU fails to boot



The GMU boots first thing. If this fails then not everything
will be setup and ready for snapshots. Limit the snapshot for
GMU boot failures.

Change-Id: I8db1d66ed89a1562401c707ce4997ee3df1d2c45
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent 5a186617
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -837,6 +837,7 @@ void adreno_snapshot(struct kgsl_device *device, struct kgsl_snapshot *snapshot,

	snapshot_frozen_objsize = 0;

	if (!IS_ERR(context))
		setup_fault_process(device, snapshot,
			context ? context->proc_priv : NULL);

+1 −1
Original line number Diff line number Diff line
@@ -1364,7 +1364,7 @@ static void gmu_snapshot(struct kgsl_device *device)
		/* Wait for the NMI to be handled */
		wmb();
		udelay(100);
		kgsl_device_snapshot(device, NULL);
		kgsl_device_snapshot(device, ERR_PTR(-EINVAL));

		adreno_write_gmureg(adreno_dev,
				ADRENO_REG_GMU_GMU2HOST_INTR_CLR, 0xFFFFFFFF);
+5 −2
Original line number Diff line number Diff line
@@ -182,6 +182,7 @@ static size_t snapshot_os(struct kgsl_device *device,
	context = kgsl_context_get(device, header->current_context);

	/* Get the current PT base */
	if (!IS_ERR(priv))
		header->ptbase = kgsl_mmu_get_current_ttbr0(&device->mmu);

	/* And the PID for the task leader */
@@ -633,8 +634,10 @@ void kgsl_device_snapshot(struct kgsl_device *device,
	snapshot->size += sizeof(*header);

	/* Build the Linux specific header */
	/* Context err is implied a GMU fault, so limit dump */
	kgsl_snapshot_add_section(device, KGSL_SNAPSHOT_SECTION_OS,
			snapshot, snapshot_os, NULL);
			snapshot, snapshot_os,
			IS_ERR(context) ? context : NULL);

	/* Get the device specific sections */
	if (device->ftbl->snapshot)