XenevaOS
Loading...
Searching...
No Matches
Macros
drm_accel.h File Reference
#include <drm/drm_file.h>
Include dependency graph for drm_accel.h:

Go to the source code of this file.

Macros

#define ACCEL_MAJOR   261
 
#define ACCEL_MAX_MINORS   256
 
#define DRM_ACCEL_FOPS
 

: name for the generated structure

DEFINE_DRM_ACCEL_FOPS() - macro to generate file operations for accelerators drivers

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)
 

Macro Definition Documentation

◆ ACCEL_MAJOR

#define ACCEL_MAJOR   261

◆ ACCEL_MAX_MINORS

#define ACCEL_MAX_MINORS   256

◆ DEFINE_DRM_ACCEL_FOPS

#define DEFINE_DRM_ACCEL_FOPS (   name)
Value:
static const struct file_operations name = {\
.owner = THIS_MODULE,\
}
#define DRM_ACCEL_FOPS
Definition drm_accel.h:23
struct drm_crtc struct drm_plane struct drm_plane const struct drm_crtc_funcs const char * name
Definition drm_crtc.h:1242
#define THIS_MODULE
Definition module.h:110
Definition fs.h:67

◆ DRM_ACCEL_FOPS

#define DRM_ACCEL_FOPS
Value:
.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
ssize_t drm_read(struct file *filp, char __user *buffer, size_t count, loff_t *offset)
__poll_t drm_poll(struct file *filp, struct poll_table_struct *wait)
int drm_release(struct inode *inode, struct file *filp)
int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
long drm_ioctl(struct file *filp, unsigned int cmd, uintptr_t arg)
#define drm_compat_ioctl
Definition drm_ioctl.h:177
#define FOP_UNSIGNED_OFFSET
Definition mm.h:136

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.