diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c index 85a5018db..3625706c3 100644 --- a/drivers/gpu/nvgpu/clk/clk_arb.c +++ b/drivers/gpu/nvgpu/clk/clk_arb.c @@ -15,14 +15,13 @@ #include #include #include -#include -#include #include #include #include #include #include +#include #include #include diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c index ce9a41761..c0976aa21 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c @@ -18,9 +18,9 @@ #include #include #include -#include #include +#include #include #include "ioctl_ctrl.h" diff --git a/drivers/gpu/nvgpu/common/linux/kmem.c b/drivers/gpu/nvgpu/common/linux/kmem.c index 864848884..87aeb1849 100644 --- a/drivers/gpu/nvgpu/common/linux/kmem.c +++ b/drivers/gpu/nvgpu/common/linux/kmem.c @@ -14,7 +14,6 @@ * along with this program. If not, see . */ -#include #include #include #include diff --git a/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c b/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c index b32da9457..88051b38c 100644 --- a/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/bitmap_allocator.c @@ -14,9 +14,7 @@ * along with this program. If not, see . */ -#include -#include - +#include #include #include diff --git a/drivers/gpu/nvgpu/common/mm/buddy_allocator.c b/drivers/gpu/nvgpu/common/mm/buddy_allocator.c index 06cd79111..81f82c601 100644 --- a/drivers/gpu/nvgpu/common/mm/buddy_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/buddy_allocator.c @@ -14,8 +14,6 @@ * along with this program. If not, see . */ -#include - #include #include diff --git a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c index ed9dadd39..93c870b50 100644 --- a/drivers/gpu/nvgpu/common/mm/lockless_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/lockless_allocator.c @@ -14,7 +14,6 @@ * along with this program. If not, see . */ -#include #include #include diff --git a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c index b8e713eb7..b84855b50 100644 --- a/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/nvgpu_allocator.c @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -#include - #include #include "gk20a/gk20a.h" diff --git a/drivers/gpu/nvgpu/common/mm/page_allocator.c b/drivers/gpu/nvgpu/common/mm/page_allocator.c index 1e5fae3d2..41ce28a78 100644 --- a/drivers/gpu/nvgpu/common/mm/page_allocator.c +++ b/drivers/gpu/nvgpu/common/mm/page_allocator.c @@ -14,10 +14,9 @@ * along with this program. If not, see . */ -#include -#include #include +#include #include #include #include diff --git a/drivers/gpu/nvgpu/gk20a/bus_gk20a.h b/drivers/gpu/nvgpu/gk20a/bus_gk20a.h index b2f8f8c97..72710c354 100644 --- a/drivers/gpu/nvgpu/gk20a/bus_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/bus_gk20a.h @@ -16,6 +16,8 @@ #ifndef BUS_GK20A_H #define BUS_GK20A_H +#include + struct gk20a; struct gpu_ops; struct nvgpu_mem; diff --git a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c index 76237e034..48a60f5d5 100644 --- a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c @@ -16,10 +16,10 @@ * along with this program. If not, see . */ -#include #include #include +#include #include #include #include diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c index 4b3bb83cf..4d5854d4b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/gpu/nvgpu/gk20a/hal.h b/drivers/gpu/nvgpu/gk20a/hal.h index da02cf5f6..4203dbfa6 100644 --- a/drivers/gpu/nvgpu/gk20a/hal.h +++ b/drivers/gpu/nvgpu/gk20a/hal.h @@ -16,8 +16,6 @@ #ifndef __HAL_GPU__ #define __HAL_GPU__ -#include - struct gk20a; int gpu_init_hal(struct gk20a *g); diff --git a/drivers/gpu/nvgpu/gk20a/hal_gk20a.h b/drivers/gpu/nvgpu/gk20a/hal_gk20a.h index f214432a8..f5475809e 100644 --- a/drivers/gpu/nvgpu/gk20a/hal_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/hal_gk20a.h @@ -18,8 +18,6 @@ #ifndef __HAL_GK20A__ #define __HAL_GK20A__ -#include - struct gk20a; int gk20a_init_hal(struct gk20a *g); diff --git a/drivers/gpu/nvgpu/gk20a/kind_gk20a.c b/drivers/gpu/nvgpu/gk20a/kind_gk20a.c index 00e7a54c0..4e9ebe4bb 100644 --- a/drivers/gpu/nvgpu/gk20a/kind_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/kind_gk20a.c @@ -1,9 +1,7 @@ /* - * drivers/video/tegra/host/gk20a/kind_gk20a.c - * * GK20A memory kind management * - * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -18,8 +16,6 @@ * this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. */ -#include -#include #include "kind_gk20a.h" diff --git a/drivers/gpu/nvgpu/gk20a/kind_gk20a.h b/drivers/gpu/nvgpu/gk20a/kind_gk20a.h index 93f011d4a..9dec84a56 100644 --- a/drivers/gpu/nvgpu/gk20a/kind_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/kind_gk20a.h @@ -21,6 +21,7 @@ #ifndef __KIND_GK20A_H__ #define __KIND_GK20A_H__ +#include void gk20a_init_uncompressed_kind_map(void); void gk20a_init_kind_attr(void); diff --git a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c index f8416d550..0d4d62b8f 100644 --- a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c @@ -16,8 +16,6 @@ * along with this program. If not, see . */ -#include - #include #include #include diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c index ecc96a7b4..b5619db77 100644 --- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c @@ -14,7 +14,6 @@ */ #include -#include #include #include #include diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.c b/drivers/gpu/nvgpu/gp106/xve_gp106.c index 077409c5a..b47097e24 100644 --- a/drivers/gpu/nvgpu/gp106/xve_gp106.c +++ b/drivers/gpu/nvgpu/gp106/xve_gp106.c @@ -15,7 +15,6 @@ */ #include -#include #include #include diff --git a/drivers/gpu/nvgpu/include/nvgpu/bitops.h b/drivers/gpu/nvgpu/include/nvgpu/bitops.h new file mode 100644 index 000000000..0cd297b63 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/bitops.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * + * 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. + * + * 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. + */ +#ifndef __NVGPU_BITOPS_H__ +#define __NVGPU_BITOPS_H__ + +#ifdef __KERNEL__ +#include +#endif + +#endif diff --git a/drivers/gpu/nvgpu/include/nvgpu/log.h b/drivers/gpu/nvgpu/include/nvgpu/log.h index f42fbedc4..e16aaa922 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/log.h +++ b/drivers/gpu/nvgpu/include/nvgpu/log.h @@ -17,6 +17,9 @@ #ifndef __NVGPU_DEBUGGING_H__ #define __NVGPU_DEBUGGING_H__ +#include +#include + struct gk20a; enum nvgpu_log_type { diff --git a/drivers/gpu/nvgpu/vgpu/css_vgpu.c b/drivers/gpu/nvgpu/vgpu/css_vgpu.c index 142d9ce16..cca8766b3 100644 --- a/drivers/gpu/nvgpu/vgpu/css_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/css_vgpu.c @@ -15,8 +15,6 @@ */ #if defined(CONFIG_GK20A_CYCLE_STATS) -#include -#include #include #include diff --git a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c b/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c index 0ba8db563..23da728e9 100644 --- a/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c +++ b/drivers/gpu/nvgpu/vgpu/gk20a/vgpu_gr_gk20a.c @@ -11,8 +11,6 @@ * more details. */ -#include - #include "gk20a/gk20a.h" #include "vgpu_gr_gk20a.h" diff --git a/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c b/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c index 8e44eda48..945e24fc1 100644 --- a/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c +++ b/drivers/gpu/nvgpu/vgpu/gm20b/vgpu_gr_gm20b.c @@ -11,8 +11,6 @@ * more details. */ -#include - #include "gk20a/gk20a.h" #include "vgpu_gr_gm20b.h" diff --git a/drivers/gpu/nvgpu/vgpu/sysfs_vgpu.c b/drivers/gpu/nvgpu/vgpu/sysfs_vgpu.c index d43a34aa9..5a9f1fee5 100644 --- a/drivers/gpu/nvgpu/vgpu/sysfs_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/sysfs_vgpu.c @@ -12,7 +12,6 @@ */ #include -#include #include #include "vgpu/vgpu.h" diff --git a/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c b/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c index 8a0276f7f..701be345b 100644 --- a/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/tsg_vgpu.c @@ -14,7 +14,6 @@ * along with this program. If not, see . */ -#include #include #include "gk20a/gk20a.h" diff --git a/include/linux/tegra_vgpu.h b/include/linux/tegra_vgpu.h index d9a6f7fde..2c30ff06f 100644 --- a/include/linux/tegra_vgpu.h +++ b/include/linux/tegra_vgpu.h @@ -19,6 +19,8 @@ #ifndef __TEGRA_VGPU_H #define __TEGRA_VGPU_H +#include + enum { TEGRA_VGPU_MODULE_GPU = 0, };