From 126c735d3015f515bde9f26d10b4e34d6e194e36 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Mon, 10 Apr 2017 13:51:43 -0700 Subject: gpu: nvgpu: Move and rename gk20a_sgtable* Move and rename the functions that build sgtables for nvgpu_mems into the Linux specific DMA code. One place outside of the Linux code do include the Linux DMA header. That will be fixed in a subsequent patch. JIRA NVGPU-12 JIRA NVGPU-30 Change-Id: Ie43c752b8f998f122af70f7c7eb727af0b0d98df Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1464078 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/linux/dma.h | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 drivers/gpu/nvgpu/include/nvgpu/linux/dma.h (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/dma.h b/drivers/gpu/nvgpu/include/nvgpu/linux/dma.h new file mode 100644 index 00000000..3960e654 --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/dma.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __NVGPU_LINUX_DMA_H__ +#define __NVGPU_LINUX_DMA_H__ + +/** + * Functions used internally for building the backing SGTs for nvgpu_mems. + */ + +int nvgpu_get_sgtable(struct gk20a *g, struct sg_table **sgt, + void *cpuva, u64 iova, + size_t size); + +int nvgpu_get_sgtable_from_pages(struct gk20a *g, struct sg_table **sgt, + struct page **pages, u64 iova, + size_t size); + +void nvgpu_free_sgtable(struct gk20a *g, struct sg_table **sgt); + +#endif -- cgit v1.2.2