/** * DRM_ACCEL_FOPS - Default drm accelerators file operations * * This macro provides a shorthand for setting the accelerator file ops in the * &file_operations structure. If all you need are the default ops, use * DEFINE_DRM_ACCEL_FOPS instead.
*/ #define DRM_ACCEL_FOPS \
.open = accel_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
/** * DEFINE_DRM_ACCEL_FOPS() - macro to generate file operations for accelerators drivers * @name: name for the generated structure * * This macro autogenerates a suitable &struct file_operations for accelerators 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_ACCEL_FOPS(name) \ staticconststruct file_operations name = {\
.owner = THIS_MODULE,\
DRM_ACCEL_FOPS,\
}
#if IS_ENABLED(CONFIG_DRM_ACCEL)
externstruct xarray accel_minors_xa;
void accel_core_exit(void); int accel_core_init(void); void accel_set_device_instance_params(struct device *kdev, int index); int accel_open(struct inode *inode, struct file *filp); void accel_debugfs_register(struct drm_device *dev);
#else
staticinlinevoid accel_core_exit(void)
{
}
staticinlineint __init accel_core_init(void)
{ /* Return 0 to allow drm_core_init to complete successfully */ return 0;
}
staticinlinevoid accel_set_device_instance_params(struct device *kdev, int index)
{
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.