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: Deepak Kumar <dkumar@codeaurora.org>
Signed-off-by: Indira Biruduraju <ibirudur@codeaurora.org>
This commit is contained in:
Deepak Kumar 2019-12-11 19:08:22 +05:30 • committed by Indira Biruduraju
commit eff9fa841d

View file

@ -1763,6 +1763,8 @@ static int _wake(struct kgsl_device *device)
kgsl_pwrctrl_axi(device, KGSL_PWRFLAGS_ON);
kgsl_pwrscale_wake(device);
kgsl_pwrctrl_irq(device, KGSL_PWRFLAGS_ON);
trace_gpu_frequency(
pwr->pwrlevels[pwr->active_pwrlevel].gpu_freq/1000, 0);
/* fall through */
case KGSL_STATE_NAP:
/* Turn on the core clocks */
@ -1906,6 +1908,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);
break;
case KGSL_STATE_SUSPEND:
@ -1915,6 +1918,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: