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

Commit 120f1814 authored by Deepak Kumar's avatar Deepak Kumar
Browse files

msm: kgsl: Add gpu_frequency trace during SLUMBER entry and exit



Add gpu_frequency trace during SLUMBER entry and exit. This is
needed to track GPU frequency across idle and active state
transitions.

Change-Id: Ib782805a1776e4c0fb879fc34dc2e1cd11cf6791
Signed-off-by: default avatarDeepak Kumar <dkumar@codeaurora.org>
parent 69fb9a27
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2667,6 +2667,7 @@ static int _wake(struct kgsl_device *device)
{
	struct kgsl_pwrctrl *pwr = &device->pwrctrl;
	int status = 0;
	unsigned int state = device->state;

	switch (device->state) {
	case KGSL_STATE_SUSPEND:
@@ -2693,6 +2694,9 @@ static int _wake(struct kgsl_device *device)
		/* Turn on the core clocks */
		kgsl_pwrctrl_clk(device, KGSL_PWRFLAGS_ON, KGSL_STATE_ACTIVE);

		if (state == KGSL_STATE_SLUMBER || state == KGSL_STATE_SUSPEND)
			trace_gpu_frequency(
			pwr->pwrlevels[pwr->active_pwrlevel].gpu_freq/1000, 0);
		/*
		 * No need to turn on/off irq here as it no longer affects
		 * power collapse
@@ -2898,6 +2902,7 @@ _slumber(struct kgsl_device *device)
		kgsl_pwrctrl_clk_set_options(device, false);
		kgsl_pwrctrl_disable(device);
		kgsl_pwrscale_sleep(device);
		trace_gpu_frequency(0, 0);
		kgsl_pwrctrl_set_state(device, KGSL_STATE_SLUMBER);
		pm_qos_update_request(&device->pwrctrl.pm_qos_req_dma,
						PM_QOS_DEFAULT_VALUE);
@@ -2913,6 +2918,7 @@ _slumber(struct kgsl_device *device)
		break;
	case KGSL_STATE_AWARE:
		kgsl_pwrctrl_disable(device);
		trace_gpu_frequency(0, 0);
		kgsl_pwrctrl_set_state(device, KGSL_STATE_SLUMBER);
		break;
	default: