From 1a204f6c7ab935adabe4abc98da61f72c0925b4a Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Fri, 24 Jan 2020 11:59:33 -0600 Subject: [PATCH] gpu: nvgpu: vmarea: Fix sparse documentation Sparse mappings are a mechanism to allow oversubscription of the GPU's accessible memory to a given texture or other buffer object. Change-Id: I675a73468cc8c1b1e333502be871404a49a025c4 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2284837 Reviewed-by: Thomas Fleury Reviewed-by: Nicolas Benech Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/include/nvgpu/vm_area.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/vm_area.h b/drivers/gpu/nvgpu/include/nvgpu/vm_area.h index fa310823b..2301177f9 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vm_area.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vm_area.h @@ -61,8 +61,10 @@ struct nvgpu_vm_area { */ u64 size; /** - * The GPU unmapping needed before using the vm_area. - */ + * Mark the vm area as sparse. + * + * @sa NVGPU_VM_AREA_ALLOC_SPARSE + */ bool sparse; }; @@ -80,7 +82,12 @@ nvgpu_vm_area_from_vm_area_list(struct nvgpu_list_node *node) #define NVGPU_VM_AREA_ALLOC_FIXED_OFFSET BIT32(0) /** - * Allocation of vm_area at random address. + * Mark the vmarea as sparse: this means that the vmarea's entire range of PTEs + * is mapped as sparse. Sparse mappings are mappings in which the valid bit is + * set to 0, but the volatile (cached) bit is set to 1. + * + * The purpose here is to allow an oversubscription of physical memory + * for a particular texture or other object. */ #define NVGPU_VM_AREA_ALLOC_SPARSE BIT32(1)