drivers/media/platform/ti/omap3isp/isppreview.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/ti/omap3isp/isppreview.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/ti/omap3isp/isppreview.c- Extension
.c- Size
- 69889 bytes
- Lines
- 2358
- Domain
- Driver Families
- Bucket
- drivers/media
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/mm.hlinux/module.hlinux/mutex.hlinux/uaccess.hisp.hispreg.hisppreview.hcfa_coef_table.hgamma_table.hnoise_filter_table.hluma_enhance_table.h
Detected Declarations
struct preview_updatefunction preview_config_luma_enhancementfunction preview_enable_luma_enhancementfunction preview_enable_invalawfunction preview_config_hmedfunction preview_enable_hmedfunction preview_config_cfafunction preview_config_chroma_suppressionfunction preview_enable_chroma_suppressionfunction preview_config_whitebalancefunction preview_config_blkadjfunction preview_config_rgb_blendingfunction preview_config_cscfunction preview_config_yc_rangefunction preview_config_dcorfunction preview_enable_dcorfunction preview_enable_drkframe_capturefunction preview_enable_drkframefunction preview_config_noisefilterfunction preview_enable_noisefilterfunction preview_config_gammacorrnfunction preview_enable_gammacorrnfunction preview_config_contrastfunction preview_config_brightnessfunction preview_update_contrastfunction preview_update_brightnessfunction preview_params_lockfunction preview_params_unlockfunction preview_params_switchfunction preview_configfunction preview_setup_hwfunction preview_config_ycposfunction preview_config_averagerfunction preview_config_input_formatfunction preview_config_input_sizefunction preview_config_inlineoffsetfunction preview_set_inaddrfunction preview_config_outlineoffsetfunction preview_set_outaddrfunction preview_adjust_bandwidthfunction omap3isp_preview_busyfunction omap3isp_preview_restore_contextfunction isp_reg_readlfunction preview_init_paramsfunction preview_max_out_widthfunction preview_configurefunction preview_enable_oneshotfunction omap3isp_preview_isr_frame_sync
Annotated Snippet
struct preview_update {
void (*config)(struct isp_prev_device *, const struct prev_params *);
void (*enable)(struct isp_prev_device *, bool);
unsigned int param_offset;
unsigned int param_size;
unsigned int config_offset;
bool skip;
};
/* Keep the array indexed by the OMAP3ISP_PREV_* bit number. */
static const struct preview_update update_attrs[] = {
/* OMAP3ISP_PREV_LUMAENH */ {
preview_config_luma_enhancement,
preview_enable_luma_enhancement,
offsetof(struct prev_params, luma),
sizeof_field(struct prev_params, luma),
offsetof(struct omap3isp_prev_update_config, luma),
}, /* OMAP3ISP_PREV_INVALAW */ {
NULL,
preview_enable_invalaw,
}, /* OMAP3ISP_PREV_HRZ_MED */ {
preview_config_hmed,
preview_enable_hmed,
offsetof(struct prev_params, hmed),
sizeof_field(struct prev_params, hmed),
offsetof(struct omap3isp_prev_update_config, hmed),
}, /* OMAP3ISP_PREV_CFA */ {
preview_config_cfa,
NULL,
offsetof(struct prev_params, cfa),
sizeof_field(struct prev_params, cfa),
offsetof(struct omap3isp_prev_update_config, cfa),
}, /* OMAP3ISP_PREV_CHROMA_SUPP */ {
preview_config_chroma_suppression,
preview_enable_chroma_suppression,
offsetof(struct prev_params, csup),
sizeof_field(struct prev_params, csup),
offsetof(struct omap3isp_prev_update_config, csup),
}, /* OMAP3ISP_PREV_WB */ {
preview_config_whitebalance,
NULL,
offsetof(struct prev_params, wbal),
sizeof_field(struct prev_params, wbal),
offsetof(struct omap3isp_prev_update_config, wbal),
}, /* OMAP3ISP_PREV_BLKADJ */ {
preview_config_blkadj,
NULL,
offsetof(struct prev_params, blkadj),
sizeof_field(struct prev_params, blkadj),
offsetof(struct omap3isp_prev_update_config, blkadj),
}, /* OMAP3ISP_PREV_RGB2RGB */ {
preview_config_rgb_blending,
NULL,
offsetof(struct prev_params, rgb2rgb),
sizeof_field(struct prev_params, rgb2rgb),
offsetof(struct omap3isp_prev_update_config, rgb2rgb),
}, /* OMAP3ISP_PREV_COLOR_CONV */ {
preview_config_csc,
NULL,
offsetof(struct prev_params, csc),
sizeof_field(struct prev_params, csc),
offsetof(struct omap3isp_prev_update_config, csc),
}, /* OMAP3ISP_PREV_YC_LIMIT */ {
preview_config_yc_range,
NULL,
offsetof(struct prev_params, yclimit),
sizeof_field(struct prev_params, yclimit),
offsetof(struct omap3isp_prev_update_config, yclimit),
}, /* OMAP3ISP_PREV_DEFECT_COR */ {
preview_config_dcor,
preview_enable_dcor,
offsetof(struct prev_params, dcor),
sizeof_field(struct prev_params, dcor),
offsetof(struct omap3isp_prev_update_config, dcor),
}, /* Previously OMAP3ISP_PREV_GAMMABYPASS, not used anymore */ {
NULL,
NULL,
}, /* OMAP3ISP_PREV_DRK_FRM_CAPTURE */ {
NULL,
preview_enable_drkframe_capture,
}, /* OMAP3ISP_PREV_DRK_FRM_SUBTRACT */ {
NULL,
preview_enable_drkframe,
}, /* OMAP3ISP_PREV_LENS_SHADING */ {
NULL,
preview_enable_drkframe,
}, /* OMAP3ISP_PREV_NF */ {
preview_config_noisefilter,
preview_enable_noisefilter,
offsetof(struct prev_params, nf),
Annotation
- Immediate include surface: `linux/device.h`, `linux/mm.h`, `linux/module.h`, `linux/mutex.h`, `linux/uaccess.h`, `isp.h`, `ispreg.h`, `isppreview.h`.
- Detected declarations: `struct preview_update`, `function preview_config_luma_enhancement`, `function preview_enable_luma_enhancement`, `function preview_enable_invalaw`, `function preview_config_hmed`, `function preview_enable_hmed`, `function preview_config_cfa`, `function preview_config_chroma_suppression`, `function preview_enable_chroma_suppression`, `function preview_config_whitebalance`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.