From 61d4e27607c0ce4080ef02daeb09200181662337 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 8 Jun 2016 17:52:30 +0530 Subject: gpu: nvgpu: add QoS notifier for common clk framework Define specific QoS notifier for common clk framework and protect it with CONFIG_COMMON_CLK This new API will first get min/max requirements from pm_qos and set min/max freq values in devfreq A call to update_devfreq() will then ensure that new estimated frequency is clipped appropriately between min and max values This also ensures that frequency is set along with all the book-keeping Add below platform specific notifier callback and use it with pm_qos_add_notifier() int (*qos_notify)() If qos_notify is set, then only register the callback We currently support only one qos_id which is treated as notifier for min frequency Remove dependency on qos_id, and use appropriate QoS APIs like pm_qos_read_min/max_bound() Store devfreq's min/max frequency in struct gk20a for reference Bug 1772462 Change-Id: I63d6d17451d19c9d376b67df7db775b38929287d Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1161161 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h index 66d97915..a753201b 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h @@ -181,10 +181,11 @@ struct gk20a_platform { * this governor to be used in scaling */ const char *devfreq_governor; - /* Quality of service id. If this is set, the scaling routines - * will register a callback to id. Each time we receive a new value, - * the postscale callback gets called. */ - int qos_id; + /* Quality of service notifier callback. If this is set, the scaling + * routines will register a callback to Qos. Each time we receive + * a new value, this callback gets called. */ + int (*qos_notify)(struct notifier_block *nb, + unsigned long n, void *p); /* Called as part of debug dump. If the gpu gets hung, this function * is responsible for delivering all necessary debug data of other -- cgit v1.2.2