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

Commit 07dd1ef1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Recover GPU from adreno_stop failure"

parents 98ff4b94 b95afc42
Loading
Loading
Loading
Loading
+12 −2
Original line number Original line Diff line number Diff line
@@ -1872,10 +1872,20 @@ static int adreno_stop(struct kgsl_device *device)
				OOB_GPU_CHECK_MASK,
				OOB_GPU_CHECK_MASK,
				OOB_GPU_CLEAR_MASK);
				OOB_GPU_CLEAR_MASK);
		if (error) {
		if (error) {
			struct gmu_device *gmu = &device->gmu;

			gpudev->oob_clear(adreno_dev, OOB_GPU_CLEAR_MASK);
			gpudev->oob_clear(adreno_dev, OOB_GPU_CLEAR_MASK);
			if (gmu->gx_gdsc &&
				regulator_is_enabled(gmu->gx_gdsc)) {
				/* GPU is on. Try recovery */
				set_bit(GMU_FAULT, &gmu->flags);
				gmu_snapshot(device);
				error = -EINVAL;
			} else {
				return error;
				return error;
			}
			}
		}
		}
	}


	adreno_dispatcher_stop(adreno_dev);
	adreno_dispatcher_stop(adreno_dev);


@@ -1907,7 +1917,7 @@ static int adreno_stop(struct kgsl_device *device)
	 * GMU to return to the lowest idle level. This is
	 * GMU to return to the lowest idle level. This is
	 * because some idle level transitions require VBIF and MMU.
	 * because some idle level transitions require VBIF and MMU.
	 */
	 */
	if (gpudev->wait_for_lowest_idle &&
	if (!error && gpudev->wait_for_lowest_idle &&
			gpudev->wait_for_lowest_idle(adreno_dev)) {
			gpudev->wait_for_lowest_idle(adreno_dev)) {
		struct gmu_device *gmu = &device->gmu;
		struct gmu_device *gmu = &device->gmu;