From 82734765d813c4cd0c5f48bc6e86b653faf13d24 Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Wed, 2 Jun 2021 09:34:44 +0000 Subject: [PATCH] gpu: nvgpu: corrections to dma alloc API documentation - Mention about NVGPU_DMA_PHYSICALLY_ADDRESSED flag and other not being used on safety. - Correct the range for input size. Jira NVGPU-6415 Change-Id: I6dc8b087edcb640a96e07c90016099cdcf456e60 Signed-off-by: Shashank Singh Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2538377 (cherry picked from commit 5a492b0aec1a7bfe0ebf904c48814faecabef99c) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2543401 Reviewed-by: svc_kernel_abi Reviewed-by: Dinesh T Reviewed-by: Vaibhav Kachore Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/dma.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/dma.h b/drivers/gpu/nvgpu/include/nvgpu/dma.h index 725a5dd14..9307deac2 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/dma.h +++ b/drivers/gpu/nvgpu/include/nvgpu/dma.h @@ -148,9 +148,12 @@ int nvgpu_dma_alloc_sys(struct gk20a *g, size_t size, struct nvgpu_mem *mem); * @param g - The GPU. * @param flags - Flags modifying the operation of the DMA allocation. * The following flags are accepted: - * - %NVGPU_DMA_NO_KERNEL_MAPPING - * - %NVGPU_DMA_READ_ONLY + * - %NVGPU_DMA_NO_KERNEL_MAPPING (Not used on safety) + * - %NVGPU_DMA_READ_ONLY (Not used on safety) + * - %NVGPU_DMA_PHYSICALLY_ADDRESSED * @param size - Size of the allocation in bytes. + * Range: 0 to (U64_MAX - PAGE_SIZE + 1). There is further + * restriction to upper bound on size by the OS. * @param mem - Struct for storing the allocation information. * * Allocate memory suitable for doing DMA. Store the allocation info in #mem.