Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
ttm_execbuf_util.h File Reference
#include <ttm/ttm_bo_api.h>
#include <linux/list.h>

Go to the source code of this file.

Data Structures

struct  ttm_validate_buffer
 

Functions

void ttm_eu_backoff_reservation (struct list_head *list)
 
int ttm_eu_reserve_buffers (struct list_head *list)
 
void ttm_eu_fence_buffer_objects (struct list_head *list, void *sync_obj)
 

Function Documentation

void ttm_eu_backoff_reservation ( struct list_head list)

function ttm_eu_backoff_reservation

: thread private list of ttm_validate_buffer structs.

Undoes all buffer validation reservations for bos pointed to by the list entries.

Definition at line 101 of file ttm_execbuf_util.c.

void ttm_eu_fence_buffer_objects ( struct list_head list,
void sync_obj 
)

function ttm_eu_fence_buffer_objects.

: thread private list of ttm_validate_buffer structs. : The new sync object for the buffers.

This function should be called when command submission is complete, and it will add a new sync object to bos pointed to by entries on . It also unreserves all buffers, putting them on lru lists.

Definition at line 203 of file ttm_execbuf_util.c.

int ttm_eu_reserve_buffers ( struct list_head list)

function ttm_eu_reserve_buffers

: thread private list of ttm_validate_buffer structs.

Tries to reserve bos pointed to by the list entries for validation. If the function returns 0, all buffers are marked as "unfenced", taken off the lru lists and are not synced for write CPU usage.

If the function detects a deadlock due to multiple threads trying to reserve the same buffers in reverse order, all threads except one will back off and retry. This function may sleep while waiting for CPU write reservations to be cleared, and for other threads to unreserve their buffers.

This function may return -ERESTART or -EAGAIN if the calling process receives a signal while waiting. In that case, no buffers on the list will be reserved upon return.

Buffers reserved by this function should be unreserved by a call to either ttm_eu_backoff_reservation() or ttm_eu_fence_buffer_objects() when command submission is complete or has failed.

Definition at line 129 of file ttm_execbuf_util.c.