diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2012-04-26 12:26:30 +0300 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2012-05-04 13:31:22 -0700 |
commit | 8d709aefa05d224373c0337f1aa35c39fd50431c (patch) | |
tree | f4d22dcf06678b82351c19e19fddd40f1c959aff /drivers/video | |
parent | f0a6d53915df7ab072a55380f4361df83f5ad3ad (diff) |
video: tegra: host: Clean up includes
Clean up #includes. Replace #includes with forward declarations where
possible, and remove extraneous #includes.
Bug 871237
Change-Id: I6942e0c632b42ad7009589ebdd78def88ae4baa4
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/99046
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Diffstat (limited to 'drivers/video')
26 files changed, 57 insertions, 30 deletions
diff --git a/drivers/video/tegra/dc/dc_priv.h b/drivers/video/tegra/dc/dc_priv.h index a91c42a5edc4..c08cd12f5a22 100644 --- a/drivers/video/tegra/dc/dc_priv.h +++ b/drivers/video/tegra/dc/dc_priv.h @@ -27,6 +27,7 @@ #include <mach/dc.h> #include "../host/dev.h" +#include "../host/nvhost_acm.h" #include "../host/host1x/host1x_syncpt.h" #include <mach/tegra_dc_ext.h> diff --git a/drivers/video/tegra/host/bus_client.c b/drivers/video/tegra/host/bus_client.c index b49c26e04f29..a3dc3781f81c 100644 --- a/drivers/video/tegra/host/bus_client.c +++ b/drivers/video/tegra/host/bus_client.c @@ -44,6 +44,11 @@ #include "debug.h" #include "bus_client.h" #include "dev.h" +#include "nvhost_acm.h" + +#include "nvhost_channel.h" +#include "nvhost_job.h" +#include "nvhost_hwctx.h" void nvhost_read_module_regs(struct nvhost_device *ndev, u32 offset, int count, u32 *values) diff --git a/drivers/video/tegra/host/chip_support.h b/drivers/video/tegra/host/chip_support.h index 6727e7a69fb4..6e32feb9676e 100644 --- a/drivers/video/tegra/host/chip_support.h +++ b/drivers/video/tegra/host/chip_support.h @@ -22,20 +22,20 @@ #include <linux/types.h> struct output; + +struct nvhost_master; +struct nvhost_intr; +struct nvhost_syncpt; struct nvhost_waitchk; struct nvhost_userctx_timeout; -struct nvhost_master; struct nvhost_channel; struct nvmap_handle; struct nvmap_client; struct nvhost_hwctx; struct nvhost_cdma; -struct nvhost_intr; +struct nvhost_job; struct push_buffer; -struct nvhost_syncpt; -struct nvhost_master; struct dentry; -struct nvhost_job; struct nvhost_chip_support { struct { diff --git a/drivers/video/tegra/host/debug.c b/drivers/video/tegra/host/debug.c index 91436c903fc6..b7adb0e573eb 100644 --- a/drivers/video/tegra/host/debug.c +++ b/drivers/video/tegra/host/debug.c @@ -24,6 +24,8 @@ #include "dev.h" #include "debug.h" +#include "nvhost_acm.h" +#include "nvhost_channel.h" pid_t nvhost_debug_null_kickoff_pid; unsigned int nvhost_debug_trace_cmdbuf; diff --git a/drivers/video/tegra/host/dev.c b/drivers/video/tegra/host/dev.c index 2e1ffeea7729..d21719bcda56 100644 --- a/drivers/video/tegra/host/dev.c +++ b/drivers/video/tegra/host/dev.c @@ -36,16 +36,18 @@ #include <linux/nvhost.h> #include <linux/nvhost_ioctl.h> -#include <mach/nvmap.h> #include <mach/gpufuse.h> #include <mach/hardware.h> #include <mach/iomap.h> #include "debug.h" -#include "nvhost_job.h" #include "t20/t20.h" #include "t30/t30.h" #include "bus_client.h" +#include "nvhost_acm.h" +#include <mach/nvmap.h> +#include "nvhost_channel.h" +#include "nvhost_job.h" #define DRIVER_NAME "host1x" @@ -79,7 +81,8 @@ static int nvhost_ctrlrelease(struct inode *inode, struct file *filp) static int nvhost_ctrlopen(struct inode *inode, struct file *filp) { - struct nvhost_master *host = container_of(inode->i_cdev, struct nvhost_master, cdev); + struct nvhost_master *host = + container_of(inode->i_cdev, struct nvhost_master, cdev); struct nvhost_ctrl_userctx *priv; u32 *mod_locks; diff --git a/drivers/video/tegra/host/dev.h b/drivers/video/tegra/host/dev.h index 74d7e16fc272..70199d8a5914 100644 --- a/drivers/video/tegra/host/dev.h +++ b/drivers/video/tegra/host/dev.h @@ -21,10 +21,9 @@ #ifndef __NVHOST_DEV_H #define __NVHOST_DEV_H -#include "nvhost_acm.h" +#include <linux/cdev.h> #include "nvhost_syncpt.h" #include "nvhost_intr.h" -#include "nvhost_channel.h" #include "chip_support.h" #define TRACE_MAX_LENGTH 128U @@ -34,6 +33,7 @@ extern int nvhost_major; extern int nvhost_minor; struct nvhost_hwctx; +struct nvhost_channel; struct nvhost_master { void __iomem *aperture; diff --git a/drivers/video/tegra/host/gr3d/gr3d.c b/drivers/video/tegra/host/gr3d/gr3d.c index f387d54e585e..da3d498a398f 100644 --- a/drivers/video/tegra/host/gr3d/gr3d.c +++ b/drivers/video/tegra/host/gr3d/gr3d.c @@ -29,6 +29,7 @@ #include "dev.h" #include "gr3d.h" #include "bus_client.h" +#include "nvhost_channel.h" #ifndef TEGRA_POWERGATE_3D1 #define TEGRA_POWERGATE_3D1 -1 diff --git a/drivers/video/tegra/host/gr3d/gr3d_t20.c b/drivers/video/tegra/host/gr3d/gr3d_t20.c index 9ca990f89077..e3a887d34b96 100644 --- a/drivers/video/tegra/host/gr3d/gr3d_t20.c +++ b/drivers/video/tegra/host/gr3d/gr3d_t20.c @@ -19,6 +19,7 @@ */ #include "nvhost_hwctx.h" +#include "nvhost_channel.h" #include "dev.h" #include "host1x/host1x_channel.h" #include "host1x/host1x_hardware.h" diff --git a/drivers/video/tegra/host/gr3d/gr3d_t30.c b/drivers/video/tegra/host/gr3d/gr3d_t30.c index ab4d04f89ab2..01eac53d0608 100644 --- a/drivers/video/tegra/host/gr3d/gr3d_t30.c +++ b/drivers/video/tegra/host/gr3d/gr3d_t30.c @@ -19,6 +19,8 @@ */ #include "nvhost_hwctx.h" +#include "nvhost_channel.h" +#include "nvhost_cdma.h" #include "dev.h" #include "host1x/host1x_hardware.h" #include "host1x/host1x_syncpt.h" diff --git a/drivers/video/tegra/host/host1x/host1x_cdma.c b/drivers/video/tegra/host/host1x/host1x_cdma.c index cdd6026718b1..08762020f366 100644 --- a/drivers/video/tegra/host/host1x/host1x_cdma.c +++ b/drivers/video/tegra/host/host1x/host1x_cdma.c @@ -19,7 +19,9 @@ */ #include <linux/slab.h> +#include "nvhost_acm.h" #include "nvhost_cdma.h" +#include "nvhost_channel.h" #include "dev.h" #include "host1x_hardware.h" diff --git a/drivers/video/tegra/host/host1x/host1x_channel.c b/drivers/video/tegra/host/host1x/host1x_channel.c index b16a34f416ab..04c5d0629ec2 100644 --- a/drivers/video/tegra/host/host1x/host1x_channel.c +++ b/drivers/video/tegra/host/host1x/host1x_channel.c @@ -20,6 +20,8 @@ #include "nvhost_channel.h" #include "dev.h" +#include "nvhost_acm.h" +#include "nvhost_job.h" #include "nvhost_hwctx.h" #include <trace/events/nvhost.h> #include <linux/slab.h> diff --git a/drivers/video/tegra/host/host1x/host1x_debug.c b/drivers/video/tegra/host/host1x/host1x_debug.c index 1a1d764bbd63..46ae9c1db019 100644 --- a/drivers/video/tegra/host/host1x/host1x_debug.c +++ b/drivers/video/tegra/host/host1x/host1x_debug.c @@ -25,10 +25,10 @@ #include "dev.h" #include "debug.h" +#include "host1x_hardware.h" #include "nvhost_cdma.h" +#include "nvhost_channel.h" #include "../../nvmap/nvmap.h" - -#include "host1x_hardware.h" #include "host1x_cdma.h" #define NVHOST_DEBUG_MAX_PAGE_OFFSET 102400 diff --git a/drivers/video/tegra/host/host1x/host1x_hwctx.h b/drivers/video/tegra/host/host1x/host1x_hwctx.h index 7587642d0e14..b5046c461d9d 100644 --- a/drivers/video/tegra/host/host1x/host1x_hwctx.h +++ b/drivers/video/tegra/host/host1x/host1x_hwctx.h @@ -24,6 +24,7 @@ #define __NVHOST_HOST1X_HWCTX_H #include <linux/kref.h> +#include "nvhost_hwctx.h" struct nvhost_hwctx_handler; struct nvhost_channel; diff --git a/drivers/video/tegra/host/host1x/host1x_intr.c b/drivers/video/tegra/host/host1x/host1x_intr.c index 47e984e2943e..6d2aedbb9803 100644 --- a/drivers/video/tegra/host/host1x/host1x_intr.c +++ b/drivers/video/tegra/host/host1x/host1x_intr.c @@ -20,6 +20,7 @@ #include <linux/interrupt.h> #include <linux/irq.h> +#include <linux/io.h> #include "nvhost_intr.h" #include "dev.h" diff --git a/drivers/video/tegra/host/host1x/host1x_syncpt.c b/drivers/video/tegra/host/host1x/host1x_syncpt.c index b431fa350638..d0de49463993 100644 --- a/drivers/video/tegra/host/host1x/host1x_syncpt.c +++ b/drivers/video/tegra/host/host1x/host1x_syncpt.c @@ -19,7 +19,9 @@ */ #include <linux/nvhost_ioctl.h> +#include <linux/io.h> #include "nvhost_syncpt.h" +#include "nvhost_acm.h" #include "dev.h" #include "host1x_syncpt.h" #include "host1x_hardware.h" diff --git a/drivers/video/tegra/host/mpe/mpe.c b/drivers/video/tegra/host/mpe/mpe.c index 36d1d6f26682..8d599a44adc3 100644 --- a/drivers/video/tegra/host/mpe/mpe.c +++ b/drivers/video/tegra/host/mpe/mpe.c @@ -19,6 +19,7 @@ */ #include "nvhost_hwctx.h" +#include "nvhost_channel.h" #include "dev.h" #include "host1x/host1x_hardware.h" #include "host1x/host1x_channel.h" diff --git a/drivers/video/tegra/host/nvhost_cdma.c b/drivers/video/tegra/host/nvhost_cdma.c index 775d761e65c9..7ebb0c8b4020 100644 --- a/drivers/video/tegra/host/nvhost_cdma.c +++ b/drivers/video/tegra/host/nvhost_cdma.c @@ -19,6 +19,9 @@ */ #include "nvhost_cdma.h" +#include "nvhost_channel.h" +#include "nvhost_job.h" +#include "nvhost_hwctx.h" #include "dev.h" #include <asm/cacheflush.h> diff --git a/drivers/video/tegra/host/nvhost_cdma.h b/drivers/video/tegra/host/nvhost_cdma.h index 9cb9b8277254..9583fbbe5b16 100644 --- a/drivers/video/tegra/host/nvhost_cdma.h +++ b/drivers/video/tegra/host/nvhost_cdma.h @@ -28,8 +28,6 @@ #include <mach/nvmap.h> #include <linux/list.h> -#include "nvhost_acm.h" - struct nvhost_syncpt; struct nvhost_userctx_timeout; struct nvhost_job; diff --git a/drivers/video/tegra/host/nvhost_channel.c b/drivers/video/tegra/host/nvhost_channel.c index afbac6fe4c4e..129a41cc2f42 100644 --- a/drivers/video/tegra/host/nvhost_channel.c +++ b/drivers/video/tegra/host/nvhost_channel.c @@ -20,6 +20,7 @@ #include "nvhost_channel.h" #include "dev.h" +#include "nvhost_acm.h" #include "nvhost_job.h" #include <trace/events/nvhost.h> #include <linux/nvhost_ioctl.h> diff --git a/drivers/video/tegra/host/nvhost_channel.h b/drivers/video/tegra/host/nvhost_channel.h index 7b946c8ee853..4a67596c7cd7 100644 --- a/drivers/video/tegra/host/nvhost_channel.h +++ b/drivers/video/tegra/host/nvhost_channel.h @@ -21,13 +21,9 @@ #ifndef __NVHOST_CHANNEL_H #define __NVHOST_CHANNEL_H -#include "nvhost_cdma.h" -#include "nvhost_acm.h" -#include "nvhost_hwctx.h" -#include "nvhost_job.h" - #include <linux/cdev.h> #include <linux/io.h> +#include "nvhost_cdma.h" #define NVHOST_MAX_WAIT_CHECKS 256 #define NVHOST_MAX_GATHERS 512 @@ -37,6 +33,8 @@ struct nvhost_master; struct nvhost_waitchk; struct nvhost_device; +struct nvhost_channel; +struct nvhost_hwctx; struct nvhost_channel_gather { u32 words; diff --git a/drivers/video/tegra/host/nvhost_intr.c b/drivers/video/tegra/host/nvhost_intr.c index 7c4bdc7bafb6..d1f7d69fa5f1 100644 --- a/drivers/video/tegra/host/nvhost_intr.c +++ b/drivers/video/tegra/host/nvhost_intr.c @@ -20,14 +20,13 @@ #include "nvhost_intr.h" #include "dev.h" +#include "nvhost_acm.h" #include <linux/interrupt.h> #include <linux/slab.h> #include <linux/irq.h> #include <trace/events/nvhost.h> - - - - +#include "nvhost_channel.h" +#include "nvhost_hwctx.h" /*** Wait list management ***/ diff --git a/drivers/video/tegra/host/nvhost_job.c b/drivers/video/tegra/host/nvhost_job.c index a4f0cfc44212..5cd04a3a78a1 100644 --- a/drivers/video/tegra/host/nvhost_job.c +++ b/drivers/video/tegra/host/nvhost_job.c @@ -25,6 +25,7 @@ #include <mach/nvmap.h> #include "nvhost_channel.h" #include "nvhost_job.h" +#include "nvhost_hwctx.h" #include "dev.h" /* Magic to use to fill freed handle slots */ diff --git a/drivers/video/tegra/host/nvhost_syncpt.c b/drivers/video/tegra/host/nvhost_syncpt.c index 13ad0fc3a3cf..d69883ee51b2 100644 --- a/drivers/video/tegra/host/nvhost_syncpt.c +++ b/drivers/video/tegra/host/nvhost_syncpt.c @@ -22,6 +22,7 @@ #include <linux/platform_device.h> #include <linux/slab.h> #include "nvhost_syncpt.h" +#include "nvhost_acm.h" #include "dev.h" #define MAX_STUCK_CHECK_COUNT 15 diff --git a/drivers/video/tegra/host/nvhost_syncpt.h b/drivers/video/tegra/host/nvhost_syncpt.h index b71cb3e6287e..966a49fbd92c 100644 --- a/drivers/video/tegra/host/nvhost_syncpt.h +++ b/drivers/video/tegra/host/nvhost_syncpt.h @@ -27,9 +27,6 @@ #include <mach/nvmap.h> #include <linux/atomic.h> -struct nvhost_syncpt; -struct nvhost_waitchk; - /* host managed and invalid syncpt id */ #define NVSYNCPT_GRAPHICS_HOST (0) #define NVSYNCPT_INVALID (-1) @@ -151,6 +148,7 @@ static inline int nvhost_syncpt_wait(struct nvhost_syncpt *sp, u32 id, u32 thres * @param: wait - start of filled in array of waitchk structs * @param: waitend - end ptr (one beyond last valid waitchk) */ +struct nvhost_waitchk; int nvhost_syncpt_wait_check(struct nvhost_syncpt *sp, struct nvmap_client *nvmap, u32 mask, diff --git a/drivers/video/tegra/host/t20/t20.c b/drivers/video/tegra/host/t20/t20.c index 24ddedc842e4..19967cb8c7a4 100644 --- a/drivers/video/tegra/host/t20/t20.c +++ b/drivers/video/tegra/host/t20/t20.c @@ -19,17 +19,19 @@ */ #include <linux/slab.h> +#include <linux/nvhost_ioctl.h> #include <mach/powergate.h> #include "dev.h" #include "t20.h" -#include "host1x/host1x_channel.h" #include "host1x/host1x_syncpt.h" #include "host1x/host1x_hardware.h" -#include "host1x/host1x_cdma.h" #include "gr3d/gr3d.h" #include "gr3d/gr3d_t20.h" #include "mpe/mpe.h" #include "nvhost_hwctx.h" +#include "nvhost_channel.h" +#include "host1x/host1x_channel.h" +#include "host1x/host1x_cdma.h" #define NVMODMUTEX_2D_FULL (1) #define NVMODMUTEX_2D_SIMPLE (2) diff --git a/drivers/video/tegra/host/t30/t30.c b/drivers/video/tegra/host/t30/t30.c index fb69d4e0f57a..fce8081df332 100644 --- a/drivers/video/tegra/host/t30/t30.c +++ b/drivers/video/tegra/host/t30/t30.c @@ -19,19 +19,21 @@ */ #include <linux/mutex.h> +#include <linux/nvhost_ioctl.h> #include <mach/powergate.h> #include <mach/iomap.h> #include "dev.h" #include "t20/t20.h" #include "t30.h" #include "gr3d/gr3d.h" -#include "mpe/mpe.h" #include "gr3d/gr3d_t30.h" #include "gr3d/scale3d.h" +#include "mpe/mpe.h" #include "host1x/host1x_hardware.h" -#include "host1x/host1x_cdma.h" #include "host1x/host1x_syncpt.h" #include "chip_support.h" +#include "nvhost_channel.h" +#include "host1x/host1x_cdma.h" #define NVMODMUTEX_2D_FULL (1) #define NVMODMUTEX_2D_SIMPLE (2) |