|
int | drm_gem_init (struct drm_device *dev) |
|
void | drm_gem_destroy (struct drm_device *dev) |
|
int | drm_gem_object_init (struct drm_device *dev, struct drm_gem_object *obj, size_t size) |
|
| EXPORT_SYMBOL (drm_gem_object_init) |
|
int | drm_gem_private_object_init (struct drm_device *dev, struct drm_gem_object *obj, size_t size) |
|
| EXPORT_SYMBOL (drm_gem_private_object_init) |
|
struct drm_gem_object * | drm_gem_object_alloc (struct drm_device *dev, size_t size) |
|
| EXPORT_SYMBOL (drm_gem_object_alloc) |
|
int | drm_gem_handle_delete (struct drm_file *filp, u32 handle) |
|
| EXPORT_SYMBOL (drm_gem_handle_delete) |
|
int | drm_gem_handle_create (struct drm_file *file_priv, struct drm_gem_object *obj, u32 *handlep) |
|
| EXPORT_SYMBOL (drm_gem_handle_create) |
|
void | drm_gem_free_mmap_offset (struct drm_gem_object *obj) |
|
| EXPORT_SYMBOL (drm_gem_free_mmap_offset) |
|
int | drm_gem_create_mmap_offset (struct drm_gem_object *obj) |
|
| EXPORT_SYMBOL (drm_gem_create_mmap_offset) |
|
struct drm_gem_object * | drm_gem_object_lookup (struct drm_device *dev, struct drm_file *filp, u32 handle) |
|
| EXPORT_SYMBOL (drm_gem_object_lookup) |
|
int | drm_gem_close_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv) |
|
int | drm_gem_flink_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv) |
|
int | drm_gem_open_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv) |
|
void | drm_gem_open (struct drm_device *dev, struct drm_file *file_private) |
|
void | drm_gem_release (struct drm_device *dev, struct drm_file *file_private) |
|
void | drm_gem_object_release (struct drm_gem_object *obj) |
|
| EXPORT_SYMBOL (drm_gem_object_release) |
|
void | drm_gem_object_free (struct kref *kref) |
|
| EXPORT_SYMBOL (drm_gem_object_free) |
|
void | drm_gem_object_handle_free (struct drm_gem_object *obj) |
|
| EXPORT_SYMBOL (drm_gem_object_handle_free) |
|
void | drm_gem_vm_open (struct vm_area_struct *vma) |
|
| EXPORT_SYMBOL (drm_gem_vm_open) |
|
void | drm_gem_vm_close (struct vm_area_struct *vma) |
|
| EXPORT_SYMBOL (drm_gem_vm_close) |
|
int | drm_gem_mmap (struct file *filp, struct vm_area_struct *vma) |
|
| EXPORT_SYMBOL (drm_gem_mmap) |
|
This file provides some of the base ioctls and library routines for the graphics memory manager implemented by each device driver.
Because various devices have different requirements in terms of synchronization and migration strategies, implementing that is left up to the driver, and all that the general API provides should be generic – allocating objects, reading/writing data with the cpu, freeing objects. Even there, platform-dependent optimizations for reading/writing data with the CPU mean we'll likely hook those out to driver-specific calls. However, the DRI2 implementation wants to have at least allocate/mmap be generic.
The goal was to have swap-backed object allocation managed through struct file. However, file descriptors as handles to a struct file have two major failings:
- Process limits prevent more than 1024 or so being used at a time by default.
- Inability to allocate high fds will aggravate the X Server's select() handling, and likely that of many GL client applications as well.
This led to a plan of using our own integer IDs (called handles, following DRM terminology) to mimic fds, and implement the fd syscalls we need as ioctls. The objects themselves will still include the struct file so that we can transition to fds if the required kernel infrastructure shows up at a later date, and as our interface with shmfs for memory allocation.
Definition in file drm_gem.c.
drm_gem_mmap - memory map routine for GEM objects : DRM file pointer : VMA for the area to be mapped
If a driver supports GEM object mapping, mmap calls on the DRM file descriptor will end up here.
If we find the object based on the offset passed in (vma->vm_pgoff will contain the fake offset we created when the GTT map ioctl was called on the object), we set up the driver fault handler so that any accesses to the object can be trapped, to perform migration, GTT binding, surface register allocation, or performance monitoring.
Definition at line 670 of file drm_gem.c.