Linux Kernel
3.7.1
|
#include <ttm_bo_driver.h>
struct ttm_bo_driver
: Callback to create a struct ttm_backend. : Callback to invalidate read caches when a buffer object has been evicted. : Callback to initialize a struct ttm_mem_type_manager structure. : Callback to obtain placement flags when a buffer is evicted. : Callback for a driver to hook in accelerated functions to move a buffer. If set to NULL, a potentially slow memcpy() move is used. : See ttm_fence_api.h : See ttm_fence_api.h : See ttm_fence_api.h : See ttm_fence_api.h : See ttm_fence_api.h
Definition at line 316 of file ttm_bo_driver.h.
void(* evict_flags)(struct ttm_buffer_object *bo, struct ttm_placement *placement) |
struct ttm_bo_driver member evict_flags:
: the buffer object to be evicted
Return the bo flags for a buffer which is not mapped to the hardware. These will be placed in proposed_flags so that when the move is finished, they'll end up in bo->mem.flags
Definition at line 380 of file ttm_bo_driver.h.
int(* fault_reserve_notify)(struct ttm_buffer_object *bo) |
Definition at line 438 of file ttm_bo_driver.h.
int(* init_mem_type)(struct ttm_bo_device *bdev, uint32_t type, struct ttm_mem_type_manager *man) |
Definition at line 368 of file ttm_bo_driver.h.
int(* invalidate_caches)(struct ttm_bo_device *bdev, uint32_t flags) |
struct ttm_bo_driver member invalidate_caches
: the buffer object device. : new placement of the rebound buffer object.
A previosly evicted buffer has been rebound in a potentially new location. Tell the driver that it might consider invalidating read (texture) caches on the next command submission as a consequence.
Definition at line 367 of file ttm_bo_driver.h.
void(* io_mem_free)(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) |
Definition at line 452 of file ttm_bo_driver.h.
int(* io_mem_reserve)(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) |
Driver callback on when mapping io memory (for bo_move_memcpy for instance). TTM will take care to call io_mem_free whenever the mapping is not use anymore. io_mem_reserve & io_mem_free are balanced.
Definition at line 451 of file ttm_bo_driver.h.
int(* move)(struct ttm_buffer_object *bo, bool evict, bool interruptible, bool no_wait_reserve, bool no_wait_gpu, struct ttm_mem_reg *new_mem) |
struct ttm_bo_driver member move:
: the buffer to move : whether this motion is evicting the buffer from the graphics address space : Use interruptible sleeps if possible when sleeping. : whether this should give up and return -EBUSY if this move would require sleeping : the new memory region receiving the buffer
Move a buffer between two memory regions.
Definition at line 395 of file ttm_bo_driver.h.
void(* move_notify)(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem) |
Definition at line 434 of file ttm_bo_driver.h.
void(* swap_notify)(struct ttm_buffer_object *bo) |
notify the driver that we're about to swap out this bo
Definition at line 443 of file ttm_bo_driver.h.
Definition at line 428 of file ttm_bo_driver.h.
Definition at line 430 of file ttm_bo_driver.h.
In case a driver writer dislikes the TTM fence objects, the driver writer can replace those with sync objects of his / her own. If it turns out that no driver writer is using these. I suggest we remove these hooks and plug in fences directly. The bo driver needs the following functionality: See the corresponding functions in the fence object API documentation.
Definition at line 425 of file ttm_bo_driver.h.
Definition at line 429 of file ttm_bo_driver.h.
Definition at line 426 of file ttm_bo_driver.h.
|
read |
ttm_tt_create
: pointer to a struct ttm_bo_device: : Size of the data needed backing. : Page flags as identified by TTM_PAGE_FLAG_XX flags. : See struct ttm_bo_device.
Create a struct ttm_tt to back data with system memory pages. No pages are actually allocated. Returns: NULL: Out of memory.
Definition at line 330 of file ttm_bo_driver.h.
ttm_tt_populate
: The struct ttm_tt to contain the backing pages.
Allocate all backing pages Returns: -ENOMEM: Out of memory.
Definition at line 344 of file ttm_bo_driver.h.
ttm_tt_unpopulate
: The struct ttm_tt to contain the backing pages.
Free all backing page
Definition at line 353 of file ttm_bo_driver.h.
int(* verify_access)(struct ttm_buffer_object *bo, struct file *filp) |
struct ttm_bo_driver_member verify_access
: Pointer to a buffer object. : Pointer to a struct file trying to access the object.
Called from the map / write / read methods to verify that the caller is permitted to access the buffer object. This member may be set to NULL, which will refuse this kind of access for all buffer objects. This function should return 0 if access is granted, -EPERM otherwise.
Definition at line 412 of file ttm_bo_driver.h.