diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-09-27 18:05:50 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-13 18:20:01 -0400 |
commit | b0092ea95c6e1f695912cdb0b13767f3881cb22f (patch) | |
tree | 0ed4ebc0b72592d8addf6e459269dd5aa245c368 /drivers/gpu/nvgpu/vgpu | |
parent | 506f891f76800b059e960a195bb0da4c71cb2e16 (diff) |
gpu: nvgpu: gv11b: Abstract IO aperture accessors
Implement T19x specific usermode aperture initialization functions.
Move usermode_regs field to nvgpu_os_linux_t19x, because it is
Linux specific.
JIRA NVGPU-259
Change-Id: I9d6ce243a692ab48209d468288ed85f89fb26770
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1569699
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/platform_gv11b_vgpu_tegra.c | 7 |
1 files changed, 4 insertions, 3 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 396359c3..6adbd46b 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/platform_gv11b_vgpu_tegra.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/platform_gv11b_vgpu_tegra.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "gk20a/gk20a.h" | 23 | #include "gk20a/gk20a.h" |
24 | #include "gk20a/platform_gk20a.h" | 24 | #include "gk20a/platform_gk20a.h" |
25 | #include "vgpu/clk_vgpu.h" | 25 | #include "vgpu/clk_vgpu.h" |
26 | #include "common/linux/os_linux.h" | ||
26 | 27 | ||
27 | #include <nvgpu/nvhost.h> | 28 | #include <nvgpu/nvhost.h> |
28 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
@@ -33,7 +34,7 @@ static int gv11b_vgpu_probe(struct device *dev) | |||
33 | struct gk20a_platform *platform = dev_get_drvdata(dev); | 34 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
34 | struct resource *r; | 35 | struct resource *r; |
35 | void __iomem *regs; | 36 | void __iomem *regs; |
36 | struct fifo_gk20a *f = &platform->g->fifo; | 37 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(platform->g); |
37 | int ret; | 38 | int ret; |
38 | 39 | ||
39 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "usermode"); | 40 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "usermode"); |
@@ -46,12 +47,12 @@ static int gv11b_vgpu_probe(struct device *dev) | |||
46 | dev_err(dev, "failed to map usermode regs\n"); | 47 | dev_err(dev, "failed to map usermode regs\n"); |
47 | return PTR_ERR(regs); | 48 | return PTR_ERR(regs); |
48 | } | 49 | } |
49 | f->t19x.usermode_regs = regs; | 50 | l->t19x.usermode_regs = regs; |
50 | 51 | ||
51 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | 52 | #ifdef CONFIG_TEGRA_GK20A_NVHOST |
52 | ret = nvgpu_get_nvhost_dev(platform->g); | 53 | ret = nvgpu_get_nvhost_dev(platform->g); |
53 | if (ret) { | 54 | if (ret) { |
54 | f->t19x.usermode_regs = NULL; | 55 | l->t19x.usermode_regs = NULL; |
55 | return ret; | 56 | return ret; |
56 | } | 57 | } |
57 | #endif | 58 | #endif |