diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2014-09-29 06:16:15 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:33 -0400 |
commit | 719923ad9fa7c6b2ca68a25d1ce4518aab844bc2 (patch) | |
tree | bcb3dfbbd2968bf4b863f8990c11f05bc61ed6df /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | 83bf2aa83d922080884a9fe547b656e24495e16e (diff) |
gpu: nvgpu: rename gpu ioctls and structs to nvgpu
To help remove the nvhost dependency from nvgpu, rename ioctl defines
and structures used by nvgpu such that nvhost is replaced by nvgpu.
Duplicate some structures as needed.
Update header guards and such accordingly.
Change-Id: Ifc3a867713072bae70256502735583ab38381877
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/542620
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index acae38aa..ae108875 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/video/tegra/host/gk20a/gk20a.c | ||
3 | * | ||
4 | * GK20A Graphics | 2 | * GK20A Graphics |
5 | * | 3 | * |
6 | * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. |
@@ -45,6 +43,10 @@ | |||
45 | #include <linux/sched.h> | 43 | #include <linux/sched.h> |
46 | #include <linux/input-cfboost.h> | 44 | #include <linux/input-cfboost.h> |
47 | 45 | ||
46 | #ifdef CONFIG_TEGRA_GK20A | ||
47 | #include <linux/nvhost.h> | ||
48 | #endif | ||
49 | |||
48 | #include "gk20a.h" | 50 | #include "gk20a.h" |
49 | #include "debug_gk20a.h" | 51 | #include "debug_gk20a.h" |
50 | #include "ctrl_gk20a.h" | 52 | #include "ctrl_gk20a.h" |
@@ -57,7 +59,6 @@ | |||
57 | #include "gk20a_scale.h" | 59 | #include "gk20a_scale.h" |
58 | #include "dbg_gpu_gk20a.h" | 60 | #include "dbg_gpu_gk20a.h" |
59 | #include "hal.h" | 61 | #include "hal.h" |
60 | #include "nvhost_acm.h" | ||
61 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | 62 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION |
62 | #include "vgpu/vgpu.h" | 63 | #include "vgpu/vgpu.h" |
63 | #endif | 64 | #endif |
@@ -850,11 +851,11 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) | |||
850 | 851 | ||
851 | static void gk20a_detect_chip(struct gk20a *g) | 852 | static void gk20a_detect_chip(struct gk20a *g) |
852 | { | 853 | { |
853 | struct nvhost_gpu_characteristics *gpu = &g->gpu_characteristics; | 854 | struct nvgpu_gpu_characteristics *gpu = &g->gpu_characteristics; |
854 | 855 | ||
855 | u32 mc_boot_0_value = gk20a_readl(g, mc_boot_0_r()); | 856 | u32 mc_boot_0_value = gk20a_readl(g, mc_boot_0_r()); |
856 | gpu->arch = mc_boot_0_architecture_v(mc_boot_0_value) << | 857 | gpu->arch = mc_boot_0_architecture_v(mc_boot_0_value) << |
857 | NVHOST_GPU_ARCHITECTURE_SHIFT; | 858 | NVGPU_GPU_ARCHITECTURE_SHIFT; |
858 | gpu->impl = mc_boot_0_implementation_v(mc_boot_0_value); | 859 | gpu->impl = mc_boot_0_implementation_v(mc_boot_0_value); |
859 | gpu->rev = | 860 | gpu->rev = |
860 | (mc_boot_0_major_revision_v(mc_boot_0_value) << 4) | | 861 | (mc_boot_0_major_revision_v(mc_boot_0_value) << 4) | |
@@ -1622,7 +1623,7 @@ static int __exit gk20a_remove(struct platform_device *dev) | |||
1622 | pm_runtime_put(&dev->dev); | 1623 | pm_runtime_put(&dev->dev); |
1623 | pm_runtime_disable(&dev->dev); | 1624 | pm_runtime_disable(&dev->dev); |
1624 | #else | 1625 | #else |
1625 | nvhost_module_disable_clk(&dev->dev); | 1626 | gk20a_pm_disable_clk(&dev->dev); |
1626 | #endif | 1627 | #endif |
1627 | 1628 | ||
1628 | return 0; | 1629 | return 0; |
@@ -1894,7 +1895,7 @@ int gk20a_do_unidle(void) | |||
1894 | 1895 | ||
1895 | int gk20a_init_gpu_characteristics(struct gk20a *g) | 1896 | int gk20a_init_gpu_characteristics(struct gk20a *g) |
1896 | { | 1897 | { |
1897 | struct nvhost_gpu_characteristics *gpu = &g->gpu_characteristics; | 1898 | struct nvgpu_gpu_characteristics *gpu = &g->gpu_characteristics; |
1898 | 1899 | ||
1899 | gpu->L2_cache_size = g->ops.ltc.determine_L2_size_bytes(g); | 1900 | gpu->L2_cache_size = g->ops.ltc.determine_L2_size_bytes(g); |
1900 | gpu->on_board_video_memory_size = 0; /* integrated GPU */ | 1901 | gpu->on_board_video_memory_size = 0; /* integrated GPU */ |
@@ -1902,18 +1903,18 @@ int gk20a_init_gpu_characteristics(struct gk20a *g) | |||
1902 | gpu->num_gpc = g->gr.gpc_count; | 1903 | gpu->num_gpc = g->gr.gpc_count; |
1903 | gpu->num_tpc_per_gpc = g->gr.max_tpc_per_gpc_count; | 1904 | gpu->num_tpc_per_gpc = g->gr.max_tpc_per_gpc_count; |
1904 | 1905 | ||
1905 | gpu->bus_type = NVHOST_GPU_BUS_TYPE_AXI; /* always AXI for now */ | 1906 | gpu->bus_type = NVGPU_GPU_BUS_TYPE_AXI; /* always AXI for now */ |
1906 | 1907 | ||
1907 | gpu->big_page_size = g->mm.big_page_size; | 1908 | gpu->big_page_size = g->mm.big_page_size; |
1908 | gpu->compression_page_size = g->mm.compression_page_size; | 1909 | gpu->compression_page_size = g->mm.compression_page_size; |
1909 | gpu->pde_coverage_bit_count = g->mm.pde_stride_shift; | 1910 | gpu->pde_coverage_bit_count = g->mm.pde_stride_shift; |
1910 | 1911 | ||
1911 | gpu->flags = NVHOST_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS | 1912 | gpu->flags = NVGPU_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS |
1912 | | NVHOST_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS; | 1913 | | NVGPU_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS; |
1913 | 1914 | ||
1914 | if (IS_ENABLED(CONFIG_TEGRA_GK20A) && | 1915 | if (IS_ENABLED(CONFIG_TEGRA_GK20A) && |
1915 | gk20a_platform_has_syncpoints(g->dev)) | 1916 | gk20a_platform_has_syncpoints(g->dev)) |
1916 | gpu->flags |= NVHOST_GPU_FLAGS_HAS_SYNCPOINTS; | 1917 | gpu->flags |= NVGPU_GPU_FLAGS_HAS_SYNCPOINTS; |
1917 | 1918 | ||
1918 | gpu->reserved = 0; | 1919 | gpu->reserved = 0; |
1919 | 1920 | ||