summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/module.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-01-17 15:39:13 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-23 01:20:15 -0500
commitf3f14cdff53f4b936e2505d44aad6e3bca143056 (patch)
tree8d6438132b8ca429758d18142c5f569f60f2bc35 /drivers/gpu/nvgpu/common/linux/module.c
parent193a2ed38ca51d898ac811820ab86237c84e18eb (diff)
gpu: nvgpu: Fold T19x code back to main code paths
Lots of code paths were split to T19x specific code paths and structs due to split repository. Now that repositories are merged, fold all of them back to main code paths and structs and remove the T19x specific Kconfig flag. Change-Id: Id0d17a5f0610fc0b49f51ab6664e716dc8b222b6 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1640606 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/module.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/module.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c
index c153b56f..d22455ff 100644
--- a/drivers/gpu/nvgpu/common/linux/module.c
+++ b/drivers/gpu/nvgpu/common/linux/module.c
@@ -46,13 +46,11 @@
46#include "scale.h" 46#include "scale.h"
47#include "pci.h" 47#include "pci.h"
48#include "module.h" 48#include "module.h"
49#include "module_usermode.h"
49#include "intr.h" 50#include "intr.h"
50#include "cde.h" 51#include "cde.h"
51#include "ioctl.h" 52#include "ioctl.h"
52#include "sim.h" 53#include "sim.h"
53#ifdef CONFIG_TEGRA_19x_GPU
54#include "nvgpu_gpuid_t19x.h"
55#endif
56 54
57#include "os_linux.h" 55#include "os_linux.h"
58#include "cde_gm20b.h" 56#include "cde_gm20b.h"
@@ -175,9 +173,7 @@ static int gk20a_restore_registers(struct gk20a *g)
175 l->regs = l->regs_saved; 173 l->regs = l->regs_saved;
176 l->bar1 = l->bar1_saved; 174 l->bar1 = l->bar1_saved;
177 175
178#ifdef CONFIG_TEGRA_19x_GPU 176 nvgpu_restore_usermode_registers(g);
179 t19x_restore_registers(g);
180#endif
181 177
182 return 0; 178 return 0;
183} 179}
@@ -313,9 +309,7 @@ static int gk20a_lockout_registers(struct gk20a *g)
313 l->regs = NULL; 309 l->regs = NULL;
314 l->bar1 = NULL; 310 l->bar1 = NULL;
315 311
316#ifdef CONFIG_TEGRA_19x_GPU 312 nvgpu_lockout_usermode_registers(g);
317 t19x_lockout_registers(g);
318#endif
319 313
320 return 0; 314 return 0;
321} 315}
@@ -384,14 +378,12 @@ static struct of_device_id tegra_gk20a_of_match[] = {
384 .data = &gm20b_tegra_platform }, 378 .data = &gm20b_tegra_platform },
385 { .compatible = "nvidia,tegra186-gp10b", 379 { .compatible = "nvidia,tegra186-gp10b",
386 .data = &gp10b_tegra_platform }, 380 .data = &gp10b_tegra_platform },
387#ifdef CONFIG_TEGRA_19x_GPU 381 { .compatible = "nvidia,gv11b",
388 { .compatible = TEGRA_19x_GPU_COMPAT_TEGRA, 382 .data = &gv11b_tegra_platform },
389 .data = &t19x_gpu_tegra_platform },
390#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION 383#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
391 { .compatible = "nvidia,gv11b-vgpu", 384 { .compatible = "nvidia,gv11b-vgpu",
392 .data = &gv11b_vgpu_tegra_platform}, 385 .data = &gv11b_vgpu_tegra_platform},
393#endif 386#endif
394#endif
395#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION 387#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
396 { .compatible = "nvidia,tegra124-gk20a-vgpu", 388 { .compatible = "nvidia,tegra124-gk20a-vgpu",
397 .data = &vgpu_tegra_platform }, 389 .data = &vgpu_tegra_platform },
@@ -669,9 +661,7 @@ void gk20a_remove_support(struct gk20a *g)
669 l->bar1 = NULL; 661 l->bar1 = NULL;
670 } 662 }
671 663
672#ifdef CONFIG_TEGRA_19x_GPU 664 nvgpu_remove_usermode_support(g);
673 t19x_remove_support(g);
674#endif
675 665
676 nvgpu_free_enabled_flags(g); 666 nvgpu_free_enabled_flags(g);
677} 667}
@@ -721,9 +711,7 @@ static int gk20a_init_support(struct platform_device *dev)
721 goto fail; 711 goto fail;
722 } 712 }
723 713
724#ifdef CONFIG_TEGRA_19x_GPU 714 nvgpu_init_usermode_support(g);
725 t19x_init_support(g);
726#endif
727 715
728 return 0; 716 return 0;
729 717