drivers/gpu/drm/imagination/pvr_free_list.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/imagination/pvr_free_list.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/imagination/pvr_free_list.h- Extension
.h- Size
- 5377 bytes
- Lines
- 196
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/compiler_attributes.hlinux/kref.hlinux/list.hlinux/mutex.hlinux/types.hlinux/xarray.huapi/drm/pvr_drm.hpvr_device.h
Detected Declarations
struct pvr_fw_objectstruct pvr_gem_objectstruct pvr_hwrt_datastruct pvr_free_list_nodestruct pvr_free_listfunction pvr_free_list_getfunction pvr_free_list_lookupfunction pvr_free_list_lookup_id
Annotated Snippet
struct pvr_free_list_node {
/** @node: List node for &pvr_free_list.mem_block_list. */
struct list_head node;
/** @free_list: Pointer to owning free list. */
struct pvr_free_list *free_list;
/** @num_pages: Number of pages in this node. */
u32 num_pages;
/** @mem_obj: GEM object representing the pages in this node. */
struct pvr_gem_object *mem_obj;
};
/**
* struct pvr_free_list - structure representing a free list
*/
struct pvr_free_list {
/** @ref_count: Reference count of object. */
struct kref ref_count;
/** @pvr_dev: Pointer to device that owns this object. */
struct pvr_device *pvr_dev;
/** @obj: GEM object representing the free list. */
struct pvr_gem_object *obj;
/** @fw_obj: FW object representing the FW-side structure. */
struct pvr_fw_object *fw_obj;
/** @fw_data: Pointer to CPU mapping of the FW-side structure. */
struct rogue_fwif_freelist *fw_data;
/**
* @lock: Mutex protecting modification of the free list. Must be held when accessing any
* of the members below.
*/
struct mutex lock;
/** @fw_id: Firmware ID for this object. */
u32 fw_id;
/** @current_pages: Current number of pages in free list. */
u32 current_pages;
/** @max_pages: Maximum number of pages in free list. */
u32 max_pages;
/** @grow_pages: Pages to grow free list by per request. */
u32 grow_pages;
/**
* @grow_threshold: Percentage of FL memory used that should trigger a
* new grow request.
*/
u32 grow_threshold;
/**
* @ready_pages: Number of pages reserved for FW to use while a grow
* request is being processed.
*/
u32 ready_pages;
/** @mem_block_list: List of memory blocks in this free list. */
struct list_head mem_block_list;
/** @hwrt_list: List of HWRTs using this free list. */
struct list_head hwrt_list;
/** @initial_num_pages: Initial number of pages in free list. */
u32 initial_num_pages;
/** @free_list_gpu_addr: Address of free list in GPU address space. */
u64 free_list_gpu_addr;
};
struct pvr_free_list *
pvr_free_list_create(struct pvr_file *pvr_file,
struct drm_pvr_ioctl_create_free_list_args *args);
void
pvr_destroy_free_lists_for_file(struct pvr_file *pvr_file);
u32
pvr_get_free_list_min_pages(struct pvr_device *pvr_dev);
static __always_inline struct pvr_free_list *
pvr_free_list_get(struct pvr_free_list *free_list)
{
if (free_list)
Annotation
- Immediate include surface: `linux/compiler_attributes.h`, `linux/kref.h`, `linux/list.h`, `linux/mutex.h`, `linux/types.h`, `linux/xarray.h`, `uapi/drm/pvr_drm.h`, `pvr_device.h`.
- Detected declarations: `struct pvr_fw_object`, `struct pvr_gem_object`, `struct pvr_hwrt_data`, `struct pvr_free_list_node`, `struct pvr_free_list`, `function pvr_free_list_get`, `function pvr_free_list_lookup`, `function pvr_free_list_lookup_id`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.