diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-10-30 15:52:52 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-01 13:55:41 -0400 |
commit | 15e259bc5255e891f776a84b5f28a97ea0567178 (patch) | |
tree | ca4a92cafe8e01b8bdb87c0bbdc5fc18913af841 /drivers/gpu/nvgpu/gk20a/gk20a_scale.h | |
parent | 964a849d6176da362c375d7d72b94289e9b905de (diff) |
gpu: nvgpu: Move gk20a_scale to be Linux only
Move gk20a_scale.[ch] to be common/linux/scale.[ch]. The code is
Linux specific, and only referred from Linux specific source files.
Change the license back to GPL.
JIRA NVGPU-259
Change-Id: I89fa905a1fea4f93c826ddfe2ffce34aefc1b0a2
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1588650
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a_scale.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_scale.h | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.h b/drivers/gpu/nvgpu/gk20a/gk20a_scale.h deleted file mode 100644 index 05dc2e12..00000000 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.h +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | /* | ||
2 | * gk20a clock scaling profile | ||
3 | * | ||
4 | * Copyright (c) 2013-2016, NVIDIA Corporation. All rights reserved. | ||
5 | * | ||
6 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
7 | * copy of this software and associated documentation files (the "Software"), | ||
8 | * to deal in the Software without restriction, including without limitation | ||
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
10 | * and/or sell copies of the Software, and to permit persons to whom the | ||
11 | * Software is furnished to do so, subject to the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice shall be included in | ||
14 | * all copies or substantial portions of the Software. | ||
15 | * | ||
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
22 | * DEALINGS IN THE SOFTWARE. | ||
23 | */ | ||
24 | |||
25 | #ifndef GK20A_SCALE_H | ||
26 | #define GK20A_SCALE_H | ||
27 | |||
28 | #include <linux/devfreq.h> | ||
29 | |||
30 | struct clk; | ||
31 | |||
32 | struct gk20a_scale_profile { | ||
33 | struct device *dev; | ||
34 | ktime_t last_event_time; | ||
35 | struct devfreq_dev_profile devfreq_profile; | ||
36 | struct devfreq_dev_status dev_stat; | ||
37 | struct notifier_block qos_notify_block; | ||
38 | unsigned long qos_min_freq; | ||
39 | unsigned long qos_max_freq; | ||
40 | void *private_data; | ||
41 | }; | ||
42 | |||
43 | /* Initialization and de-initialization for module */ | ||
44 | void gk20a_scale_init(struct device *); | ||
45 | void gk20a_scale_exit(struct device *); | ||
46 | void gk20a_scale_hw_init(struct device *dev); | ||
47 | |||
48 | #if defined(CONFIG_GK20A_DEVFREQ) | ||
49 | /* | ||
50 | * call when performing submit to notify scaling mechanism that the module is | ||
51 | * in use | ||
52 | */ | ||
53 | void gk20a_scale_notify_busy(struct device *); | ||
54 | void gk20a_scale_notify_idle(struct device *); | ||
55 | |||
56 | void gk20a_scale_suspend(struct device *); | ||
57 | void gk20a_scale_resume(struct device *); | ||
58 | int gk20a_scale_qos_notify(struct notifier_block *nb, | ||
59 | unsigned long n, void *p); | ||
60 | #else | ||
61 | static inline void gk20a_scale_notify_busy(struct device *dev) {} | ||
62 | static inline void gk20a_scale_notify_idle(struct device *dev) {} | ||
63 | static inline void gk20a_scale_suspend(struct device *dev) {} | ||
64 | static inline void gk20a_scale_resume(struct device *dev) {} | ||
65 | static inline int gk20a_scale_qos_notify(struct notifier_block *nb, | ||
66 | unsigned long n, void *p) | ||
67 | { | ||
68 | return -ENOSYS; | ||
69 | } | ||
70 | #endif | ||
71 | |||
72 | #endif | ||