summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c34
1 files changed, 5 insertions, 29 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
index 0e8e173f..f8ff57b9 100644
--- a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
+++ b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
@@ -49,37 +49,13 @@ static void gr_gv11b_remove_sysfs(struct device *dev);
49static int gv11b_tegra_probe(struct device *dev) 49static int gv11b_tegra_probe(struct device *dev)
50{ 50{
51 struct gk20a_platform *platform = dev_get_drvdata(dev); 51 struct gk20a_platform *platform = dev_get_drvdata(dev);
52#ifdef CONFIG_TEGRA_GK20A_NVHOST 52 int err;
53 struct gk20a *g = platform->g;
54 int err = 0;
55
56 if (g->has_syncpoints) {
57 err = nvgpu_get_nvhost_dev(g);
58 if (err) {
59 dev_err(dev, "host1x device not available");
60 return err;
61 }
62 }
63 53
64 if (g->has_syncpoints) { 54 err = nvgpu_nvhost_syncpt_init(platform->g);
65 err = nvgpu_nvhost_syncpt_unit_interface_get_aperture( 55 if (err) {
66 g->nvhost_dev, 56 if (err != -ENOSYS)
67 &g->syncpt_unit_base, 57 return err;
68 &g->syncpt_unit_size);
69 if (err) {
70 dev_err(dev, "Failed to get syncpt interface");
71 return -ENOSYS;
72 }
73 g->syncpt_size =
74 nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(1);
75 nvgpu_info(g, "syncpt_unit_base %llx "
76 "syncpt_unit_size %zx size %x\n",
77 g->syncpt_unit_base, g->syncpt_unit_size,
78 g->syncpt_size);
79 } 58 }
80#else
81 g->has_syncpoints = false;
82#endif
83 59
84 err = gk20a_tegra_init_secure_alloc(platform); 60 err = gk20a_tegra_init_secure_alloc(platform);
85 if (err) 61 if (err)