drivers/staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/runtime/pipeline/src/pipeline.c- Extension
.c- Size
- 21948 bytes
- Lines
- 770
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
hmm.hia_css_debug.hsw_event_global.hsp.hassert_support.hsh_css_sp.hia_css_pipeline.hia_css_isp_param.hia_css_bufq.h
Detected Declarations
function ia_css_pipeline_initfunction ia_css_pipeline_createfunction ia_css_pipeline_mapfunction ia_css_pipeline_destroyfunction ia_css_pipeline_startfunction ia_css_pipeline_get_sp_thread_idfunction ia_css_pipeline_dump_thread_map_infofunction ia_css_pipeline_request_stopfunction ia_css_pipeline_cleanfunction ia_css_pipeline_create_and_add_stagefunction ia_css_pipeline_finalize_stagesfunction ia_css_pipeline_get_stagefunction ia_css_pipeline_get_stage_from_fwfunction ia_css_pipeline_get_fw_from_stagefunction ia_css_pipeline_get_output_stagefunction ia_css_pipeline_has_stoppedfunction ia_css_pipeline_is_mappedfunction inputfunction pipeline_init_sp_thread_mapfunction pipeline_map_num_to_sp_threadfunction pipeline_unmap_num_to_sp_threadfunction pipeline_stage_createfunction pipeline_init_defaultsfunction ia_css_pipeline_set_zoom_stagefunction ia_css_pipeline_configure_inout_port
Annotated Snippet
if (s->mode == mode) {
*stage = s;
return 0;
}
}
return -EINVAL;
}
int ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline
*pipeline,
u32 fw_handle,
struct ia_css_pipeline_stage **stage)
{
struct ia_css_pipeline_stage *s;
assert(pipeline);
assert(stage);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
for (s = pipeline->stages; s; s = s->next) {
if ((s->firmware) && (s->firmware->handle == fw_handle)) {
*stage = s;
return 0;
}
}
return -EINVAL;
}
int ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline
*pipeline,
u32 stage_num,
uint32_t *fw_handle)
{
struct ia_css_pipeline_stage *s;
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "%s()\n", __func__);
if ((!pipeline) || (!fw_handle))
return -EINVAL;
for (s = pipeline->stages; s; s = s->next) {
if ((s->stage_num == stage_num) && (s->firmware)) {
*fw_handle = s->firmware->handle;
return 0;
}
}
return -EINVAL;
}
int ia_css_pipeline_get_output_stage(
struct ia_css_pipeline *pipeline,
int mode,
struct ia_css_pipeline_stage **stage)
{
struct ia_css_pipeline_stage *s;
assert(pipeline);
assert(stage);
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
"ia_css_pipeline_get_output_stage() enter:\n");
*stage = NULL;
/* First find acceleration firmware at end of pipe */
for (s = pipeline->stages; s; s = s->next) {
if (s->firmware && s->mode == mode &&
s->firmware->info.isp.sp.enable.output)
*stage = s;
}
if (*stage)
return 0;
/* If no firmware, find binary in pipe */
return ia_css_pipeline_get_stage(pipeline, mode, stage);
}
bool ia_css_pipeline_has_stopped(struct ia_css_pipeline *pipeline)
{
/* Android compilation files if made an local variable
stack size on android is limited to 2k and this structure
is around 2.5K, in place of static malloc can be done but
if this call is made too often it will lead to fragment memory
versus a fixed allocation */
static struct sh_css_sp_group sp_group;
unsigned int thread_id;
const struct ia_css_fw_info *fw;
unsigned int HIVE_ADDR_sp_group;
fw = &sh_css_sp_fw;
HIVE_ADDR_sp_group = fw->info.sp.group;
ia_css_pipeline_get_sp_thread_id(pipeline->pipe_num, &thread_id);
sp_dmem_load(SP0_ID,
(unsigned int)sp_address_of(sp_group),
Annotation
- Immediate include surface: `hmm.h`, `ia_css_debug.h`, `sw_event_global.h`, `sp.h`, `assert_support.h`, `sh_css_sp.h`, `ia_css_pipeline.h`, `ia_css_isp_param.h`.
- Detected declarations: `function ia_css_pipeline_init`, `function ia_css_pipeline_create`, `function ia_css_pipeline_map`, `function ia_css_pipeline_destroy`, `function ia_css_pipeline_start`, `function ia_css_pipeline_get_sp_thread_id`, `function ia_css_pipeline_dump_thread_map_info`, `function ia_css_pipeline_request_stop`, `function ia_css_pipeline_clean`, `function ia_css_pipeline_create_and_add_stage`.
- 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.