diff options
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gv11b/platform_gv11b_vgpu_tegra.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/platform_gv11b_vgpu_tegra.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/platform_gv11b_vgpu_tegra.c b/drivers/gpu/nvgpu/vgpu/gv11b/platform_gv11b_vgpu_tegra.c index 6adbd46b..d48d1308 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/platform_gv11b_vgpu_tegra.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/platform_gv11b_vgpu_tegra.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include "common/linux/os_linux.h" | 26 | #include "common/linux/os_linux.h" |
27 | 27 | ||
28 | #include <nvgpu/nvhost.h> | 28 | #include <nvgpu/nvhost.h> |
29 | #include <nvgpu/nvhost_t19x.h> | ||
30 | |||
29 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
30 | 32 | ||
31 | static int gv11b_vgpu_probe(struct device *dev) | 33 | static int gv11b_vgpu_probe(struct device *dev) |
@@ -35,6 +37,7 @@ static int gv11b_vgpu_probe(struct device *dev) | |||
35 | struct resource *r; | 37 | struct resource *r; |
36 | void __iomem *regs; | 38 | void __iomem *regs; |
37 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(platform->g); | 39 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(platform->g); |
40 | struct gk20a *g = platform->g; | ||
38 | int ret; | 41 | int ret; |
39 | 42 | ||
40 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "usermode"); | 43 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "usermode"); |
@@ -50,11 +53,22 @@ static int gv11b_vgpu_probe(struct device *dev) | |||
50 | l->t19x.usermode_regs = regs; | 53 | l->t19x.usermode_regs = regs; |
51 | 54 | ||
52 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 55 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
53 | ret = nvgpu_get_nvhost_dev(platform->g); | 56 | ret = nvgpu_get_nvhost_dev(g); |
54 | if (ret) { | 57 | if (ret) { |
55 | l->t19x.usermode_regs = NULL; | 58 | l->t19x.usermode_regs = NULL; |
56 | return ret; | 59 | return ret; |
57 | } | 60 | } |
61 | |||
62 | ret = nvgpu_nvhost_syncpt_unit_interface_get_aperture(g->nvhost_dev, | ||
63 | &g->syncpt_unit_base, | ||
64 | &g->syncpt_unit_size); | ||
65 | if (ret) { | ||
66 | dev_err(dev, "Failed to get syncpt interface"); | ||
67 | return -ENOSYS; | ||
68 | } | ||
69 | g->syncpt_size = nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(1); | ||
70 | nvgpu_info(g, "syncpt_unit_base %llx syncpt_unit_size %zx size %x\n", | ||
71 | g->syncpt_unit_base, g->syncpt_unit_size, g->syncpt_size); | ||
58 | #endif | 72 | #endif |
59 | vgpu_init_clk_support(platform->g); | 73 | vgpu_init_clk_support(platform->g); |
60 | 74 | ||
@@ -62,7 +76,7 @@ static int gv11b_vgpu_probe(struct device *dev) | |||
62 | } | 76 | } |
63 | 77 | ||
64 | struct gk20a_platform gv11b_vgpu_tegra_platform = { | 78 | struct gk20a_platform gv11b_vgpu_tegra_platform = { |
65 | .has_syncpoints = false, | 79 | .has_syncpoints = true, |
66 | .aggressive_sync_destroy_thresh = 64, | 80 | .aggressive_sync_destroy_thresh = 64, |
67 | 81 | ||
68 | /* power management configuration */ | 82 | /* power management configuration */ |