drivers/staging/media/atomisp/pci/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/isp/kernels/ipu2_io_ls/yuv444_io_ls/ia_css_yuv444_io.host.c- Extension
.c- Size
- 2921 bytes
- Lines
- 92
- 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
linux/bitops.hlinux/math.hia_css_yuv444_io.host.hdma.hia_css_debug.hia_css_isp_params.hia_css_frame.h
Detected Declarations
function ia_css_yuv444_io_config
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
Support for Intel Camera Imaging ISP subsystem.
Copyright (c) 2010 - 2015, Intel Corporation.
*/
#include <linux/bitops.h>
#include <linux/math.h>
#include "ia_css_yuv444_io.host.h"
#include "dma.h"
#ifndef IA_CSS_NO_DEBUG
#include "ia_css_debug.h"
#endif
#include "ia_css_isp_params.h"
#include "ia_css_frame.h"
int ia_css_yuv444_io_config(const struct ia_css_binary *binary,
const struct sh_css_binary_args *args)
{
const struct ia_css_frame *in_frame = args->in_frame;
const struct ia_css_frame **out_frames = (const struct ia_css_frame **)
&args->out_frame;
const struct ia_css_frame_info *in_frame_info = ia_css_frame_get_info(in_frame);
const unsigned int ddr_elems_per_word =
DIV_ROUND_UP(HIVE_ISP_DDR_WORD_BITS, BITS_PER_TYPE(short));
unsigned int size_get = 0, size_put = 0;
unsigned int offset = 0;
int ret;
if (binary->info->mem_offsets.offsets.param) {
size_get = binary->info->mem_offsets.offsets.param->dmem.get.size;
offset = binary->info->mem_offsets.offsets.param->dmem.get.offset;
}
if (size_get) {
struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
struct dma_port_config config;
#ifndef IA_CSS_NO_DEBUG
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"ia_css_yuv444_io_config() get part enter:\n");
#endif
ret = ia_css_dma_configure_from_info(&config, in_frame_info);
if (ret)
return ret;
// The base_address of the input frame will be set in the ISP
to->width = in_frame_info->res.width;
to->height = in_frame_info->res.height;
to->stride = config.stride;
to->ddr_elems_per_word = ddr_elems_per_word;
#ifndef IA_CSS_NO_DEBUG
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"ia_css_yuv444_io_config() get part leave:\n");
#endif
}
if (binary->info->mem_offsets.offsets.param) {
size_put = binary->info->mem_offsets.offsets.param->dmem.put.size;
offset = binary->info->mem_offsets.offsets.param->dmem.put.offset;
}
if (size_put) {
struct ia_css_common_io_config *to = (struct ia_css_common_io_config *)
&binary->mem_params.params[IA_CSS_PARAM_CLASS_PARAM][IA_CSS_ISP_DMEM].address[offset];
struct dma_port_config config;
#ifndef IA_CSS_NO_DEBUG
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"ia_css_yuv444_io_config() put part enter:\n");
#endif
ret = ia_css_dma_configure_from_info(&config, &out_frames[0]->frame_info);
if (ret)
return ret;
to->base_address = out_frames[0]->data;
to->width = out_frames[0]->frame_info.res.width;
to->height = out_frames[0]->frame_info.res.height;
to->stride = config.stride;
to->ddr_elems_per_word = ddr_elems_per_word;
#ifndef IA_CSS_NO_DEBUG
ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE_PRIVATE,
"ia_css_yuv444_io_config() put part leave:\n");
#endif
}
return 0;
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/math.h`, `ia_css_yuv444_io.host.h`, `dma.h`, `ia_css_debug.h`, `ia_css_isp_params.h`, `ia_css_frame.h`.
- Detected declarations: `function ia_css_yuv444_io_config`.
- 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.