drivers/staging/media/atomisp/pci/isp/kernels/ob/ob_1.0/ia_css_ob.host.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/isp/kernels/ob/ob_1.0/ia_css_ob.host.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/isp/kernels/ob/ob_1.0/ia_css_ob.host.c- Extension
.c- Size
- 3971 bytes
- Lines
- 147
- 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
ia_css_types.hsh_css_defs.hia_css_debug.hisp.hia_css_ob.host.h
Detected Declarations
function ia_css_ob_configurefunction ia_css_ob_encodefunction ia_css_ob_vmem_encodefunction ia_css_ob_dumpfunction ia_css_ob_debug_dtrace
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Support for Intel Camera Imaging ISP subsystem.
* Copyright (c) 2015, Intel Corporation.
*/
#include "ia_css_types.h"
#include "sh_css_defs.h"
#include "ia_css_debug.h"
#include "isp.h"
#include "ia_css_ob.host.h"
const struct ia_css_ob_config default_ob_config = {
IA_CSS_OB_MODE_NONE,
0,
0,
0,
0,
0,
0
};
/* TODO: include ob.isp.h to get isp knowledge and
add assert on platform restrictions */
void
ia_css_ob_configure(
struct sh_css_isp_ob_stream_config *config,
unsigned int isp_pipe_version,
unsigned int raw_bit_depth)
{
config->isp_pipe_version = isp_pipe_version;
config->raw_bit_depth = raw_bit_depth;
}
void
ia_css_ob_encode(
struct sh_css_isp_ob_params *to,
const struct ia_css_ob_config *from,
const struct sh_css_isp_ob_stream_config *config,
unsigned int size)
{
unsigned int ob_bit_depth
= config->isp_pipe_version == 2 ? SH_CSS_BAYER_BITS : config->raw_bit_depth;
unsigned int scale = 16 - ob_bit_depth;
(void)size;
switch (from->mode) {
case IA_CSS_OB_MODE_FIXED:
to->blacklevel_gr = from->level_gr >> scale;
to->blacklevel_r = from->level_r >> scale;
to->blacklevel_b = from->level_b >> scale;
to->blacklevel_gb = from->level_gb >> scale;
to->area_start_bq = 0;
to->area_length_bq = 0;
to->area_length_bq_inverse = 0;
break;
case IA_CSS_OB_MODE_RASTER:
to->blacklevel_gr = 0;
to->blacklevel_r = 0;
to->blacklevel_b = 0;
to->blacklevel_gb = 0;
to->area_start_bq = from->start_position;
to->area_length_bq =
(from->end_position - from->start_position) + 1;
to->area_length_bq_inverse = AREA_LENGTH_UNIT / to->area_length_bq;
break;
default:
to->blacklevel_gr = 0;
to->blacklevel_r = 0;
to->blacklevel_b = 0;
to->blacklevel_gb = 0;
to->area_start_bq = 0;
to->area_length_bq = 0;
to->area_length_bq_inverse = 0;
break;
}
}
void
ia_css_ob_vmem_encode(
struct sh_css_isp_ob_vmem_params *to,
const struct ia_css_ob_config *from,
const struct sh_css_isp_ob_stream_config *config,
unsigned int size)
{
struct sh_css_isp_ob_params tmp;
struct sh_css_isp_ob_params *ob = &tmp;
Annotation
- Immediate include surface: `ia_css_types.h`, `sh_css_defs.h`, `ia_css_debug.h`, `isp.h`, `ia_css_ob.host.h`.
- Detected declarations: `function ia_css_ob_configure`, `function ia_css_ob_encode`, `function ia_css_ob_vmem_encode`, `function ia_css_ob_dump`, `function ia_css_ob_debug_dtrace`.
- 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.