mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 18:16:01 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
ee4970a33f
commit
8428c82c81
@@ -33,11 +33,17 @@
|
||||
|
||||
struct sg_table;
|
||||
struct dma_buf;
|
||||
struct device;
|
||||
|
||||
struct vm_gk20a;
|
||||
struct vm_gk20a_mapping_batch;
|
||||
struct nvgpu_vm_area;
|
||||
|
||||
struct nvgpu_os_buffer {
|
||||
struct dma_buf *dmabuf;
|
||||
struct device *dev;
|
||||
};
|
||||
|
||||
/* NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set */
|
||||
int nvgpu_vm_map_linux(struct vm_gk20a *vm,
|
||||
struct dma_buf *dmabuf,
|
||||
|
||||
Reference in New Issue
Block a user