include/drm/ttm/ttm_kmap_iter.h

Source file repositories/reference/linux-study-clean/include/drm/ttm/ttm_kmap_iter.h

File Facts

System
Linux kernel
Corpus path
include/drm/ttm/ttm_kmap_iter.h
Extension
.h
Size
1877 bytes
Lines
62
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ttm_kmap_iter_ops {
	/**
	 * @map_local: Map a PAGE_SIZE part of the resource using
	 * kmap_local semantics.
	 * @res_iter: Pointer to the struct ttm_kmap_iter representing
	 * the resource.
	 * @dmap: The struct iosys_map holding the virtual address after
	 * the operation.
	 * @i: The location within the resource to map. PAGE_SIZE granularity.
	 */
	void (*map_local)(struct ttm_kmap_iter *res_iter,
			  struct iosys_map *dmap, pgoff_t i);
	/**
	 * @unmap_local: Unmap a PAGE_SIZE part of the resource previously
	 * mapped using kmap_local.
	 * @res_iter: Pointer to the struct ttm_kmap_iter representing
	 * the resource.
	 * @dmap: The struct iosys_map holding the virtual address after
	 * the operation.
	 */
	void (*unmap_local)(struct ttm_kmap_iter *res_iter,
			    struct iosys_map *dmap);
	bool maps_tt;
};

/**
 * struct ttm_kmap_iter - Iterator for kmap_local type operations on a
 * resource.
 * @ops: Pointer to the operations struct.
 *
 * This struct is intended to be embedded in a resource-specific specialization
 * implementing operations for the resource.
 *
 * Nothing stops us from extending the operations to vmap, vmap_pfn etc,
 * replacing some or parts of the ttm_bo_util. cpu-map functionality.
 */
struct ttm_kmap_iter {
	const struct ttm_kmap_iter_ops *ops;
};

#endif /* __TTM_KMAP_ITER_H__ */

Annotation

Implementation Notes