summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-10-23 12:11:51 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-06 19:29:31 -0500
commit973553069dcf4220484e6ea85f35646ab8a12094 (patch)
tree32ff42048809045ccb4afbb8a32a00356c0d4a6f /drivers/gpu/nvgpu/common
parent5fb2804d189397d092e36ef8ce4a38afcad40c93 (diff)
gpu: nvgpu: Fix missing #includes and fw decls in Linux code
ioctl_channel.h and cde.h referred to multiple structures that were not forward declared or explitly #included in. Add several forward declarations and #includes. Also add #include for <uapi/linux/nvgpu.h> to multiple Linux .c files that were missing it. Change-Id: Iefd52e71224d5810b5abbcc765f92bc535d7a28b Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1591634 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r--drivers/gpu/nvgpu/common/linux/cde.h14
-rw-r--r--drivers/gpu/nvgpu/common/linux/driver_common.c1
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_channel.h7
-rw-r--r--drivers/gpu/nvgpu/common/linux/module.c1
-rw-r--r--drivers/gpu/nvgpu/common/linux/vm.c1
5 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/cde.h b/drivers/gpu/nvgpu/common/linux/cde.h
index 22732a2a..5dd15c37 100644
--- a/drivers/gpu/nvgpu/common/linux/cde.h
+++ b/drivers/gpu/nvgpu/common/linux/cde.h
@@ -19,6 +19,13 @@
19#ifndef _CDE_GK20A_H_ 19#ifndef _CDE_GK20A_H_
20#define _CDE_GK20A_H_ 20#define _CDE_GK20A_H_
21 21
22#include <nvgpu/nvgpu_mem.h>
23#include <nvgpu/list.h>
24#include <nvgpu/lock.h>
25
26#include <linux/kobject.h>
27#include <linux/workqueue.h>
28
22#define MAX_CDE_BUFS 10 29#define MAX_CDE_BUFS 10
23#define MAX_CDE_PARAMS 64 30#define MAX_CDE_PARAMS 64
24#define MAX_CDE_USER_PARAMS 40 31#define MAX_CDE_USER_PARAMS 40
@@ -33,7 +40,14 @@
33#define NUM_CDE_CONTEXTS 4 40#define NUM_CDE_CONTEXTS 4
34 41
35struct dma_buf; 42struct dma_buf;
43struct device;
44struct nvgpu_os_linux;
36struct gk20a; 45struct gk20a;
46struct gk20a_fence;
47struct nvgpu_fence;
48struct channel_gk20a;
49struct vm_gk20a;
50struct nvgpu_gpfifo;
37 51
38/* 52/*
39 * this element defines a buffer that is allocated and mapped into gpu address 53 * this element defines a buffer that is allocated and mapped into gpu address
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c
index 1c6002de..9e567c27 100644
--- a/drivers/gpu/nvgpu/common/linux/driver_common.c
+++ b/drivers/gpu/nvgpu/common/linux/driver_common.c
@@ -15,6 +15,7 @@
15 */ 15 */
16 16
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18#include <uapi/linux/nvgpu.h>
18 19
19#include <nvgpu/kmem.h> 20#include <nvgpu/kmem.h>
20#include <nvgpu/nvgpu_common.h> 21#include <nvgpu/nvgpu_common.h>
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.h b/drivers/gpu/nvgpu/common/linux/ioctl_channel.h
index 8cfce7e1..c3cd11c7 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.h
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.h
@@ -13,6 +13,13 @@
13#ifndef __NVGPU_IOCTL_CHANNEL_H__ 13#ifndef __NVGPU_IOCTL_CHANNEL_H__
14#define __NVGPU_IOCTL_CHANNEL_H__ 14#define __NVGPU_IOCTL_CHANNEL_H__
15 15
16#include <linux/fs.h>
17
18struct inode;
19struct file;
20struct gk20a;
21struct nvgpu_channel_open_args;
22
16int gk20a_channel_open(struct inode *inode, struct file *filp); 23int gk20a_channel_open(struct inode *inode, struct file *filp);
17int gk20a_channel_release(struct inode *inode, struct file *filp); 24int gk20a_channel_release(struct inode *inode, struct file *filp);
18long gk20a_channel_ioctl(struct file *filp, 25long gk20a_channel_ioctl(struct file *filp,
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c
index 4841b032..2e90fbe4 100644
--- a/drivers/gpu/nvgpu/common/linux/module.c
+++ b/drivers/gpu/nvgpu/common/linux/module.c
@@ -24,6 +24,7 @@
24#include <linux/pm_runtime.h> 24#include <linux/pm_runtime.h>
25#include <linux/reset.h> 25#include <linux/reset.h>
26#include <linux/platform/tegra/common.h> 26#include <linux/platform/tegra/common.h>
27#include <uapi/linux/nvgpu.h>
27 28
28#include <nvgpu/dma.h> 29#include <nvgpu/dma.h>
29#include <nvgpu/kmem.h> 30#include <nvgpu/kmem.h>
diff --git a/drivers/gpu/nvgpu/common/linux/vm.c b/drivers/gpu/nvgpu/common/linux/vm.c
index 123807d9..0cfd010b 100644
--- a/drivers/gpu/nvgpu/common/linux/vm.c
+++ b/drivers/gpu/nvgpu/common/linux/vm.c
@@ -16,6 +16,7 @@
16 16
17#include <linux/dma-buf.h> 17#include <linux/dma-buf.h>
18#include <linux/scatterlist.h> 18#include <linux/scatterlist.h>
19#include <uapi/linux/nvgpu.h>
19 20
20#include <nvgpu/log.h> 21#include <nvgpu/log.h>
21#include <nvgpu/lock.h> 22#include <nvgpu/lock.h>