drivers/staging/media/atomisp/pci/runtime/isys/src/virtual_isys.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/runtime/isys/src/virtual_isys.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/runtime/isys/src/virtual_isys.c- Extension
.c- Size
- 22249 bytes
- Lines
- 832
- 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
linux/bitops.hlinux/math.hlinux/string.hsystem_global.hia_css_isys.hia_css_debug.hvirtual_isys.hisp.hsh_css_defs.h
Detected Declarations
function ia_css_isys_stream_createfunction ia_css_isys_stream_destroyfunction ia_css_isys_stream_calculate_cfgfunction create_input_system_channelfunction destroy_input_system_channelfunction create_input_system_input_portfunction destroy_input_system_input_portfunction calculate_input_system_channel_cfgfunction calculate_input_system_input_port_cfgfunction acquire_sidfunction release_sidfunction calculate_stridefunction acquire_ib_bufferfunction release_ib_bufferfunction acquire_dma_channelfunction release_dma_channelfunction acquire_be_lut_entryfunction release_be_lut_entryfunction calculate_prbs_cfgfunction calculate_fe_cfgfunction calculate_be_cfgfunction calculate_stream2mmio_cfgfunction calculate_ibuf_ctrl_cfgfunction calculate_isys2401_dma_cfgfunction calculate_isys2401_dma_port_cfgfunction get_csi_mipi_packet_type
Annotated Snippet
if (!rc) {
destroy_input_system_input_port(&isys_stream->input_port);
destroy_input_system_channel(&isys_stream->channel);
return false;
}
}
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"ia_css_isys_stream_create() leave:\n");
return true;
}
void ia_css_isys_stream_destroy(
ia_css_isys_stream_h isys_stream)
{
destroy_input_system_input_port(&isys_stream->input_port);
destroy_input_system_channel(&isys_stream->channel);
if (isys_stream->enable_metadata) {
/* Destroy metadata channel only if its allocated*/
destroy_input_system_channel(&isys_stream->md_channel);
}
}
ia_css_isys_error_t ia_css_isys_stream_calculate_cfg(
ia_css_isys_stream_h isys_stream,
ia_css_isys_descr_t *isys_stream_descr,
ia_css_isys_stream_cfg_t *isys_stream_cfg)
{
ia_css_isys_error_t rc;
if (!isys_stream_cfg ||
!isys_stream_descr ||
!isys_stream)
return false;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"ia_css_isys_stream_calculate_cfg() enter:\n");
rc = calculate_input_system_channel_cfg(
&isys_stream->channel,
&isys_stream->input_port,
isys_stream_descr,
&isys_stream_cfg->channel_cfg,
false);
if (!rc)
return false;
/* configure metadata channel */
if (isys_stream_descr->metadata.enable) {
isys_stream_cfg->enable_metadata = true;
rc = calculate_input_system_channel_cfg(
&isys_stream->md_channel,
&isys_stream->input_port,
isys_stream_descr,
&isys_stream_cfg->md_channel_cfg,
true);
if (!rc)
return false;
}
rc = calculate_input_system_input_port_cfg(
&isys_stream->channel,
&isys_stream->input_port,
isys_stream_descr,
&isys_stream_cfg->input_port_cfg);
if (!rc)
return false;
isys_stream->valid = 1;
isys_stream_cfg->valid = 1;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"ia_css_isys_stream_calculate_cfg() leave:\n");
return rc;
}
/* end of Public Methods */
/**************************************************
*
* Private Methods
*
**************************************************/
static bool create_input_system_channel(
isp2401_input_system_cfg_t *cfg,
bool metadata,
input_system_channel_t *me)
{
bool rc = true;
me->dma_id = ISYS2401_DMA0_ID;
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/math.h`, `linux/string.h`, `system_global.h`, `ia_css_isys.h`, `ia_css_debug.h`, `virtual_isys.h`, `isp.h`.
- Detected declarations: `function ia_css_isys_stream_create`, `function ia_css_isys_stream_destroy`, `function ia_css_isys_stream_calculate_cfg`, `function create_input_system_channel`, `function destroy_input_system_channel`, `function create_input_system_input_port`, `function destroy_input_system_input_port`, `function calculate_input_system_channel_cfg`, `function calculate_input_system_input_port_cfg`, `function acquire_sid`.
- 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.