From 02b8cda953f7ff0cc9750b79b62712609da9d6ad Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 6 Dec 2016 20:59:58 +0530 Subject: gpu: nvgpu: store last_freq in gk20a struct In gk20a_scale_target(), to check for duplicate freq requests we compare current frequency with devfreq->previous_freq But for very first request after boot, we have devfreq->previous_freq set to MIN freq And in case we evaluate new frew as MIN freq then we skip calling postscale() and scaling of EMC clock This results in keeping EMC at MAX value To fix this, add new variable last_freq in gk20a structure. Use this variable to store frequency value and to compare for duplicate requests Bug 200255163 Bug 200257544 Change-Id: Icfc57234c63f68cce8ccf8221237105272dad853 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1263747 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 49c2a348..02d3ffe0 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -950,6 +950,7 @@ struct gk20a { struct devfreq *devfreq; struct gk20a_scale_profile *scale_profile; + unsigned long last_freq; struct gk20a_ctxsw_trace *ctxsw_trace; struct gk20a_fecs_trace *fecs_trace; -- cgit v1.2.2