summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
index c2f0e37b..23a1bad7 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h
@@ -104,6 +104,14 @@ struct nvgpu_mem_sgl {
104 u64 length; 104 u64 length;
105}; 105};
106 106
107/*
108 * Iterate over the SGL entries in an SGT.
109 */
110#define nvgpu_sgt_for_each_sgl(__sgl__, __sgt__) \
111 for ((__sgl__) = (__sgt__)->sgl; \
112 (__sgl__) != NULL; \
113 (__sgl__) = nvgpu_sgt_get_next(__sgt__, __sgl__))
114
107struct nvgpu_mem { 115struct nvgpu_mem {
108 /* 116 /*
109 * Populated for all nvgpu_mem structs - vidmem or system. 117 * Populated for all nvgpu_mem structs - vidmem or system.