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

Commit b35dc209 authored by Hareesh Gundu's avatar Hareesh Gundu
Browse files

msm: kgsl: Wait for pending irqs completion in gmu suspend



Ensure that adreno irqs are done in gmu suspend to avoid
race with gmu_suspend() and adreno_irq_handler(). This will
fix un-clocked register access in the adreno_irq_handler()
if it races with gmu suspend path.

Change-Id: Idd16defdd2a86b511c7dd13fc0c8704b29c7ee18
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
parent 29444f60
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -2840,6 +2840,7 @@ _aware(struct kgsl_device *device)
	case KGSL_STATE_RESET:
	case KGSL_STATE_RESET:
		if (!gmu_core_gpmu_isenabled(device))
		if (!gmu_core_gpmu_isenabled(device))
			break;
			break;
		kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF);
		status = gmu_core_start(device);
		status = gmu_core_start(device);
		break;
		break;
	case KGSL_STATE_INIT:
	case KGSL_STATE_INIT:
@@ -2904,6 +2905,7 @@ _aware(struct kgsl_device *device)
				 * to make sure next attempt to wake up
				 * to make sure next attempt to wake up
				 * GMU/GPU is indeed a fresh start.
				 * GMU/GPU is indeed a fresh start.
				 */
				 */
				kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF);
				gmu_core_suspend(device);
				gmu_core_suspend(device);
				kgsl_pwrctrl_set_state(device, state);
				kgsl_pwrctrl_set_state(device, state);
			} else {
			} else {