Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
drm_vm.c File Reference
#include <drm/drmP.h>
#include <linux/export.h>

Go to the source code of this file.

Functions

void drm_vm_open_locked (struct drm_device *dev, struct vm_area_struct *vma)
 
void drm_vm_close_locked (struct drm_device *dev, struct vm_area_struct *vma)
 
int drm_mmap_locked (struct file *filp, struct vm_area_struct *vma)
 
int drm_mmap (struct file *filp, struct vm_area_struct *vma)
 
 EXPORT_SYMBOL (drm_mmap)
 

Detailed Description

Memory mapping for DRM

Author
Rickard E. (Rik) Faith faith.nosp@m.@val.nosp@m.inux..nosp@m.com
Gareth Hughes garet.nosp@m.h@va.nosp@m.linux.nosp@m..com

Definition in file drm_vm.c.

Function Documentation

int drm_mmap ( struct file filp,
struct vm_area_struct vma 
)

Definition at line 660 of file drm_vm.c.

int drm_mmap_locked ( struct file filp,
struct vm_area_struct vma 
)

mmap DMA memory.

Parameters
file_privDRM file private.
vmavirtual memory area.
Returns
zero on success or a negative number on failure.

If the virtual memory area has no offset associated with it then it's a DMA area, so calls mmap_dma(). Otherwise searches the map in drm_device::maplist, checks that the restricted flag is not set, sets the virtual memory operations according to the mapping type and remaps the pages. Finally sets the file pointer and calls vm_open().

Definition at line 545 of file drm_vm.c.

void drm_vm_close_locked ( struct drm_device dev,
struct vm_area_struct vma 
)

Definition at line 436 of file drm_vm.c.

void drm_vm_open_locked ( struct drm_device dev,
struct vm_area_struct vma 
)

open method for shared virtual memory.

Parameters
vmavirtual memory area.

Create a new drm_vma_entry structure as the vma private data entry and add it to drm_device::vmalist.

Definition at line 409 of file drm_vm.c.

EXPORT_SYMBOL ( drm_mmap  )