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

Commit 99612257 authored by Deepak Kumar's avatar Deepak Kumar
Browse files

msm: kgsl: Overwrite the existing snapshot only if GMU is enabled



For a GPU fault, we always want the first snapshot to debug it,
whether the GPU recovers or not. Don't overwrite an existing
GPU fault snapshot if GMU is not enabled or supported.

Change-Id: I305fb1f190a95d624a0b6379b18bf51e3df2b470
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent 20768179
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -660,10 +660,12 @@ void kgsl_device_snapshot(struct kgsl_device *device,
	device->snapshot_faultcount++;

	/*
	 * Overwrite a non-GMU fault snapshot if a GMU fault occurs.
	 * Overwrite a fault snapshot only if GMU is
	 * enabled and we managed to recover from it.
	 */
	if (device->snapshot != NULL) {
		if (!device->prioritize_unrecoverable ||
		if (!gmu_core_gpmu_isenabled(device) ||
			!device->prioritize_unrecoverable ||
				!device->snapshot->recovered)
			return;