summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a_scale.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_scale.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a_scale.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.h b/drivers/gpu/nvgpu/gk20a/gk20a_scale.h
new file mode 100644
index 00000000..e76b1662
--- /dev/null
+++ b/drivers/gpu/nvgpu/gk20a/gk20a_scale.h
@@ -0,0 +1,51 @@
1/*
2 * gk20a clock scaling profile
3 *
4 * Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef GK20A_SCALE_H
20#define GK20A_SCALE_H
21
22#include <linux/nvhost.h>
23#include <linux/devfreq.h>
24
25struct platform_device;
26struct clk;
27
28struct gk20a_scale_profile {
29 struct platform_device *pdev;
30 ktime_t last_event_time;
31 struct devfreq_dev_profile devfreq_profile;
32 struct devfreq_dev_status dev_stat;
33 struct notifier_block qos_notify_block;
34 void *private_data;
35};
36
37/* Initialization and de-initialization for module */
38void gk20a_scale_init(struct platform_device *);
39void gk20a_scale_hw_init(struct platform_device *pdev);
40
41/*
42 * call when performing submit to notify scaling mechanism that the module is
43 * in use
44 */
45void gk20a_scale_notify_busy(struct platform_device *);
46void gk20a_scale_notify_idle(struct platform_device *);
47
48void gk20a_scale_suspend(struct platform_device *);
49void gk20a_scale_resume(struct platform_device *);
50
51#endif