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

Go to the source code of this file.

Data Structures

struct  vmw_fence_manager
 
struct  vmw_user_fence
 
struct  vmw_event_fence_action
 
struct  vmw_event_fence_pending
 

Macros

#define VMW_FENCE_WRAP   (1 << 31)
 

Functions

struct vmw_fence_managervmw_fence_manager_init (struct vmw_private *dev_priv)
 
void vmw_fence_manager_takedown (struct vmw_fence_manager *fman)
 
struct vmw_fence_objvmw_fence_obj_reference (struct vmw_fence_obj *fence)
 
void vmw_fence_obj_unreference (struct vmw_fence_obj **fence_p)
 
void vmw_fences_perform_actions (struct vmw_fence_manager *fman, struct list_head *list)
 
void vmw_fences_update (struct vmw_fence_manager *fman)
 
bool vmw_fence_obj_signaled (struct vmw_fence_obj *fence, uint32_t flags)
 
int vmw_fence_obj_wait (struct vmw_fence_obj *fence, uint32_t flags, bool lazy, bool interruptible, unsigned long timeout)
 
void vmw_fence_obj_flush (struct vmw_fence_obj *fence)
 
int vmw_fence_create (struct vmw_fence_manager *fman, uint32_t seqno, uint32_t mask, struct vmw_fence_obj **p_fence)
 
int vmw_user_fence_create (struct drm_file *file_priv, struct vmw_fence_manager *fman, uint32_t seqno, uint32_t mask, struct vmw_fence_obj **p_fence, uint32_t *p_handle)
 
void vmw_fence_fifo_down (struct vmw_fence_manager *fman)
 
void vmw_fence_fifo_up (struct vmw_fence_manager *fman)
 
int vmw_fence_obj_wait_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int vmw_fence_obj_signaled_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
int vmw_fence_obj_unref_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
void vmw_event_fence_fpriv_gone (struct vmw_fence_manager *fman, struct list_head *event_list)
 
void vmw_fence_obj_add_action (struct vmw_fence_obj *fence, struct vmw_fence_action *action)
 
int vmw_event_fence_action_queue (struct drm_file *file_priv, struct vmw_fence_obj *fence, struct drm_pending_event *event, uint32_t *tv_sec, uint32_t *tv_usec, bool interruptible)
 
int vmw_event_fence_action_create (struct drm_file *file_priv, struct vmw_fence_obj *fence, uint32_t flags, uint64_t user_data, bool interruptible)
 
int vmw_fence_event_ioctl (struct drm_device *dev, void *data, struct drm_file *file_priv)
 

Macro Definition Documentation

#define VMW_FENCE_WRAP   (1 << 31)

Definition at line 31 of file vmwgfx_fence.c.

Function Documentation

int vmw_event_fence_action_create ( struct drm_file *  file_priv,
struct vmw_fence_obj fence,
uint32_t  flags,
uint64_t  user_data,
bool  interruptible 
)

Definition at line 996 of file vmwgfx_fence.c.

int vmw_event_fence_action_queue ( struct drm_file *  file_priv,
struct vmw_fence_obj fence,
struct drm_pending_event *  event,
uint32_t tv_sec,
uint32_t tv_usec,
bool  interruptible 
)

vmw_event_fence_action_create - Post an event for sending when a fence object seqno has passed.

: The file connection on which the event should be posted. : The fence object on which to post the event. : Event to be posted. This event should've been alloced using k[mz]alloc, and should've been completely initialized. : Interruptible waits if possible.

As a side effect, the object pointed to by may have been freed when this function returns. If this function returns with an error code, the caller needs to free that object.

Definition at line 955 of file vmwgfx_fence.c.

void vmw_event_fence_fpriv_gone ( struct vmw_fence_manager fman,
struct list_head event_list 
)

vmw_event_fence_fpriv_gone - Remove references to struct drm_file objects

: Pointer to a struct vmw_fence_manager : Pointer to linked list of struct vmw_event_fence_action objects with pointers to a struct drm_file object about to be closed.

This function removes all pending fence events with references to a specific struct drm_file object about to be closed. The caller is required to pass a list of all struct vmw_event_fence_action objects with such events attached. This function is typically called before the struct drm_file object's event management is taken down.

Definition at line 800 of file vmwgfx_fence.c.

int vmw_fence_create ( struct vmw_fence_manager fman,
uint32_t  seqno,
uint32_t  mask,
struct vmw_fence_obj **  p_fence 
)

Definition at line 498 of file vmwgfx_fence.c.

int vmw_fence_event_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 1062 of file vmwgfx_fence.c.

void vmw_fence_fifo_down ( struct vmw_fence_manager fman)

vmw_fence_fifo_down - signal all unsignaled fence objects.

Definition at line 630 of file vmwgfx_fence.c.

void vmw_fence_fifo_up ( struct vmw_fence_manager fman)

Definition at line 672 of file vmwgfx_fence.c.

struct vmw_fence_manager* vmw_fence_manager_init ( struct vmw_private dev_priv)
read

Definition at line 171 of file vmwgfx_fence.c.

void vmw_fence_manager_takedown ( struct vmw_fence_manager fman)

Definition at line 193 of file vmwgfx_fence.c.

void vmw_fence_obj_add_action ( struct vmw_fence_obj fence,
struct vmw_fence_action action 
)

vmw_fence_obj_add_action - Add an action to a fence object.

- The fence object. - The action to add.

Note that the action callbacks may be executed before this function returns.

Definition at line 900 of file vmwgfx_fence.c.

void vmw_fence_obj_flush ( struct vmw_fence_obj fence)

Definition at line 479 of file vmwgfx_fence.c.

struct vmw_fence_obj* vmw_fence_obj_reference ( struct vmw_fence_obj fence)
read

Definition at line 242 of file vmwgfx_fence.c.

bool vmw_fence_obj_signaled ( struct vmw_fence_obj fence,
uint32_t  flags 
)

Definition at line 420 of file vmwgfx_fence.c.

int vmw_fence_obj_signaled_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 741 of file vmwgfx_fence.c.

int vmw_fence_obj_unref_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 776 of file vmwgfx_fence.c.

void vmw_fence_obj_unreference ( struct vmw_fence_obj **  fence_p)

vmw_fence_obj_unreference

Note that this function may not be entered with disabled irqs since it may re-enable them in the destroy function.

Definition at line 258 of file vmwgfx_fence.c.

int vmw_fence_obj_wait ( struct vmw_fence_obj fence,
uint32_t  flags,
bool  lazy,
bool  interruptible,
unsigned long  timeout 
)

Definition at line 445 of file vmwgfx_fence.c.

int vmw_fence_obj_wait_ioctl ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 682 of file vmwgfx_fence.c.

void vmw_fences_perform_actions ( struct vmw_fence_manager fman,
struct list_head list 
)

Definition at line 274 of file vmwgfx_fence.c.

void vmw_fences_update ( struct vmw_fence_manager fman)

Definition at line 374 of file vmwgfx_fence.c.

int vmw_user_fence_create ( struct drm_file *  file_priv,
struct vmw_fence_manager fman,
uint32_t  seqno,
uint32_t  mask,
struct vmw_fence_obj **  p_fence,
uint32_t p_handle 
)

Definition at line 559 of file vmwgfx_fence.c.