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

Commit 7a714cdb authored by Kyle Piefer's avatar Kyle Piefer
Browse files

msm: kgsl: Use GMU cold boot sequence for hard reset



During GPU hang recovery, KGSL goes to STATE_RESET.
When starting GMU from STATE_RESET, use the cold boot
initialization sequence instead of the warm boot
sequence. This provides a completely clean starting point.

CRs-Fixed: 2062271
Change-Id: Ie9b628775e61e05fd2231e167657882581b681d1
Signed-off-by: default avatarKyle Piefer <kpiefer@codeaurora.org>
parent 72f16cf8
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1348,6 +1348,8 @@ static int a6xx_gmu_fw_start(struct kgsl_device *device,
	int ret, i;

	switch (boot_state) {
	case GMU_RESET:
		/* fall through */
	case GMU_COLD_BOOT:
		/* Turn on the HM and SPTP head switches */
		ret = a6xx_hm_sptprac_enable(device);
@@ -1363,6 +1365,10 @@ static int a6xx_gmu_fw_start(struct kgsl_device *device,
			ret = a6xx_hm_sptprac_enable(device);
			if (ret)
				return ret;
		} else if (boot_state == GMU_RESET) {
			ret = a6xx_hm_sptprac_enable(device);
			if (ret)
				return ret;
		} else {
			ret = a6xx_rpmh_power_on_gpu(device);
			if (ret)
@@ -1390,11 +1396,6 @@ static int a6xx_gmu_fw_start(struct kgsl_device *device,
		if (ret)
			return ret;
		break;
	case GMU_RESET:
		/* Turn on the HM and SPTP head switches */
		ret = a6xx_hm_sptprac_enable(device);
		if (ret)
			return ret;
	default:
		break;
	}
+1 −1
Original line number Diff line number Diff line
@@ -1418,7 +1418,7 @@ int gmu_start(struct kgsl_device *device)

			gmu_irq_enable(device);

			ret = hfi_start(gmu, GMU_WARM_BOOT);
			ret = hfi_start(gmu, GMU_COLD_BOOT);
			if (ret)
				goto error_gpu;