summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a_scale.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-06-08 08:22:30 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-06-27 12:14:04 -0400
commit61d4e27607c0ce4080ef02daeb09200181662337 (patch)
tree3dd3e7428e1d9c5c32c29062f96de4fa1e77d054 /drivers/gpu/nvgpu/gk20a/gk20a_scale.h
parenta445a678bcf480bde01ab784ab050096fd5725eb (diff)
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 <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1161161 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_scale.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a_scale.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.h b/drivers/gpu/nvgpu/gk20a/gk20a_scale.h
index 5c8618eb..025c2070 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a_scale.h
@@ -47,11 +47,18 @@ void gk20a_scale_notify_idle(struct device *);
47 47
48void gk20a_scale_suspend(struct device *); 48void gk20a_scale_suspend(struct device *);
49void gk20a_scale_resume(struct device *); 49void gk20a_scale_resume(struct device *);
50int gk20a_scale_qos_notify(struct notifier_block *nb,
51 unsigned long n, void *p);
50#else 52#else
51static inline void gk20a_scale_notify_busy(struct device *dev) {} 53static inline void gk20a_scale_notify_busy(struct device *dev) {}
52static inline void gk20a_scale_notify_idle(struct device *dev) {} 54static inline void gk20a_scale_notify_idle(struct device *dev) {}
53static inline void gk20a_scale_suspend(struct device *dev) {} 55static inline void gk20a_scale_suspend(struct device *dev) {}
54static inline void gk20a_scale_resume(struct device *dev) {} 56static inline void gk20a_scale_resume(struct device *dev) {}
57static inline int gk20a_scale_qos_notify(struct notifier_block *nb,
58 unsigned long n, void *p)
59{
60 return -ENOSYS;
61}
55#endif 62#endif
56 63
57#endif 64#endif