summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-07-02 13:44:05 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-06 00:48:56 -0400
commit26783b85bfee4c2ef4f2ccc2d16ebc783dd0aa7d (patch)
tree3fbfb7dbbc39d95af270740fe642652f0b3e264e /drivers/gpu/nvgpu/include
parent3e12cea363c8a09038e870d7df9c047294a0a6a1 (diff)
gpu: nvpgu: Rename Linux specific vidmem code
Rename os/linux/vidmem.c to os/linux/dmabuf_vidmem.c. The code is mainly dealing with interfacing with Linux dmabuf framework and its responsibilities got confused with common/mm/vidmem.c. Also move the header include/nvgpu/linux/vidmem.h to os/linux/dmabuf_vidmem.h. It does not expose any interface to outside Linux code. Change-Id: I2cb1057a8934d5cb5c5860023aa12f8f048a6684 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1768261 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
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