summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-11-16 04:49:12 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2016-11-30 05:18:17 -0500
commitaf5d2d208ada4d84c7a7bd0e4e0c288d1276225f (patch)
treea822054d7a576fc5f6e839d7ffebd91147061540 /drivers/gpu/nvgpu/gk20a/mm_gk20a.h
parent5f6a2aa02b6927432c9f37e29c592e7efc4cb656 (diff)
gpu: nvgpu: API to access fb memory
Add IOCTL API NVGPU_DBG_GPU_IOCTL_ACCESS_FB_MEMORY to read/write fb/vidmem memory Interface will accept dmabuf_fd of the buffer in vidmem, offset into the buffer to access, temporary buffer to copy data across API, size of read/write and command indicating either read or write operation API will first parse all the inputs, and then call gk20a_vidbuf_access_memory() to complete fb access gk20a_vidbuf_access_memory() will then just use gk20a_mem_rd_n() or gk20a_mem_wr_n() depending on the command issued Bug 1804714 Jira DNVGPU-192 Change-Id: Iba3c42410abe12c2884d3b603fa33d27782e4c56 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1255556 (cherry picked from commit 2c49a8a79d93fc526adbf6f808484fa9a3fa2498) Reviewed-on: http://git-master/r/1260471 GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index 512d32e9..36ba6248 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -762,6 +762,8 @@ void gk20a_vm_mapping_batch_finish_locked(
762 762
763int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes); 763int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes);
764int gk20a_vidmem_get_space(struct gk20a *g, u64 *space); 764int gk20a_vidmem_get_space(struct gk20a *g, u64 *space);
765int gk20a_vidbuf_access_memory(struct gk20a *g, struct dma_buf *dmabuf,
766 void *buffer, u64 offset, u64 size, u32 cmd);
765 767
766/* Note: batch may be NULL if map op is not part of a batch */ 768/* Note: batch may be NULL if map op is not part of a batch */
767int gk20a_vm_map_buffer(struct vm_gk20a *vm, 769int gk20a_vm_map_buffer(struct vm_gk20a *vm,