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

Commit 78c56cdb authored by Harshdeep Dhatt's avatar Harshdeep Dhatt Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Correctly handle CP_INIT failure



A stuck CP means that we will not be able to enter
slumber because gmu to cp interaction is impacted.
Therefore, take a gmu snapshot which also sets gmu
fault. The gmu fault will indicate the clean up
code to force a gmu_suspend() so as to set the
stage for the next submission to start afresh.

Change-Id: Ia90e6c447e9c1c87e04cf9ca3ed87eed5c17b07c
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent 196183c8
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -3065,7 +3065,15 @@ void adreno_spin_idle_debug(struct adreno_device *adreno_dev,

	dev_err(device->dev, " hwfault=%8.8X\n", hwfault);

	kgsl_device_snapshot(device, NULL, adreno_gmu_gpu_fault(adreno_dev));
	/*
	 * If CP is stuck, gmu may not perform as expected. So force a gmu
	 * snapshot which captures entire state as well as sets the gmu fault
	 * because things need to be reset anyway.
	 */
	if (gmu_core_isenabled(device))
		gmu_core_snapshot(device);
	else
		kgsl_device_snapshot(device, NULL, false);
}

/**