/* Forward declaration from pvr_gem.h. */ struct pvr_fw_object;
/* Forward declaration from pvr_gem.h. */ struct pvr_gem_object;
/* Forward declaration from pvr_hwrt.h. */ struct pvr_hwrt_data;
/** * struct pvr_free_list_node - structure representing an allocation in the free * list
*/ struct pvr_free_list_node { /** @node: List node for &pvr_free_list.mem_block_list. */ struct list_head node;
/** * pvr_free_list_lookup() - Lookup free list pointer from handle and file * @pvr_file: Pointer to pvr_file structure. * @handle: Object handle. * * Takes reference on free list object. Call pvr_free_list_put() to release. * * Returns: * * The requested object on success, or * * %NULL on failure (object does not exist in list, is not a free list, or * does not belong to @pvr_file)
*/ static __always_inline struct pvr_free_list *
pvr_free_list_lookup(struct pvr_file *pvr_file, u32 handle)
{ struct pvr_free_list *free_list;
/** * pvr_free_list_lookup_id() - Lookup free list pointer from FW ID * @pvr_dev: Device pointer. * @id: FW object ID. * * Takes reference on free list object. Call pvr_free_list_put() to release. * * Returns: * * The requested object on success, or * * %NULL on failure (object does not exist in list, or is not a free list)
*/ static __always_inline struct pvr_free_list *
pvr_free_list_lookup_id(struct pvr_device *pvr_dev, u32 id)
{ struct pvr_free_list *free_list;
xa_lock(&pvr_dev->free_list_ids);
/* Contexts are removed from the ctx_ids set in the context release path, * meaning the ref_count reached zero before they get removed. We need * to make sure we're not trying to acquire a context that's being * destroyed.
*/
free_list = xa_load(&pvr_dev->free_list_ids, id); if (free_list && !kref_get_unless_zero(&free_list->ref_count))
free_list = NULL;
xa_unlock(&pvr_dev->free_list_ids);
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.