drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/runtime/isys/src/ibuf_ctrl_rmgr.c- Extension
.c- Size
- 2504 bytes
- Lines
- 114
- Domain
- Driver Families
- Bucket
- drivers/staging
- 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.
Dependency Surface
system_global.hassert_support.hplatform_support.hia_css_isys.hibuf_ctrl_rmgr.h
Detected Declarations
function ia_css_isys_ibuf_rmgr_initfunction ia_css_isys_ibuf_rmgr_uninitfunction ia_css_isys_ibuf_rmgr_acquirefunction ia_css_isys_ibuf_rmgr_release
Annotated Snippet
if (!handle->active) {
if (handle->size >= aligned_size) {
handle->active = true;
input_buffer_found = true;
ibuf_rsrc.num_active++;
break;
}
}
}
}
if (!input_buffer_found) {
/* There were no available handles that fulfilled the
* request. Allocate a new handle with the requested size.
*/
if ((ibuf_rsrc.num_allocated < MAX_IBUF_HANDLES) &&
(ibuf_rsrc.free_size >= aligned_size)) {
handle = getHandle(ibuf_rsrc.num_allocated);
handle->start_addr = ibuf_rsrc.free_start_addr;
handle->size = aligned_size;
handle->active = true;
ibuf_rsrc.free_start_addr += aligned_size;
ibuf_rsrc.free_size -= aligned_size;
ibuf_rsrc.num_active++;
ibuf_rsrc.num_allocated++;
input_buffer_found = true;
}
}
if (input_buffer_found && handle) {
*start_addr = handle->start_addr;
retval = true;
}
return retval;
}
void ia_css_isys_ibuf_rmgr_release(
uint32_t *start_addr)
{
u16 i;
ibuf_handle_t *handle = NULL;
assert(start_addr);
for (i = 0; i < ibuf_rsrc.num_allocated; i++) {
handle = getHandle(i);
if (handle->active && handle->start_addr == *start_addr) {
handle->active = false;
ibuf_rsrc.num_active--;
break;
}
}
}
Annotation
- Immediate include surface: `system_global.h`, `assert_support.h`, `platform_support.h`, `ia_css_isys.h`, `ibuf_ctrl_rmgr.h`.
- Detected declarations: `function ia_css_isys_ibuf_rmgr_init`, `function ia_css_isys_ibuf_rmgr_uninit`, `function ia_css_isys_ibuf_rmgr_acquire`, `function ia_css_isys_ibuf_rmgr_release`.
- Atlas domain: Driver Families / drivers/staging.
- 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.