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

Commit fefd98c4 authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
Browse files

msm: kgsl: Remove IRQ on/off sequence from nap state



Do not disable/enable irq when device goes into and comes out of
nap. Instead, move the disable/enable to when the device goes
into and comes out of slumber. This reduces the nap latency
and increases performance.

CRs-Fixed: 730433
Change-Id: I00f209d4049c4e8d354e3656198f5acc2221c958
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
parent cceaa310
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1612,18 +1612,22 @@ static int _wake(struct kgsl_device *device)
	case KGSL_STATE_SLEEP:
		kgsl_pwrctrl_axi(device, KGSL_PWRFLAGS_ON);
		kgsl_pwrscale_wake(device);
		kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_ON);
		/* fall through */
	case KGSL_STATE_NAP:
		/* Turn on the core clocks */
		kgsl_pwrctrl_clk(device, KGSL_PWRFLAGS_ON, KGSL_STATE_ACTIVE);
		/* Enable state before turning on irq */
		kgsl_pwrctrl_set_state(device, KGSL_STATE_ACTIVE);
		kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_ON);

		/*
		 * No need to turn on/off irq here as it no longer affects
		 * power collapse
		 */

		/* Change register settings if any after pwrlevel change*/
		kgsl_pwrctrl_pwrlevel_change_settings(device, 1, 1);
		/* All settings for power level transitions are complete*/
		pwr->previous_pwrlevel = pwr->active_pwrlevel;

		mod_timer(&device->idle_timer, jiffies +
				device->pwrctrl.interval_timeout);
		pm_qos_update_request(&device->pwrctrl.pm_qos_req_dma,
@@ -1664,7 +1668,6 @@ _nap(struct kgsl_device *device)
		*/
		kgsl_pwrscale_update_stats(device);

		kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF);
		kgsl_pwrctrl_clk(device, KGSL_PWRFLAGS_OFF, KGSL_STATE_NAP);
		kgsl_pwrctrl_set_state(device, KGSL_STATE_NAP);
	case KGSL_STATE_NAP:
@@ -1731,6 +1734,7 @@ _slumber(struct kgsl_device *device)
		device->ftbl->suspend_context(device);
		device->ftbl->stop(device);
		kgsl_pwrscale_sleep(device);
		kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_OFF);
		kgsl_pwrctrl_set_state(device, KGSL_STATE_SLUMBER);
		pm_qos_update_request(&device->pwrctrl.pm_qos_req_dma,
						PM_QOS_DEFAULT_VALUE);