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 | |
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>
-rw-r--r-- | drivers/gpu/nvgpu/Makefile | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/driver_common.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/module.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/scale.c (renamed from drivers/gpu/nvgpu/gk20a/gk20a_scale.c) | 32 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/scale.h (renamed from drivers/gpu/nvgpu/gk20a/gk20a_scale.h) | 24 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/vgpu.c | 2 |
8 files changed, 28 insertions, 40 deletions
diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index f1a6f267..06d3dedb 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile | |||
@@ -180,7 +180,7 @@ nvgpu-$(CONFIG_COMMON_CLK) += \ | |||
180 | common/linux/clk.o | 180 | common/linux/clk.o |
181 | 181 | ||
182 | nvgpu-$(CONFIG_GK20A_DEVFREQ) += \ | 182 | nvgpu-$(CONFIG_GK20A_DEVFREQ) += \ |
183 | gk20a/gk20a_scale.o | 183 | common/linux/scale.o |
184 | 184 | ||
185 | nvgpu-$(CONFIG_GK20A_CYCLE_STATS) += \ | 185 | nvgpu-$(CONFIG_GK20A_CYCLE_STATS) += \ |
186 | gk20a/css_gr_gk20a.o | 186 | gk20a/css_gr_gk20a.o |
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index e4a65692..759607a2 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <nvgpu/enabled.h> | 23 | #include <nvgpu/enabled.h> |
24 | #include <nvgpu/debug.h> | 24 | #include <nvgpu/debug.h> |
25 | 25 | ||
26 | #include "gk20a/gk20a_scale.h" | 26 | #include "scale.h" |
27 | #include "gk20a/gk20a.h" | 27 | #include "gk20a/gk20a.h" |
28 | #include "gk20a/platform_gk20a.h" | 28 | #include "gk20a/platform_gk20a.h" |
29 | #include "module.h" | 29 | #include "module.h" |
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 4f66fc67..d0abc836 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include "gk20a/platform_gk20a.h" | 35 | #include "gk20a/platform_gk20a.h" |
36 | #include "sysfs.h" | 36 | #include "sysfs.h" |
37 | #include "vgpu/vgpu.h" | 37 | #include "vgpu/vgpu.h" |
38 | #include "gk20a/gk20a_scale.h" | 38 | #include "scale.h" |
39 | #include "gk20a/ctxsw_trace_gk20a.h" | 39 | #include "gk20a/ctxsw_trace_gk20a.h" |
40 | #include "pci.h" | 40 | #include "pci.h" |
41 | #include "module.h" | 41 | #include "module.h" |
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c index 5786feab..2d6d156c 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | |||
@@ -48,9 +48,9 @@ | |||
48 | 48 | ||
49 | #include "gk20a/gk20a.h" | 49 | #include "gk20a/gk20a.h" |
50 | #include "gk20a/platform_gk20a.h" | 50 | #include "gk20a/platform_gk20a.h" |
51 | #include "gk20a/gk20a_scale.h" | ||
52 | #include "gm20b/clk_gm20b.h" | 51 | #include "gm20b/clk_gm20b.h" |
53 | 52 | ||
53 | #include "scale.h" | ||
54 | #include "clk.h" | 54 | #include "clk.h" |
55 | #include "os_linux.h" | 55 | #include "os_linux.h" |
56 | 56 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c index e5d19976..fb8686c2 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | |||
@@ -35,11 +35,11 @@ | |||
35 | 35 | ||
36 | #include "gk20a/platform_gk20a.h" | 36 | #include "gk20a/platform_gk20a.h" |
37 | #include "gk20a/gk20a.h" | 37 | #include "gk20a/gk20a.h" |
38 | #include "gk20a/gk20a_scale.h" | ||
39 | 38 | ||
40 | #include "platform_gk20a_tegra.h" | 39 | #include "platform_gk20a_tegra.h" |
41 | #include "gp10b/platform_gp10b.h" | 40 | #include "gp10b/platform_gp10b.h" |
42 | #include "platform_gp10b_tegra.h" | 41 | #include "platform_gp10b_tegra.h" |
42 | #include "scale.h" | ||
43 | 43 | ||
44 | /* Select every GP10B_FREQ_SELECT_STEP'th frequency from h/w table */ | 44 | /* Select every GP10B_FREQ_SELECT_STEP'th frequency from h/w table */ |
45 | #define GP10B_FREQ_SELECT_STEP 8 | 45 | #define GP10B_FREQ_SELECT_STEP 8 |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c b/drivers/gpu/nvgpu/common/linux/scale.c index ae426eec..05f09dcc 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c +++ b/drivers/gpu/nvgpu/common/linux/scale.c | |||
@@ -3,23 +3,17 @@ | |||
3 | * | 3 | * |
4 | * Copyright (c) 2013-2017, NVIDIA Corporation. All rights reserved. | 4 | * Copyright (c) 2013-2017, NVIDIA Corporation. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms and conditions of the GNU General Public License, |
8 | * to deal in the Software without restriction, including without limitation | 8 | * version 2, as published by the Free Software Foundation. |
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 | * | 9 | * |
13 | * The above copyright notice and this permission notice shall be included in | 10 | * This program is distributed in the hope it will be useful, but WITHOUT |
14 | * all copies or substantial portions of the Software. | 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. | ||
15 | * | 14 | * |
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 15 | * You should have received a copy of the GNU General Public License |
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
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 | */ | 17 | */ |
24 | 18 | ||
25 | #include <linux/devfreq.h> | 19 | #include <linux/devfreq.h> |
@@ -32,10 +26,10 @@ | |||
32 | #include <nvgpu/kmem.h> | 26 | #include <nvgpu/kmem.h> |
33 | #include <nvgpu/log.h> | 27 | #include <nvgpu/log.h> |
34 | 28 | ||
35 | #include "gk20a.h" | 29 | #include "gk20a/gk20a.h" |
36 | #include "platform_gk20a.h" | 30 | #include "gk20a/platform_gk20a.h" |
37 | #include "gk20a_scale.h" | 31 | #include "scale.h" |
38 | #include "common/linux/os_linux.h" | 32 | #include "os_linux.h" |
39 | 33 | ||
40 | /* | 34 | /* |
41 | * gk20a_scale_qos_notify() | 35 | * gk20a_scale_qos_notify() |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.h b/drivers/gpu/nvgpu/common/linux/scale.h index 05dc2e12..c1e6fe86 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.h +++ b/drivers/gpu/nvgpu/common/linux/scale.h | |||
@@ -3,23 +3,17 @@ | |||
3 | * | 3 | * |
4 | * Copyright (c) 2013-2016, NVIDIA Corporation. All rights reserved. | 4 | * Copyright (c) 2013-2016, NVIDIA Corporation. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * under the terms and conditions of the GNU General Public License, |
8 | * to deal in the Software without restriction, including without limitation | 8 | * version 2, as published by the Free Software Foundation. |
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 | * | 9 | * |
13 | * The above copyright notice and this permission notice shall be included in | 10 | * This program is distributed in the hope it will be useful, but WITHOUT |
14 | * all copies or substantial portions of the Software. | 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. | ||
15 | * | 14 | * |
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | 15 | * You should have received a copy of the GNU General Public License |
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
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 | */ | 17 | */ |
24 | 18 | ||
25 | #ifndef GK20A_SCALE_H | 19 | #ifndef GK20A_SCALE_H |
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 14a19f56..70214676 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c | |||
@@ -40,13 +40,13 @@ | |||
40 | #include "vgpu/clk_vgpu.h" | 40 | #include "vgpu/clk_vgpu.h" |
41 | #include "gk20a/ctxsw_trace_gk20a.h" | 41 | #include "gk20a/ctxsw_trace_gk20a.h" |
42 | #include "gk20a/tsg_gk20a.h" | 42 | #include "gk20a/tsg_gk20a.h" |
43 | #include "gk20a/gk20a_scale.h" | ||
44 | #include "gk20a/channel_gk20a.h" | 43 | #include "gk20a/channel_gk20a.h" |
45 | #include "gm20b/hal_gm20b.h" | 44 | #include "gm20b/hal_gm20b.h" |
46 | 45 | ||
47 | #include "common/linux/module.h" | 46 | #include "common/linux/module.h" |
48 | #include "common/linux/os_linux.h" | 47 | #include "common/linux/os_linux.h" |
49 | #include "common/linux/ioctl.h" | 48 | #include "common/linux/ioctl.h" |
49 | #include "common/linux/scale.h" | ||
50 | 50 | ||
51 | #ifdef CONFIG_TEGRA_19x_GPU | 51 | #ifdef CONFIG_TEGRA_19x_GPU |
52 | #include <vgpu/vgpu_t19x.h> | 52 | #include <vgpu/vgpu_t19x.h> |