Linux Kernel
3.7.1
|
#include <ttm/ttm_module.h>
#include <ttm/ttm_bo_driver.h>
#include <ttm/ttm_placement.h>
#include <linux/mm.h>
#include <linux/rbtree.h>
#include <linux/module.h>
#include <linux/uaccess.h>
Go to the source code of this file.
Macros | |
#define | pr_fmt(fmt) "[TTM] " fmt |
#define | TTM_BO_VM_NUM_PREFAULT 16 |
Functions | |
int | ttm_bo_mmap (struct file *filp, struct vm_area_struct *vma, struct ttm_bo_device *bdev) |
EXPORT_SYMBOL (ttm_bo_mmap) | |
int | ttm_fbdev_mmap (struct vm_area_struct *vma, struct ttm_buffer_object *bo) |
EXPORT_SYMBOL (ttm_fbdev_mmap) | |
ssize_t | ttm_bo_io (struct ttm_bo_device *bdev, struct file *filp, const char __user *wbuf, char __user *rbuf, size_t count, loff_t *f_pos, bool write) |
ssize_t | ttm_bo_fbdev_io (struct ttm_buffer_object *bo, const char __user *wbuf, char __user *rbuf, size_t count, loff_t *f_pos, bool write) |
#define pr_fmt | ( | fmt | ) | "[TTM] " fmt |
Definition at line 31 of file ttm_bo_vm.c.
#define TTM_BO_VM_NUM_PREFAULT 16 |
Definition at line 41 of file ttm_bo_vm.c.
EXPORT_SYMBOL | ( | ttm_bo_mmap | ) |
EXPORT_SYMBOL | ( | ttm_fbdev_mmap | ) |
ssize_t ttm_bo_fbdev_io | ( | struct ttm_buffer_object * | bo, |
const char __user * | wbuf, | ||
char __user * | rbuf, | ||
size_t | count, | ||
loff_t * | f_pos, | ||
bool | write | ||
) |
Definition at line 402 of file ttm_bo_vm.c.
ssize_t ttm_bo_io | ( | struct ttm_bo_device * | bdev, |
struct file * | filp, | ||
const char __user * | wbuf, | ||
char __user * | rbuf, | ||
size_t | count, | ||
loff_t * | f_pos, | ||
bool | write | ||
) |
ttm_bo_io
: Pointer to the struct ttm_bo_device. : Pointer to the struct file attempting to read / write. : User-space pointer to address of buffer to write. NULL on read. : User-space pointer to address of buffer to read into. Null on write. : Number of bytes to read / write. : Pointer to current file position. : 1 for read, 0 for write.
This function implements read / write into ttm buffer objects, and is intended to be called from the fops::read and fops::write method. Returns: See man (2) write, man(2) read. In particular, the function may return -ERESTARTSYS if interrupted by a signal.
Definition at line 309 of file ttm_bo_vm.c.
int ttm_bo_mmap | ( | struct file * | filp, |
struct vm_area_struct * | vma, | ||
struct ttm_bo_device * | bdev | ||
) |
ttm_bo_mmap - mmap out of the ttm device address space.
: filp as input from the mmap method. : vma as input from the mmap method. : Pointer to the ttm_bo_device with the address space manager.
This function is intended to be called by the device mmap method. if the device address space is to be backed by the bo manager.
Definition at line 252 of file ttm_bo_vm.c.
int ttm_fbdev_mmap | ( | struct vm_area_struct * | vma, |
struct ttm_buffer_object * | bo | ||
) |
ttm_fbdev_mmap - mmap fbdev memory backed by a ttm buffer object.
: vma as input from the fbdev mmap method. : The bo backing the address space. The address space will have the same size as the bo, and start at offset 0.
This function is intended to be called by the fbdev mmap method if the fbdev address space is to be backed by a bo.
Definition at line 296 of file ttm_bo_vm.c.