Linux Kernel
3.7.1
|
#include <linux/debugfs.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <drm/drmP.h>
#include <drm/drm_core.h>
Go to the source code of this file.
Macros | |
#define | DRM_IOCTL_DEF(ioctl, _func, _flags) [DRM_IOCTL_NR(ioctl)] = {.cmd = ioctl, .func = _func, .flags = _flags, .cmd_drv = 0} |
#define | DRM_CORE_IOCTL_COUNT ARRAY_SIZE( drm_ioctls ) |
Functions | |
int | drm_lastclose (struct drm_device *dev) |
module_init (drm_core_init) | |
module_exit (drm_core_exit) | |
long | drm_ioctl (struct file *filp, unsigned int cmd, unsigned long arg) |
EXPORT_SYMBOL (drm_ioctl) | |
struct drm_local_map * | drm_getsarea (struct drm_device *dev) |
EXPORT_SYMBOL (drm_getsarea) | |
Generic driver template
To use this template, you must at least define the following (samples given for the MGA driver):
Definition in file drm_drv.c.
#define DRM_CORE_IOCTL_COUNT ARRAY_SIZE( drm_ioctls ) |
|
read |
Called whenever a process performs an ioctl on /dev/drm.
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | user argument. |
Looks up the ioctl function in the ioctls table, checking for root previleges if so required, and dispatches to the respective function.
int drm_lastclose | ( | struct drm_device * | dev | ) |
Take down the DRM device.
dev | DRM device structure. |
Frees every resource in dev
.
EXPORT_SYMBOL | ( | drm_ioctl | ) |
EXPORT_SYMBOL | ( | drm_getsarea | ) |
module_exit | ( | drm_core_exit | ) |
module_init | ( | drm_core_init | ) |