drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c- Extension
.c- Size
- 1343 bytes
- Lines
- 52
- 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_internal.hassert_support.hsh_css_frac.hia_css_bh.host.h
Detected Declarations
function Copyrightfunction ia_css_bh_encode
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_internal.h"
#include "assert_support.h"
#include "sh_css_frac.h"
#include "ia_css_bh.host.h"
void ia_css_bh_hmem_decode(struct ia_css_3a_rgby_output *out_ptr,
const struct ia_css_bh_table *hmem_buf)
{
int i;
/*
* No weighted histogram, hence no grid definition
*/
if (!hmem_buf)
return;
assert(sizeof_hmem(HMEM0_ID) == sizeof(*hmem_buf));
/* Deinterleave */
for (i = 0; i < HMEM_UNIT_SIZE; i++) {
out_ptr[i].r = hmem_buf->hmem[BH_COLOR_R][i];
out_ptr[i].g = hmem_buf->hmem[BH_COLOR_G][i];
out_ptr[i].b = hmem_buf->hmem[BH_COLOR_B][i];
out_ptr[i].y = hmem_buf->hmem[BH_COLOR_Y][i];
/* sh_css_print ("hmem[%d] = %d, %d, %d, %d\n",
i, out_ptr[i].r, out_ptr[i].g, out_ptr[i].b, out_ptr[i].y); */
}
}
void ia_css_bh_encode(struct sh_css_isp_bh_params *to,
const struct ia_css_3a_config *from,
unsigned int size)
{
(void)size;
/* coefficients to calculate Y */
to->y_coef_r =
uDIGIT_FITTING(from->ae_y_coef_r, 16, SH_CSS_AE_YCOEF_SHIFT);
to->y_coef_g =
uDIGIT_FITTING(from->ae_y_coef_g, 16, SH_CSS_AE_YCOEF_SHIFT);
to->y_coef_b =
uDIGIT_FITTING(from->ae_y_coef_b, 16, SH_CSS_AE_YCOEF_SHIFT);
}
Annotation
- Immediate include surface: `ia_css_types.h`, `sh_css_internal.h`, `assert_support.h`, `sh_css_frac.h`, `ia_css_bh.host.h`.
- Detected declarations: `function Copyright`, `function ia_css_bh_encode`.
- 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.