Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
ttm_buffer_object Struct Reference

#include <ttm_bo_api.h>

Data Fields

struct ttm_bo_globalglob
 
struct ttm_bo_devicebdev
 
unsigned long buffer_start
 
enum ttm_bo_type type
 
void(* destroy )(struct ttm_buffer_object *)
 
unsigned long num_pages
 
uint64_t addr_space_offset
 
size_t acc_size
 
struct kref kref
 
struct kref list_kref
 
wait_queue_head_t event_queue
 
struct ttm_mem_reg mem
 
struct filepersistent_swap_storage
 
struct ttm_ttttm
 
bool evicted
 
atomic_t cpu_writers
 
struct list_head lru
 
struct list_head ddestroy
 
struct list_head swap
 
struct list_head io_reserve_lru
 
uint32_t val_seq
 
bool seq_valid
 
atomic_t reserved
 
voidsync_obj_arg
 
voidsync_obj
 
unsigned long priv_flags
 
struct rb_node vm_rb
 
struct drm_mm_nodevm_node
 
unsigned long offset
 
uint32_t cur_placement
 
struct sg_tablesg
 

Detailed Description

struct ttm_buffer_object

: Pointer to the buffer object device structure. : The virtual user-space start address of ttm_bo_type_user buffers. : The bo type. : Destruction function. If NULL, kfree is used. : Actual number of pages. : Address space offset. : Accounted size for this object. : Reference count of this buffer object. When this refcount reaches zero, the object is put on the delayed delete list. : List reference count of this buffer object. This member is used to avoid destruction while the buffer object is still on a list. Lru lists may keep one refcount, the delayed delete list, and kref != 0 keeps one refcount. When this refcount reaches zero, the object is destroyed. : Queue for processes waiting on buffer object status change. : structure describing current placement. : Usually the swap storage is deleted for buffers pinned in physical memory. If this behaviour is not desired, this member holds a pointer to a persistent shmem object. : TTM structure holding system pages. : Whether the object was evicted without user-space knowing. : For synchronization. Number of cpu writers. : List head for the lru list. : List head for the delayed destroy list. : List head for swap LRU list. : Sequence of the validation holding the lock. Used to avoid starvation when many processes compete to validate the buffer. This member is protected by the bo_device::lru_lock. : The value of is valid. This value is protected by the bo_device::lru_lock. : Deadlock-free lock used for synchronization state transitions. : Opaque argument to synchronization object function. : Pointer to a synchronization object. : Flags describing buffer object internal state. : Rb node for the vm rb tree. : Address space manager node. : The current GPU offset, which can have different meanings depending on the memory type. For SYSTEM type memory, it should be 0. : Hint of current placement.

Base class for TTM buffer object, that deals with data placement and CPU mappings. GPU mappings are really up to the driver, but for simpler GPUs the driver can usually use the placement offset directly as the GPU virtual address. For drivers implementing multiple GPU memory manager contexts, the driver should manage the address space in these contexts separately and use these objects to get the correct placement and caching for these GPU maps. This makes it possible to use these objects for even quite elaborate memory management schemes. The destroy member, the API visibility of this object makes it possible to derive driver specific types.

Definition at line 196 of file ttm_bo_api.h.

Field Documentation

size_t acc_size

Definition at line 208 of file ttm_bo_api.h.

uint64_t addr_space_offset

Definition at line 207 of file ttm_bo_api.h.

Definition at line 202 of file ttm_bo_api.h.

unsigned long buffer_start

Definition at line 203 of file ttm_bo_api.h.

atomic_t cpu_writers

Members protected by the bo::reserved lock only when written to.

Definition at line 231 of file ttm_bo_api.h.

uint32_t cur_placement

Definition at line 277 of file ttm_bo_api.h.

struct list_head ddestroy

Definition at line 238 of file ttm_bo_api.h.

void(* destroy)(struct ttm_buffer_object *)

Definition at line 205 of file ttm_bo_api.h.

Definition at line 216 of file ttm_bo_api.h.

bool evicted

Definition at line 225 of file ttm_bo_api.h.

Members constant at init.

Definition at line 201 of file ttm_bo_api.h.

struct list_head io_reserve_lru

Definition at line 240 of file ttm_bo_api.h.

Members not needing protection.

Definition at line 214 of file ttm_bo_api.h.

struct kref list_kref

Definition at line 215 of file ttm_bo_api.h.

Members protected by the bdev::lru_lock.

Definition at line 237 of file ttm_bo_api.h.

Members protected by the bo::reserved lock.

Definition at line 222 of file ttm_bo_api.h.

unsigned long num_pages

Definition at line 206 of file ttm_bo_api.h.

unsigned long offset

Special members that are protected by the reserve lock and the bo::lock when written to. Can be read with either of these locks held.

Definition at line 276 of file ttm_bo_api.h.

struct file* persistent_swap_storage

Definition at line 223 of file ttm_bo_api.h.

unsigned long priv_flags

Definition at line 260 of file ttm_bo_api.h.

atomic_t reserved

Members protected by the bdev::lru_lock only when written to.

Definition at line 249 of file ttm_bo_api.h.

bool seq_valid

Definition at line 242 of file ttm_bo_api.h.

Definition at line 279 of file ttm_bo_api.h.

Definition at line 239 of file ttm_bo_api.h.

void* sync_obj

Definition at line 259 of file ttm_bo_api.h.

void* sync_obj_arg

Members protected by struct buffer_object_device::fence_lock In addition, setting sync_obj to anything else than NULL requires bo::reserved to be held. This allows for checking NULL while reserved but not holding the mentioned lock.

Definition at line 258 of file ttm_bo_api.h.

struct ttm_tt* ttm

Definition at line 224 of file ttm_bo_api.h.

Definition at line 204 of file ttm_bo_api.h.

uint32_t val_seq

Definition at line 241 of file ttm_bo_api.h.

struct drm_mm_node* vm_node

Definition at line 267 of file ttm_bo_api.h.

struct rb_node vm_rb

Members protected by the bdev::vm_lock

Definition at line 266 of file ttm_bo_api.h.


The documentation for this struct was generated from the following file: