video: tegra: host: Clean up includes
Terje Bergstrom [Mon, 14 May 2012 09:37:19 +0000 (14:37 +0530)]
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>

Conflicts:

drivers/video/tegra/host/t30/t30.c

Rebase-Id: Re434074b07fef536d493fe27043e2b70eac3b93c

26 files changed:
drivers/video/tegra/dc/dc_priv.h
drivers/video/tegra/host/bus_client.c
drivers/video/tegra/host/chip_support.h
drivers/video/tegra/host/debug.c
drivers/video/tegra/host/dev.c
drivers/video/tegra/host/dev.h
drivers/video/tegra/host/gr3d/gr3d.c
drivers/video/tegra/host/gr3d/gr3d_t20.c
drivers/video/tegra/host/gr3d/gr3d_t30.c
drivers/video/tegra/host/host1x/host1x_cdma.c
drivers/video/tegra/host/host1x/host1x_channel.c
drivers/video/tegra/host/host1x/host1x_debug.c
drivers/video/tegra/host/host1x/host1x_hwctx.h
drivers/video/tegra/host/host1x/host1x_intr.c
drivers/video/tegra/host/host1x/host1x_syncpt.c
drivers/video/tegra/host/mpe/mpe.c
drivers/video/tegra/host/nvhost_cdma.c
drivers/video/tegra/host/nvhost_cdma.h
drivers/video/tegra/host/nvhost_channel.c
drivers/video/tegra/host/nvhost_channel.h
drivers/video/tegra/host/nvhost_intr.c
drivers/video/tegra/host/nvhost_job.c
drivers/video/tegra/host/nvhost_syncpt.c
drivers/video/tegra/host/nvhost_syncpt.h
drivers/video/tegra/host/t20/t20.c
drivers/video/tegra/host/t30/t30.c

index 6bee4bd..f62abe0 100644 (file)
@@ -26,6 +26,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>
index 9202120..3b362b0 100644 (file)
 #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)
index 6727e7a..6e32feb 100644 (file)
 
 #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 {
index 91436c9..b7adb0e 100644 (file)
@@ -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;
index f3cd67a..fbc0b7d 100644 (file)
 
 #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"
 
@@ -80,7 +82,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;
 
index 74d7e16..70199d8 100644 (file)
 #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;
index 22c3e20..21782e6 100644 (file)
@@ -30,6 +30,7 @@
 #include "dev.h"
 #include "gr3d.h"
 #include "bus_client.h"
+#include "nvhost_channel.h"
 
 #ifndef TEGRA_POWERGATE_3D1
 #define TEGRA_POWERGATE_3D1    -1
index 9ca990f..e3a887d 100644 (file)
@@ -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"
index ab4d04f..01eac53 100644 (file)
@@ -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"
index cdd6026..0876202 100644 (file)
@@ -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"
index b16a34f..04c5d06 100644 (file)
@@ -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>
index 1a1d764..46ae9c1 100644 (file)
 
 #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
index 7587642..b5046c4 100644 (file)
@@ -24,6 +24,7 @@
 #define __NVHOST_HOST1X_HWCTX_H
 
 #include <linux/kref.h>
+#include "nvhost_hwctx.h"
 
 struct nvhost_hwctx_handler;
 struct nvhost_channel;
index 47e984e..6d2aedb 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
 #include "nvhost_intr.h"
 #include "dev.h"
index b431fa3..d0de494 100644 (file)
@@ -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"
index 31aca92..31fb464 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <linux/module.h>
 #include "nvhost_hwctx.h"
+#include "nvhost_channel.h"
 #include "dev.h"
 #include "host1x/host1x_hardware.h"
 #include "host1x/host1x_channel.h"
index 775d761..7ebb0c8 100644 (file)
@@ -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>
 
index 9cb9b82..9583fbb 100644 (file)
@@ -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;
index afbac6f..129a41c 100644 (file)
@@ -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>
index 7b946c8..4a67596 100644 (file)
 #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;
index 7c4bdc7..d1f7d69 100644 (file)
 
 #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 ***/
 
index a4f0cfc..5cd04a3 100644 (file)
@@ -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 */
index 16a2210..cba6f44 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/slab.h>
 #include <linux/stat.h>
 #include "nvhost_syncpt.h"
+#include "nvhost_acm.h"
 #include "dev.h"
 
 #define MAX_STUCK_CHECK_COUNT 15
index b71cb3e..966a49f 100644 (file)
@@ -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,
index 24ddedc..19967cb 100644 (file)
  */
 
 #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)
index f36e74d..68c9789 100644 (file)
 
 #include <linux/mutex.h>
 #include <linux/kernel.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)