summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/linux/vidmem.h77
1 files changed, 0 insertions, 77 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/vidmem.h b/drivers/gpu/nvgpu/include/nvgpu/linux/vidmem.h
deleted file mode 100644
index ec02faec..00000000
--- a/drivers/gpu/nvgpu/include/nvgpu/linux/vidmem.h
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __NVGPU_LINUX_VIDMEM_H__
18#define __NVGPU_LINUX_VIDMEM_H__
19
20#include <nvgpu/types.h>
21
22struct dma_buf;
23
24struct gk20a;
25
26#ifdef CONFIG_GK20A_VIDMEM
27
28struct gk20a *nvgpu_vidmem_buf_owner(struct dma_buf *dmabuf);
29int nvgpu_vidmem_export_linux(struct gk20a *g, size_t bytes);
30
31void nvgpu_vidmem_set_page_alloc(struct scatterlist *sgl, u64 addr);
32struct nvgpu_page_alloc *nvgpu_vidmem_get_page_alloc(struct scatterlist *sgl);
33
34int nvgpu_vidmem_buf_access_memory(struct gk20a *g, struct dma_buf *dmabuf,
35 void *buffer, u64 offset, u64 size, u32 cmd);
36
37#else /* !CONFIG_GK20A_VIDMEM */
38
39static inline struct gk20a *nvgpu_vidmem_buf_owner(struct dma_buf *dmabuf)
40{
41 return NULL;
42}
43
44static inline int nvgpu_vidmem_export_linux(struct gk20a *g, size_t bytes)
45{
46 return -ENOSYS;
47}
48
49static inline void nvgpu_vidmem_set_page_alloc(struct scatterlist *sgl,
50 u64 addr)
51{
52}
53
54static inline struct nvgpu_page_alloc *nvgpu_vidmem_get_page_alloc(
55 struct scatterlist *sgl)
56{
57 return NULL;
58}
59
60static inline int nvgpu_vidmem_buf_access_memory(struct gk20a *g,
61 struct dma_buf *dmabuf,
62 void *buffer, u64 offset,
63 u64 size, u32 cmd)
64{
65 return -ENOSYS;
66}
67
68#endif
69
70
71struct nvgpu_vidmem_linux {
72 struct dma_buf *dmabuf;
73 void *dmabuf_priv;
74 void (*dmabuf_priv_delete)(void *);
75};
76
77#endif