include/drm/drm_gem_dma_helper.h

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

File Facts

System
Linux kernel
Corpus path
include/drm/drm_gem_dma_helper.h
Extension
.h
Size
9516 bytes
Lines
275
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: operation-table or driver-model contract
Status
pattern 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

* This macro autogenerates a suitable &struct file_operations for DMA based
 * drivers, which can be assigned to &drm_driver.fops. Note that this structure
 * cannot be shared between drivers, because it contains a reference to the
 * current module using THIS_MODULE.
 *
 * Note that the declaration is already marked as static - if you need a
 * non-static version of this you're probably doing it wrong and will break the
 * THIS_MODULE reference by accident.
 */
#define DEFINE_DRM_GEM_DMA_FOPS(name) \
	static const struct file_operations name = {\
		.owner		= THIS_MODULE,\
		.open		= drm_open,\
		.release	= drm_release,\
		.unlocked_ioctl	= drm_ioctl,\
		.compat_ioctl	= drm_compat_ioctl,\
		.poll		= drm_poll,\
		.read		= drm_read,\
		.llseek		= noop_llseek,\
		.mmap		= drm_gem_mmap,\
		.fop_flags = FOP_UNSIGNED_OFFSET, \
		DRM_GEM_DMA_UNMAPPED_AREA_FOPS \
	}

#endif /* __DRM_GEM_DMA_HELPER_H__ */

Annotation

Implementation Notes