Linux Kernel
3.7.1
|
#include <drm/drmP.h>
Go to the source code of this file.
Functions | |
Context bitmap support | |
void | drm_ctxbitmap_free (struct drm_device *dev, int ctx_handle) |
int | drm_ctxbitmap_init (struct drm_device *dev) |
void | drm_ctxbitmap_cleanup (struct drm_device *dev) |
Per Context SAREA Support | |
int | drm_getsareactx (struct drm_device *dev, void *data, struct drm_file *file_priv) |
int | drm_setsareactx (struct drm_device *dev, void *data, struct drm_file *file_priv) |
The actual DRM context handling routines | |
int | drm_resctx (struct drm_device *dev, void *data, struct drm_file *file_priv) |
int | drm_addctx (struct drm_device *dev, void *data, struct drm_file *file_priv) |
int | drm_modctx (struct drm_device *dev, void *data, struct drm_file *file_priv) |
int | drm_getctx (struct drm_device *dev, void *data, struct drm_file *file_priv) |
int | drm_switchctx (struct drm_device *dev, void *data, struct drm_file *file_priv) |
int | drm_newctx (struct drm_device *dev, void *data, struct drm_file *file_priv) |
int | drm_rmctx (struct drm_device *dev, void *data, struct drm_file *file_priv) |
IOCTLs for generic contexts
Definition in file drm_context.c.
int drm_addctx | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
Add context.
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | user argument pointing to a drm_ctx structure. |
Get a new handle for the context and copy to userspace.
Definition at line 320 of file drm_context.c.
void drm_ctxbitmap_cleanup | ( | struct drm_device * | dev | ) |
Context bitmap cleanup.
dev | DRM device. |
Free all idr members using drm_ctx_sarea_free helper function while holding the drm_device::struct_mutex lock.
Definition at line 118 of file drm_context.c.
void drm_ctxbitmap_free | ( | struct drm_device * | dev, |
int | ctx_handle | ||
) |
int drm_ctxbitmap_init | ( | struct drm_device * | dev | ) |
Context bitmap initialization.
dev | DRM device. |
Initialise the drm_device::ctx_idr
Definition at line 104 of file drm_context.c.
int drm_getctx | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
Get context.
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | user argument pointing to a drm_ctx structure. |
Definition at line 371 of file drm_context.c.
int drm_getsareactx | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
Get per-context SAREA.
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | user argument pointing to a drm_ctx_priv_map structure. |
Gets the map from drm_device::ctx_idr with the handle specified and returns its handle.
Definition at line 143 of file drm_context.c.
int drm_modctx | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
Definition at line 356 of file drm_context.c.
int drm_newctx | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
New context.
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | user argument pointing to a drm_ctx structure. |
Calls context_switch_complete().
Definition at line 412 of file drm_context.c.
int drm_resctx | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
Reserve contexts.
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | user argument pointing to a drm_ctx_res structure. |
Definition at line 289 of file drm_context.c.
int drm_rmctx | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
Remove context.
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | user argument pointing to a drm_ctx structure. |
If not the special kernel context, calls ctxbitmap_free() to free the specified context.
Definition at line 434 of file drm_context.c.
int drm_setsareactx | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
Set per-context SAREA.
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | user argument pointing to a drm_ctx_priv_map structure. |
Searches the mapping specified in arg
and update the entry in drm_device::ctx_idr with it.
Definition at line 187 of file drm_context.c.
int drm_switchctx | ( | struct drm_device * | dev, |
void * | data, | ||
struct drm_file * | file_priv | ||
) |
Switch context.
inode | device inode. |
file_priv | DRM file private. |
cmd | command. |
arg | user argument pointing to a drm_ctx structure. |
Calls context_switch().
Definition at line 392 of file drm_context.c.