Linux Kernel
3.7.1
|
#include <drm/drmP.h>
Go to the source code of this file.
Functions | |
int | drm_remove_magic (struct drm_master *master, drm_magic_t magic) |
int | drm_getmagic (struct drm_device *dev, void *data, struct drm_file *file_priv) |
int | drm_authmagic (struct drm_device *dev, void *data, struct drm_file *file_priv) |
IOCTLs for authentication
Definition in file drm_auth.c.
int drm_authmagic | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
Authenticate with a magic.
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | pointer to a drm_auth structure. |
Checks if file_priv
is associated with the magic number passed in
Definition at line 181 of file drm_auth.c.
int drm_getmagic | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
Get a unique magic number (ioctl).
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | pointer to a resulting drm_auth structure. |
If there is a magic number in drm_file::magic then use it, otherwise searches an unique non-zero magic number and add it associating it with file_priv
. This ioctl needs protection by the drm_global_mutex, which protects struct drm_file::magic and struct drm_magic_entry::priv.
Definition at line 142 of file drm_auth.c.
int drm_remove_magic | ( | struct drm_master * | master, |
drm_magic_t | magic | ||
) |
Remove a magic number.
dev | DRM device. |
magic | magic number. |
Searches and unlinks the entry in drm_device::magiclist with the magic number hash key, while holding the drm_device::struct_mutex lock.
Definition at line 104 of file drm_auth.c.