Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/ttm: fix ttm_bo.h kernel-doc warnings

Some renames, some formatting fixes, add some missing documentation.

v3: Fix struct ttm_buffer_object .sg documentation (Christian)

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240308160750.3741833-1-jani.nikula@intel.com

+11 -6
+11 -6
include/drm/ttm/ttm_bo.h
··· 83 83 * @resource: structure describing current placement. 84 84 * @ttm: TTM structure holding system pages. 85 85 * @deleted: True if the object is only a zombie and already deleted. 86 + * @bulk_move: The bulk move object. 87 + * @priority: Priority for LRU, BOs with lower priority are evicted first. 88 + * @pin_count: Pin count. 86 89 * 87 90 * Base class for TTM buffer object, that deals with data placement and CPU 88 91 * mappings. GPU mappings are really up to the driver, but for simpler GPUs ··· 131 128 struct work_struct delayed_delete; 132 129 133 130 /** 134 - * Special members that are protected by the reserve lock 135 - * and the bo::lock when written to. Can be read with 136 - * either of these locks held. 131 + * @sg: external source of pages and DMA addresses, protected by the 132 + * reservation lock. 137 133 */ 138 134 struct sg_table *sg; 139 135 }; 136 + 137 + #define TTM_BO_MAP_IOMEM_MASK 0x80 140 138 141 139 /** 142 140 * struct ttm_bo_kmap_obj ··· 145 141 * @virtual: The current kernel virtual address. 146 142 * @page: The page when kmap'ing a single page. 147 143 * @bo_kmap_type: Type of bo_kmap. 144 + * @bo: The TTM BO. 148 145 * 149 146 * Object describing a kernel mapping. Since a TTM bo may be located 150 147 * in various memory types with various caching policies, the 151 148 * mapping can either be an ioremap, a vmap, a kmap or part of a 152 149 * premapped region. 153 150 */ 154 - #define TTM_BO_MAP_IOMEM_MASK 0x80 155 151 struct ttm_bo_kmap_obj { 156 152 void *virtual; 157 153 struct page *page; ··· 175 171 * @force_alloc: Don't check the memory account during suspend or CPU page 176 172 * faults. Should only be used by TTM internally. 177 173 * @resv: Reservation object to allow reserved evictions with. 174 + * @bytes_moved: Statistics on how many bytes have been moved. 178 175 * 179 176 * Context for TTM operations like changing buffer placement or general memory 180 177 * allocation. ··· 269 264 * ttm_bo_reserve_slowpath: 270 265 * @bo: A pointer to a struct ttm_buffer_object. 271 266 * @interruptible: Sleep interruptible if waiting. 272 - * @sequence: Set (@bo)->sequence to this value after lock 267 + * @ticket: Ticket used to acquire the ww_mutex. 273 268 * 274 269 * This is called after ttm_bo_reserve returns -EAGAIN and we backed off 275 270 * from all our other reservations. Because there are no other reservations ··· 308 303 } 309 304 310 305 /** 311 - * ttm_bo_move_null = assign memory for a buffer object. 306 + * ttm_bo_move_null - assign memory for a buffer object. 312 307 * @bo: The bo to assign the memory to 313 308 * @new_mem: The memory to be assigned. 314 309 *