drivers/staging/media/atomisp/pci/isp/kernels/dp/dp_1.0/ia_css_dp.host.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/isp/kernels/dp/dp_1.0/ia_css_dp.host.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/isp/kernels/dp/dp_1.0/ia_css_dp.host.c- Extension
.c- Size
- 3284 bytes
- Lines
- 124
- 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.hsh_css_frac.hia_css_dp.host.h
Detected Declarations
function ia_css_dp_encodefunction ia_css_dp_dumpfunction ia_css_dp_debug_dtracefunction ia_css_init_dp_state
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 "sh_css_frac.h"
#include "ia_css_dp.host.h"
/* We use a different set of DPC configuration parameters when
* DPC is used before OBC and NORM. Currently these parameters
* are used in usecases which selects both BDS and DPC.
**/
const struct ia_css_dp_config default_dp_10bpp_config = {
1024,
2048,
32768,
32768,
32768,
32768
};
const struct ia_css_dp_config default_dp_config = {
8192,
2048,
32768,
32768,
32768,
32768
};
void
ia_css_dp_encode(
struct sh_css_isp_dp_params *to,
const struct ia_css_dp_config *from,
unsigned int size)
{
int gain = from->gain;
int gr = from->gr;
int r = from->r;
int b = from->b;
int gb = from->gb;
(void)size;
to->threshold_single =
SH_CSS_BAYER_MAXVAL;
to->threshold_2adjacent =
uDIGIT_FITTING(from->threshold, 16, SH_CSS_BAYER_BITS);
to->gain =
uDIGIT_FITTING(from->gain, 8, SH_CSS_DP_GAIN_SHIFT);
to->coef_rr_gr =
uDIGIT_FITTING(gain * gr / r, 8, SH_CSS_DP_GAIN_SHIFT);
to->coef_rr_gb =
uDIGIT_FITTING(gain * gb / r, 8, SH_CSS_DP_GAIN_SHIFT);
to->coef_bb_gb =
uDIGIT_FITTING(gain * gb / b, 8, SH_CSS_DP_GAIN_SHIFT);
to->coef_bb_gr =
uDIGIT_FITTING(gain * gr / b, 8, SH_CSS_DP_GAIN_SHIFT);
to->coef_gr_rr =
uDIGIT_FITTING(gain * r / gr, 8, SH_CSS_DP_GAIN_SHIFT);
to->coef_gr_bb =
uDIGIT_FITTING(gain * b / gr, 8, SH_CSS_DP_GAIN_SHIFT);
to->coef_gb_bb =
uDIGIT_FITTING(gain * b / gb, 8, SH_CSS_DP_GAIN_SHIFT);
to->coef_gb_rr =
uDIGIT_FITTING(gain * r / gb, 8, SH_CSS_DP_GAIN_SHIFT);
}
void
ia_css_dp_dump(
const struct sh_css_isp_dp_params *dp,
unsigned int level)
{
if (!dp) return;
ia_css_debug_dtrace(level, "Defect Pixel Correction:\n");
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
"dp_threshold_single_w_2adj_on",
dp->threshold_single);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
"dp_threshold_2adj_w_2adj_on",
dp->threshold_2adjacent);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
"dp_gain", dp->gain);
ia_css_debug_dtrace(level, "\t%-32s = %d\n",
"dpc_coef_rr_gr", dp->coef_rr_gr);
Annotation
- Immediate include surface: `ia_css_types.h`, `sh_css_defs.h`, `ia_css_debug.h`, `sh_css_frac.h`, `ia_css_dp.host.h`.
- Detected declarations: `function ia_css_dp_encode`, `function ia_css_dp_dump`, `function ia_css_dp_debug_dtrace`, `function ia_css_init_dp_state`.
- 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.