diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2017-03-15 09:10:43 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-23 11:04:23 -0400 |
commit | 33f637585ecd617a9f4423f56e2aa6df0691ac64 (patch) | |
tree | e6f67da9b18ec64cae039b6af76c6abb27a70323 /drivers/gpu/nvgpu/tegra/linux | |
parent | 7505a759542c2d95e5abb42d44b8fb6afda74a87 (diff) |
gpu: nvgpu: split nvhost dependency on plat interface
Add CONFIG_TEGRA_GK20A_NVHOST and remove the TEGRA_GRHOST ||
TEGRA_HOST1X dependency in CONFIG_TEGRA_GK20A to allow using the iGPU
without the nvhost driver. Use the new config to guard syncpt-related
code.
Also make TEGRA_ACR depend on GK20A too so that it aligns properly under
gk20a in menuconfig.
Bug 1853519
Change-Id: I9e9b0a7915d000aae7930821627b7a01d08d3f5c
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1321303
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/tegra/linux')
-rw-r--r-- | drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c index ceb1d67e..538c2eb1 100644 --- a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c | |||
@@ -15,7 +15,9 @@ | |||
15 | 15 | ||
16 | #include <linux/version.h> | 16 | #include <linux/version.h> |
17 | #include <linux/of_platform.h> | 17 | #include <linux/of_platform.h> |
18 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | ||
18 | #include <linux/nvhost.h> | 19 | #include <linux/nvhost.h> |
20 | #endif | ||
19 | #include <linux/debugfs.h> | 21 | #include <linux/debugfs.h> |
20 | #include <linux/platform_data/tegra_edp.h> | 22 | #include <linux/platform_data/tegra_edp.h> |
21 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
@@ -843,30 +845,36 @@ static void gk20a_tegra_scale_exit(struct device *dev) | |||
843 | 845 | ||
844 | void gk20a_tegra_debug_dump(struct device *dev) | 846 | void gk20a_tegra_debug_dump(struct device *dev) |
845 | { | 847 | { |
848 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | ||
846 | struct gk20a_platform *platform = gk20a_get_platform(dev); | 849 | struct gk20a_platform *platform = gk20a_get_platform(dev); |
847 | struct gk20a *g = platform->g; | 850 | struct gk20a *g = platform->g; |
848 | 851 | ||
849 | if (g->host1x_dev) | 852 | if (g->host1x_dev) |
850 | nvhost_debug_dump_device(g->host1x_dev); | 853 | nvhost_debug_dump_device(g->host1x_dev); |
854 | #endif | ||
851 | } | 855 | } |
852 | 856 | ||
853 | int gk20a_tegra_busy(struct device *dev) | 857 | int gk20a_tegra_busy(struct device *dev) |
854 | { | 858 | { |
859 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | ||
855 | struct gk20a_platform *platform = gk20a_get_platform(dev); | 860 | struct gk20a_platform *platform = gk20a_get_platform(dev); |
856 | struct gk20a *g = platform->g; | 861 | struct gk20a *g = platform->g; |
857 | 862 | ||
858 | if (g->host1x_dev) | 863 | if (g->host1x_dev) |
859 | return nvhost_module_busy_ext(g->host1x_dev); | 864 | return nvhost_module_busy_ext(g->host1x_dev); |
865 | #endif | ||
860 | return 0; | 866 | return 0; |
861 | } | 867 | } |
862 | 868 | ||
863 | void gk20a_tegra_idle(struct device *dev) | 869 | void gk20a_tegra_idle(struct device *dev) |
864 | { | 870 | { |
871 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | ||
865 | struct gk20a_platform *platform = gk20a_get_platform(dev); | 872 | struct gk20a_platform *platform = gk20a_get_platform(dev); |
866 | struct gk20a *g = platform->g; | 873 | struct gk20a *g = platform->g; |
867 | 874 | ||
868 | if (g->host1x_dev) | 875 | if (g->host1x_dev) |
869 | nvhost_module_idle_ext(g->host1x_dev); | 876 | nvhost_module_idle_ext(g->host1x_dev); |
877 | #endif | ||
870 | } | 878 | } |
871 | 879 | ||
872 | static int gk20a_tegra_probe(struct device *dev) | 880 | static int gk20a_tegra_probe(struct device *dev) |