/** * struct drm_syncobj - sync object. * * This structure defines a generic sync object which wraps a &dma_fence.
*/ struct drm_syncobj { /** * @refcount: Reference count of this object.
*/ struct kref refcount; /** * @fence: * NULL or a pointer to the fence bound to this object. * * This field should not be used directly. Use drm_syncobj_fence_get() * and drm_syncobj_replace_fence() instead.
*/ struct dma_fence __rcu *fence; /** * @cb_list: List of callbacks to call when the &fence gets replaced.
*/ struct list_head cb_list; /** * @ev_fd_list: List of registered eventfd.
*/ struct list_head ev_fd_list; /** * @lock: Protects &cb_list and &ev_fd_list, and write-locks &fence.
*/
spinlock_t lock; /** * @file: A file backing for this syncobj.
*/ struct file *file;
};
void drm_syncobj_free(struct kref *kref);
/** * drm_syncobj_get - acquire a syncobj reference * @obj: sync object * * This acquires an additional reference to @obj. It is illegal to call this * without already holding a reference. No locks required.
*/ staticinlinevoid
drm_syncobj_get(struct drm_syncobj *obj)
{
kref_get(&obj->refcount);
}
/** * drm_syncobj_put - release a reference to a sync object. * @obj: sync object.
*/ staticinlinevoid
drm_syncobj_put(struct drm_syncobj *obj)
{
kref_put(&obj->refcount, drm_syncobj_free);
}
/** * drm_syncobj_fence_get - get a reference to a fence in a sync object * @syncobj: sync object. * * This acquires additional reference to &drm_syncobj.fence contained in @obj, * if not NULL. It is illegal to call this without already holding a reference. * No locks required. * * Returns: * Either the fence of @obj or NULL if there's none.
*/ staticinlinestruct dma_fence *
drm_syncobj_fence_get(struct drm_syncobj *syncobj)
{ struct dma_fence *fence;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.