XenevaOS
Loading...
Searching...
No Matches
Public Attributes | List of all members
dma_resv Struct Reference

#include <dma-resv.h>

Public Attributes

struct ww_mutex lock
 
struct dma_resv_list __rcu * fences
 

Detailed Description

struct dma_resv - a reservation object manages fences for a buffer

This is a container for dma_fence objects which needs to handle multiple use cases.

One use is to synchronize cross-driver access to a struct dma_buf, either for dynamic buffer management or just to handle implicit synchronization between different users of the buffer in userspace. See &dma_buf.resv for a more in-depth discussion.

The other major use is to manage access and locking within a driver in a buffer based memory manager. struct ttm_buffer_object is the canonical example here, since this is where reservation objects originated from. But use in drivers is spreading and some drivers also manage struct drm_gem_object with the same scheme.

Member Data Documentation

◆ fences

struct dma_resv_list __rcu* dma_resv::fences

@fences:

Array of fences which where added to the dma_resv object

A new fence is added by calling dma_resv_add_fence(). Since this often needs to be done past the point of no return in command submission it cannot fail, and therefore sufficient slots need to be reserved by calling dma_resv_reserve_fences().

◆ lock

struct ww_mutex dma_resv::lock

@lock:

Update side lock. Don't use directly, instead use the wrapper functions like dma_resv_lock() and dma_resv_unlock().

Drivers which use the reservation object to manage memory dynamically also use this lock to protect buffer object state like placement, allocation policies or throughout command submission.


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