summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/dmabuf.h
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-10-19 18:34:47 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-10 18:46:58 -0500
commit8428c82c816f361ce7bbb1fe4804f350b8cbea2f (patch)
tree7a1cf630fd9de6ed2acf33d6b9e2085d074a6906 /drivers/gpu/nvgpu/common/linux/dmabuf.h
parentee4970a33f41b56f2ada6a0b5ab6f9c400e39d88 (diff)
gpu: nvgpu: Add nvgpu_os_buffer
Add a generic nvgpu_os_buffer type, defined by each OS, to abstract a "user" buffer. This allows the comptag interface to be used in the core code. The end goal of this patch is to allow the OS specific mapping code to call a generic mapping function that handles most of the mapping logic. The problem is a lot of the logic involves comptags which are highly dependent on the operating systems buffer management scheme. With this, each OS can implement the buffer comptag mechanics however it wishes without the core MM code caring. JIRA NVGPU-30 JIRA NVGPU-223 Change-Id: Iaf64bc52e01ef3f262b4f8f9173a84384db7dc3e Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1583986 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/dmabuf.h')
-rw-r--r--drivers/gpu/nvgpu/common/linux/dmabuf.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/dmabuf.h b/drivers/gpu/nvgpu/common/linux/dmabuf.h
index b4b61459..8e6c139b 100644
--- a/drivers/gpu/nvgpu/common/linux/dmabuf.h
+++ b/drivers/gpu/nvgpu/common/linux/dmabuf.h
@@ -48,19 +48,6 @@ struct gk20a_dmabuf_priv {
48 u64 buffer_id; 48 u64 buffer_id;
49}; 49};
50 50
51/*
52 * These are implemented in common/linux/comptags.c - these are dmabuf related
53 * functions though so they are defined here. They cannot be defined in
54 * <nvgpu/comptags.h> since that file must be OS agnostic.
55 */
56int gk20a_alloc_comptags(struct gk20a *g,
57 struct device *dev,
58 struct dma_buf *dmabuf,
59 struct gk20a_comptag_allocator *allocator,
60 u32 lines);
61void gk20a_get_comptags(struct device *dev, struct dma_buf *dmabuf,
62 struct gk20a_comptags *comptags);
63
64struct sg_table *gk20a_mm_pin(struct device *dev, struct dma_buf *dmabuf); 51struct sg_table *gk20a_mm_pin(struct device *dev, struct dma_buf *dmabuf);
65void gk20a_mm_unpin(struct device *dev, struct dma_buf *dmabuf, 52void gk20a_mm_unpin(struct device *dev, struct dma_buf *dmabuf,
66 struct sg_table *sgt); 53 struct sg_table *sgt);