diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index f1a6f267f..06d3dedbd 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile @@ -180,7 +180,7 @@ nvgpu-$(CONFIG_COMMON_CLK) += \ common/linux/clk.o nvgpu-$(CONFIG_GK20A_DEVFREQ) += \ - gk20a/gk20a_scale.o + common/linux/scale.o nvgpu-$(CONFIG_GK20A_CYCLE_STATS) += \ 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 e4a65692f..759607a26 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c @@ -23,7 +23,7 @@ #include #include -#include "gk20a/gk20a_scale.h" +#include "scale.h" #include "gk20a/gk20a.h" #include "gk20a/platform_gk20a.h" #include "module.h" diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 4f66fc67d..d0abc8369 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c @@ -35,7 +35,7 @@ #include "gk20a/platform_gk20a.h" #include "sysfs.h" #include "vgpu/vgpu.h" -#include "gk20a/gk20a_scale.h" +#include "scale.h" #include "gk20a/ctxsw_trace_gk20a.h" #include "pci.h" #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 5786feaba..2d6d156cb 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 @@ #include "gk20a/gk20a.h" #include "gk20a/platform_gk20a.h" -#include "gk20a/gk20a_scale.h" #include "gm20b/clk_gm20b.h" +#include "scale.h" #include "clk.h" #include "os_linux.h" diff --git a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c index e5d19976d..fb8686c21 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 @@ #include "gk20a/platform_gk20a.h" #include "gk20a/gk20a.h" -#include "gk20a/gk20a_scale.h" #include "platform_gk20a_tegra.h" #include "gp10b/platform_gp10b.h" #include "platform_gp10b_tegra.h" +#include "scale.h" /* Select every GP10B_FREQ_SELECT_STEP'th frequency from h/w table */ #define GP10B_FREQ_SELECT_STEP 8 diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c b/drivers/gpu/nvgpu/common/linux/scale.c similarity index 89% rename from drivers/gpu/nvgpu/gk20a/gk20a_scale.c rename to drivers/gpu/nvgpu/common/linux/scale.c index ae426eec4..05f09dcc2 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.c +++ b/drivers/gpu/nvgpu/common/linux/scale.c @@ -3,23 +3,17 @@ * * Copyright (c) 2013-2017, NVIDIA Corporation. All rights reserved. * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include @@ -32,10 +26,10 @@ #include #include -#include "gk20a.h" -#include "platform_gk20a.h" -#include "gk20a_scale.h" -#include "common/linux/os_linux.h" +#include "gk20a/gk20a.h" +#include "gk20a/platform_gk20a.h" +#include "scale.h" +#include "os_linux.h" /* * gk20a_scale_qos_notify() diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_scale.h b/drivers/gpu/nvgpu/common/linux/scale.h similarity index 57% rename from drivers/gpu/nvgpu/gk20a/gk20a_scale.h rename to drivers/gpu/nvgpu/common/linux/scale.h index 05dc2e121..c1e6fe866 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_scale.h +++ b/drivers/gpu/nvgpu/common/linux/scale.h @@ -3,23 +3,17 @@ * * Copyright (c) 2013-2016, NVIDIA Corporation. All rights reserved. * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #ifndef GK20A_SCALE_H diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 14a19f561..702146760 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -40,13 +40,13 @@ #include "vgpu/clk_vgpu.h" #include "gk20a/ctxsw_trace_gk20a.h" #include "gk20a/tsg_gk20a.h" -#include "gk20a/gk20a_scale.h" #include "gk20a/channel_gk20a.h" #include "gm20b/hal_gm20b.h" #include "common/linux/module.h" #include "common/linux/os_linux.h" #include "common/linux/ioctl.h" +#include "common/linux/scale.h" #ifdef CONFIG_TEGRA_19x_GPU #include