drivers/gpu/drm/imagination/pvr_free_list.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/imagination/pvr_free_list.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/imagination/pvr_free_list.c- Extension
.c- Size
- 17128 bytes
- Lines
- 625
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
pvr_free_list.hpvr_gem.hpvr_hwrt.hpvr_rogue_fwif.hpvr_vm.hdrm/drm_gem.hlinux/slab.hlinux/xarray.huapi/drm/pvr_drm.h
Detected Declarations
function pvr_get_free_list_min_pagesfunction free_list_create_kernel_structurefunction free_list_destroy_kernel_structurefunction calculate_free_list_ready_pages_lockedfunction calculate_free_list_ready_pagesfunction free_list_fw_initfunction free_list_create_fw_structurefunction free_list_destroy_fw_structurefunction pvr_free_list_insert_pages_lockedfunction pvr_free_list_insert_node_lockedfunction pvr_free_list_growfunction pvr_free_list_process_grow_reqfunction pvr_free_list_free_nodefunction pvr_free_list_createfunction pvr_free_list_releasefunction pvr_destroy_free_lists_for_filefunction xa_for_eachfunction pvr_free_list_putfunction pvr_free_list_add_hwrtfunction pvr_free_list_remove_hwrtfunction pvr_free_list_reconstructfunction pvr_free_list_process_reconstruct_req
Annotated Snippet
if (!WARN_ON(IS_ERR(hwrt_fw_data))) {
hwrt_fw_data->state = ROGUE_FWIF_RTDATA_STATE_HWR;
hwrt_fw_data->hwrt_data_flags &= ~HWRTDATA_HAS_LAST_GEOM;
}
pvr_fw_object_vunmap(hwrt_data->fw_obj);
}
mutex_unlock(&free_list->lock);
pvr_free_list_put(free_list);
}
void
pvr_free_list_process_reconstruct_req(struct pvr_device *pvr_dev,
struct rogue_fwif_fwccb_cmd_freelists_reconstruction_data *req)
{
struct rogue_fwif_kccb_cmd resp_cmd = {
.cmd_type = ROGUE_FWIF_KCCB_CMD_FREELISTS_RECONSTRUCTION_UPDATE,
};
struct rogue_fwif_freelists_reconstruction_data *resp =
&resp_cmd.cmd_data.free_lists_reconstruction_data;
for (u32 i = 0; i < req->freelist_count; i++)
pvr_free_list_reconstruct(pvr_dev, req->freelist_ids[i]);
resp->freelist_count = req->freelist_count;
memcpy(resp->freelist_ids, req->freelist_ids,
req->freelist_count * sizeof(resp->freelist_ids[0]));
WARN_ON(pvr_kccb_send_cmd(pvr_dev, &resp_cmd, NULL));
}
Annotation
- Immediate include surface: `pvr_free_list.h`, `pvr_gem.h`, `pvr_hwrt.h`, `pvr_rogue_fwif.h`, `pvr_vm.h`, `drm/drm_gem.h`, `linux/slab.h`, `linux/xarray.h`.
- Detected declarations: `function pvr_get_free_list_min_pages`, `function free_list_create_kernel_structure`, `function free_list_destroy_kernel_structure`, `function calculate_free_list_ready_pages_locked`, `function calculate_free_list_ready_pages`, `function free_list_fw_init`, `function free_list_create_fw_structure`, `function free_list_destroy_fw_structure`, `function pvr_free_list_insert_pages_locked`, `function pvr_free_list_insert_node_locked`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.