From 0e70f3c988b4d13c4c7d323428d444acbfb3f847 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 12 Jun 2012 13:44:15 +0300 Subject: video: tegra: dc: Move #includes from dc_priv.h Move #include directives for nvhost headers from dc_priv.h to the source files that need the #includes. This allows #including dc_priv.h without access to all nvhost headers. Also adds nvhost to the #include path of dc to allow making dev.h a stub in a later commit. Bug 982965 Change-Id: Icfe7084d295f57926195b178174f81047eb01187 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/108225 Reviewed-by: Simone Willett Tested-by: Simone Willett --- drivers/video/tegra/dc/Makefile | 1 + drivers/video/tegra/dc/dc.c | 2 ++ drivers/video/tegra/dc/dc_priv.h | 10 ++++------ drivers/video/tegra/dc/dsi.c | 2 ++ drivers/video/tegra/dc/ext/Makefile | 1 + 5 files changed, 10 insertions(+), 6 deletions(-) (limited to 'drivers/video/tegra') diff --git a/drivers/video/tegra/dc/Makefile b/drivers/video/tegra/dc/Makefile index 8a826412f90c..13f8989f02fd 100644 --- a/drivers/video/tegra/dc/Makefile +++ b/drivers/video/tegra/dc/Makefile @@ -1,4 +1,5 @@ GCOV_PROFILE := y +EXTRA_CFLAGS += -Idrivers/video/tegra/host obj-y += bandwidth.o obj-y += dc.o obj-y += rgb.o diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c index 7c5cacc75358..db4efc95aab1 100644 --- a/drivers/video/tegra/dc/dc.c +++ b/drivers/video/tegra/dc/dc.c @@ -51,6 +51,8 @@ #include "dc_reg.h" #include "dc_config.h" #include "dc_priv.h" +#include "host1x/host1x.h" +#include "host1x/host1x_syncpt.h" #include "nvsd.h" #define TEGRA_CRC_LATCHED_DELAY 34 diff --git a/drivers/video/tegra/dc/dc_priv.h b/drivers/video/tegra/dc/dc_priv.h index 351998683008..a2e77ebf3385 100644 --- a/drivers/video/tegra/dc/dc_priv.h +++ b/drivers/video/tegra/dc/dc_priv.h @@ -27,9 +27,7 @@ #include -#include "../host/dev.h" #include "../host/nvhost_acm.h" -#include "../host/host1x/host1x_syncpt.h" #include #include @@ -152,12 +150,12 @@ struct tegra_dc { static inline void tegra_dc_io_start(struct tegra_dc *dc) { - nvhost_module_busy(nvhost_get_host(dc->ndev)->dev); + nvhost_module_busy(to_nvhost_device(dc->ndev->dev.parent)); } static inline void tegra_dc_io_end(struct tegra_dc *dc) { - nvhost_module_idle(nvhost_get_host(dc->ndev)->dev); + nvhost_module_idle(to_nvhost_device(dc->ndev->dev.parent)); } static inline unsigned long tegra_dc_readl(struct tegra_dc *dc, @@ -165,7 +163,7 @@ static inline unsigned long tegra_dc_readl(struct tegra_dc *dc, { unsigned long ret; - BUG_ON(!nvhost_module_powered(nvhost_get_host(dc->ndev)->dev)); + BUG_ON(!nvhost_module_powered(to_nvhost_device(dc->ndev->dev.parent))); if (!tegra_is_clk_enabled(dc->clk)) WARN(1, "DC is clock-gated.\n"); @@ -177,7 +175,7 @@ static inline unsigned long tegra_dc_readl(struct tegra_dc *dc, static inline void tegra_dc_writel(struct tegra_dc *dc, unsigned long val, unsigned long reg) { - BUG_ON(!nvhost_module_powered(nvhost_get_host(dc->ndev)->dev)); + BUG_ON(!nvhost_module_powered(to_nvhost_device(dc->ndev->dev.parent))); if (!tegra_is_clk_enabled(dc->clk)) WARN(1, "DC is clock-gated.\n"); diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index 0ea3947176fe..26301abe4222 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c @@ -36,6 +36,8 @@ #include "dc_reg.h" #include "dc_priv.h" +#include "host1x/host1x.h" +#include "host1x/host1x_syncpt.h" #include "dsi_regs.h" #include "dsi.h" diff --git a/drivers/video/tegra/dc/ext/Makefile b/drivers/video/tegra/dc/ext/Makefile index 343217ccc4a8..16e4cdf43ebb 100644 --- a/drivers/video/tegra/dc/ext/Makefile +++ b/drivers/video/tegra/dc/ext/Makefile @@ -1,4 +1,5 @@ GCOV_PROFILE := y +EXTRA_CFLAGS += -Idrivers/video/tegra/host obj-y += dev.o obj-y += util.o obj-y += cursor.o -- cgit v1.2.3