diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common')
20 files changed, 27 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/clk.c b/drivers/gpu/nvgpu/common/linux/clk.c index f24445b3..892b892a 100644 --- a/drivers/gpu/nvgpu/common/linux/clk.c +++ b/drivers/gpu/nvgpu/common/linux/clk.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <soc/tegra/tegra-dvfs.h> | 22 | #include <soc/tegra/tegra-dvfs.h> |
23 | 23 | ||
24 | #include "clk.h" | 24 | #include "clk.h" |
25 | #include "os_linux.h" | ||
26 | |||
25 | #include "gk20a/gk20a.h" | 27 | #include "gk20a/gk20a.h" |
26 | #include "gk20a/platform_gk20a.h" | 28 | #include "gk20a/platform_gk20a.h" |
27 | 29 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/debug.c b/drivers/gpu/nvgpu/common/linux/debug.c index 9fd09efe..f24c6ae7 100644 --- a/drivers/gpu/nvgpu/common/linux/debug.c +++ b/drivers/gpu/nvgpu/common/linux/debug.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "debug_kmem.h" | 21 | #include "debug_kmem.h" |
22 | #include "debug_pmu.h" | 22 | #include "debug_pmu.h" |
23 | #include "debug_sched.h" | 23 | #include "debug_sched.h" |
24 | #include "os_linux.h" | ||
24 | 25 | ||
25 | #include "gk20a/gk20a.h" | 26 | #include "gk20a/gk20a.h" |
26 | #include "gk20a/platform_gk20a.h" | 27 | #include "gk20a/platform_gk20a.h" |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_allocator.c b/drivers/gpu/nvgpu/common/linux/debug_allocator.c index 9102b989..dfc1dc41 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_allocator.c +++ b/drivers/gpu/nvgpu/common/linux/debug_allocator.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include "debug_allocator.h" | 15 | #include "debug_allocator.h" |
16 | #include "gk20a/platform_gk20a.h" | 16 | #include "gk20a/platform_gk20a.h" |
17 | #include "os_linux.h" | ||
17 | 18 | ||
18 | #include <linux/debugfs.h> | 19 | #include <linux/debugfs.h> |
19 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_cde.c b/drivers/gpu/nvgpu/common/linux/debug_cde.c index d3aab3cd..8fcc6e84 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_cde.c +++ b/drivers/gpu/nvgpu/common/linux/debug_cde.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include "debug_cde.h" | 15 | #include "debug_cde.h" |
16 | #include "gk20a/platform_gk20a.h" | 16 | #include "gk20a/platform_gk20a.h" |
17 | #include "os_linux.h" | ||
17 | 18 | ||
18 | #include <linux/debugfs.h> | 19 | #include <linux/debugfs.h> |
19 | 20 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/debug_ce.c b/drivers/gpu/nvgpu/common/linux/debug_ce.c index 95f0d2ad..1c2d4170 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_ce.c +++ b/drivers/gpu/nvgpu/common/linux/debug_ce.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include "debug_ce.h" | 15 | #include "debug_ce.h" |
16 | #include "gk20a/platform_gk20a.h" | 16 | #include "gk20a/platform_gk20a.h" |
17 | #include "os_linux.h" | ||
17 | 18 | ||
18 | #include <linux/debugfs.h> | 19 | #include <linux/debugfs.h> |
19 | 20 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/debug_clk.c b/drivers/gpu/nvgpu/common/linux/debug_clk.c index 5bbe4127..8ffba3c8 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_clk.c +++ b/drivers/gpu/nvgpu/common/linux/debug_clk.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include "gk20a/platform_gk20a.h" | 19 | #include "gk20a/platform_gk20a.h" |
20 | #include "gm20b/clk_gm20b.h" | 20 | #include "gm20b/clk_gm20b.h" |
21 | #include "os_linux.h" | ||
21 | 22 | ||
22 | static int rate_get(void *data, u64 *val) | 23 | static int rate_get(void *data, u64 *val) |
23 | { | 24 | { |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_fifo.c b/drivers/gpu/nvgpu/common/linux/debug_fifo.c index 1fba1868..1245c093 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_fifo.c +++ b/drivers/gpu/nvgpu/common/linux/debug_fifo.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include "debug_fifo.h" | 15 | #include "debug_fifo.h" |
16 | #include "gk20a/platform_gk20a.h" | 16 | #include "gk20a/platform_gk20a.h" |
17 | #include "os_linux.h" | ||
17 | 18 | ||
18 | #include <linux/debugfs.h> | 19 | #include <linux/debugfs.h> |
19 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_gr.c b/drivers/gpu/nvgpu/common/linux/debug_gr.c index 1045fe0b..732c2a7e 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_gr.c +++ b/drivers/gpu/nvgpu/common/linux/debug_gr.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include "debug_gr.h" | 15 | #include "debug_gr.h" |
16 | #include "gk20a/platform_gk20a.h" | 16 | #include "gk20a/platform_gk20a.h" |
17 | #include "os_linux.h" | ||
17 | 18 | ||
18 | #include <linux/debugfs.h> | 19 | #include <linux/debugfs.h> |
19 | 20 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/debug_mm.c b/drivers/gpu/nvgpu/common/linux/debug_mm.c index dcb83112..bed8d10b 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_mm.c +++ b/drivers/gpu/nvgpu/common/linux/debug_mm.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include "debug_mm.h" | 15 | #include "debug_mm.h" |
16 | #include "gk20a/platform_gk20a.h" | 16 | #include "gk20a/platform_gk20a.h" |
17 | #include "os_linux.h" | ||
17 | 18 | ||
18 | #include <linux/debugfs.h> | 19 | #include <linux/debugfs.h> |
19 | 20 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/debug_pmu.c b/drivers/gpu/nvgpu/common/linux/debug_pmu.c index 8c3607b5..1c0b2520 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_pmu.c +++ b/drivers/gpu/nvgpu/common/linux/debug_pmu.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <nvgpu/enabled.h> | 15 | #include <nvgpu/enabled.h> |
16 | #include "debug_pmu.h" | 16 | #include "debug_pmu.h" |
17 | #include "gk20a/platform_gk20a.h" | 17 | #include "gk20a/platform_gk20a.h" |
18 | #include "os_linux.h" | ||
18 | 19 | ||
19 | #include <linux/debugfs.h> | 20 | #include <linux/debugfs.h> |
20 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
diff --git a/drivers/gpu/nvgpu/common/linux/debug_sched.c b/drivers/gpu/nvgpu/common/linux/debug_sched.c index 73fb890f..c0dcf8d9 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_sched.c +++ b/drivers/gpu/nvgpu/common/linux/debug_sched.c | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include "debug_sched.h" | 15 | #include "debug_sched.h" |
16 | #include "gk20a/platform_gk20a.h" | 16 | #include "gk20a/platform_gk20a.h" |
17 | #include "os_linux.h" | ||
17 | 18 | ||
18 | #include <linux/debugfs.h> | 19 | #include <linux/debugfs.h> |
19 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
diff --git a/drivers/gpu/nvgpu/common/linux/dma.c b/drivers/gpu/nvgpu/common/linux/dma.c index 5fee878a..6473aed9 100644 --- a/drivers/gpu/nvgpu/common/linux/dma.c +++ b/drivers/gpu/nvgpu/common/linux/dma.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include "gk20a/gk20a.h" | 28 | #include "gk20a/gk20a.h" |
29 | #include "gk20a/platform_gk20a.h" | 29 | #include "gk20a/platform_gk20a.h" |
30 | #include "os_linux.h" | ||
30 | 31 | ||
31 | #if defined(CONFIG_GK20A_VIDMEM) | 32 | #if defined(CONFIG_GK20A_VIDMEM) |
32 | static u64 __nvgpu_dma_alloc(struct nvgpu_allocator *allocator, dma_addr_t at, | 33 | static u64 __nvgpu_dma_alloc(struct nvgpu_allocator *allocator, dma_addr_t at, |
diff --git a/drivers/gpu/nvgpu/common/linux/firmware.c b/drivers/gpu/nvgpu/common/linux/firmware.c index 549e83ae..b49bc4a3 100644 --- a/drivers/gpu/nvgpu/common/linux/firmware.c +++ b/drivers/gpu/nvgpu/common/linux/firmware.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include "gk20a/gk20a.h" | 23 | #include "gk20a/gk20a.h" |
24 | #include "gk20a/platform_gk20a.h" | 24 | #include "gk20a/platform_gk20a.h" |
25 | #include "os_linux.h" | ||
25 | 26 | ||
26 | static const struct firmware *do_request_firmware(struct device *dev, | 27 | static const struct firmware *do_request_firmware(struct device *dev, |
27 | const char *prefix, const char *fw_name, int flags) | 28 | const char *prefix, const char *fw_name, int flags) |
diff --git a/drivers/gpu/nvgpu/common/linux/log.c b/drivers/gpu/nvgpu/common/linux/log.c index 9883acfc..e2cebee8 100644 --- a/drivers/gpu/nvgpu/common/linux/log.c +++ b/drivers/gpu/nvgpu/common/linux/log.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include "gk20a/gk20a.h" | 22 | #include "gk20a/gk20a.h" |
23 | #include "gk20a/platform_gk20a.h" | 23 | #include "gk20a/platform_gk20a.h" |
24 | #include "os_linux.h" | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * Define a length for log buffers. This is the buffer that the 'fmt, ...' part | 27 | * Define a length for log buffers. This is the buffer that the 'fmt, ...' part |
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index 0b5dfec8..2f6dd4c7 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -865,7 +865,7 @@ static int gk20a_probe(struct platform_device *dev) | |||
865 | 865 | ||
866 | gk20a = &l->g; | 866 | gk20a = &l->g; |
867 | set_gk20a(dev, gk20a); | 867 | set_gk20a(dev, gk20a); |
868 | gk20a->dev = &dev->dev; | 868 | l->dev = &dev->dev; |
869 | gk20a->log_mask = NVGPU_DEFAULT_DBG_MASK; | 869 | gk20a->log_mask = NVGPU_DEFAULT_DBG_MASK; |
870 | 870 | ||
871 | nvgpu_kmem_init(gk20a); | 871 | nvgpu_kmem_init(gk20a); |
diff --git a/drivers/gpu/nvgpu/common/linux/nvhost.c b/drivers/gpu/nvgpu/common/linux/nvhost.c index 8e337529..611351ae 100644 --- a/drivers/gpu/nvgpu/common/linux/nvhost.c +++ b/drivers/gpu/nvgpu/common/linux/nvhost.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include "nvhost_priv.h" | 23 | #include "nvhost_priv.h" |
24 | 24 | ||
25 | #include "gk20a/gk20a.h" | 25 | #include "gk20a/gk20a.h" |
26 | #include "gk20a/platform_gk20a.h" | 26 | #include "os_linux.h" |
27 | 27 | ||
28 | int nvgpu_get_nvhost_dev(struct gk20a *g) | 28 | int nvgpu_get_nvhost_dev(struct gk20a *g) |
29 | { | 29 | { |
diff --git a/drivers/gpu/nvgpu/common/linux/os_linux.h b/drivers/gpu/nvgpu/common/linux/os_linux.h index e39d3c4d..cf012acc 100644 --- a/drivers/gpu/nvgpu/common/linux/os_linux.h +++ b/drivers/gpu/nvgpu/common/linux/os_linux.h | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | struct nvgpu_os_linux { | 23 | struct nvgpu_os_linux { |
24 | struct gk20a g; | 24 | struct gk20a g; |
25 | struct device *dev; | ||
25 | 26 | ||
26 | struct { | 27 | struct { |
27 | struct cdev cdev; | 28 | struct cdev cdev; |
@@ -75,6 +76,11 @@ static inline struct nvgpu_os_linux *nvgpu_os_linux_from_gk20a(struct gk20a *g) | |||
75 | return container_of(g, struct nvgpu_os_linux, g); | 76 | return container_of(g, struct nvgpu_os_linux, g); |
76 | } | 77 | } |
77 | 78 | ||
79 | static inline struct device *dev_from_gk20a(struct gk20a *g) | ||
80 | { | ||
81 | return nvgpu_os_linux_from_gk20a(g)->dev; | ||
82 | } | ||
83 | |||
78 | #define INTERFACE_NAME "nvhost%s-gpu" | 84 | #define INTERFACE_NAME "nvhost%s-gpu" |
79 | 85 | ||
80 | #endif | 86 | #endif |
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index 15435934..3a452d18 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "module.h" | 29 | #include "module.h" |
30 | #include "intr.h" | 30 | #include "intr.h" |
31 | #include "sysfs.h" | 31 | #include "sysfs.h" |
32 | #include "os_linux.h" | ||
32 | 33 | ||
33 | #include "pci.h" | 34 | #include "pci.h" |
34 | 35 | ||
@@ -367,7 +368,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev, | |||
367 | } | 368 | } |
368 | 369 | ||
369 | platform->g = g; | 370 | platform->g = g; |
370 | g->dev = &pdev->dev; | 371 | l->dev = &pdev->dev; |
371 | 372 | ||
372 | err = pci_enable_device(pdev); | 373 | err = pci_enable_device(pdev); |
373 | if (err) | 374 | if (err) |
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c index 000e9eee..a28f1094 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include "gm20b/clk_gm20b.h" | 52 | #include "gm20b/clk_gm20b.h" |
53 | 53 | ||
54 | #include "clk.h" | 54 | #include "clk.h" |
55 | #include "os_linux.h" | ||
55 | 56 | ||
56 | #include "../../../arch/arm/mach-tegra/iomap.h" | 57 | #include "../../../arch/arm/mach-tegra/iomap.h" |
57 | 58 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/vm.c b/drivers/gpu/nvgpu/common/linux/vm.c index cbacbdc0..d47d6bb1 100644 --- a/drivers/gpu/nvgpu/common/linux/vm.c +++ b/drivers/gpu/nvgpu/common/linux/vm.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "gk20a/platform_gk20a.h" | 29 | #include "gk20a/platform_gk20a.h" |
30 | 30 | ||
31 | #include "vm_priv.h" | 31 | #include "vm_priv.h" |
32 | #include "os_linux.h" | ||
32 | 33 | ||
33 | static struct nvgpu_mapped_buf *__nvgpu_vm_find_mapped_buf_reverse( | 34 | static struct nvgpu_mapped_buf *__nvgpu_vm_find_mapped_buf_reverse( |
34 | struct vm_gk20a *vm, struct dma_buf *dmabuf, u32 kind) | 35 | struct vm_gk20a *vm, struct dma_buf *dmabuf, u32 kind) |