drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_formatter.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_formatter.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/input_formatter.c- Extension
.c- Size
- 8197 bytes
- Lines
- 235
- 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.
Dependency Surface
system_global.hinput_formatter.htype_support.hgp_device.hassert_support.hinput_formatter_private.h
Detected Declarations
function input_formatter_rstfunction input_formatter_get_alignmentfunction input_formatter_set_fifo_blocking_modefunction input_formatter_get_switch_statefunction input_formatter_get_statefunction input_formatter_bin_get_state
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Support for Intel Camera Imaging ISP subsystem.
* Copyright (c) 2010-2015, Intel Corporation.
*/
#include "system_global.h"
#include "input_formatter.h"
#include <type_support.h>
#include "gp_device.h"
#include "assert_support.h"
#ifndef __INLINE_INPUT_FORMATTER__
#include "input_formatter_private.h"
#endif /* __INLINE_INPUT_FORMATTER__ */
static const unsigned int input_formatter_alignment[N_INPUT_FORMATTER_ID] = {
ISP_VEC_ALIGN, ISP_VEC_ALIGN, HIVE_ISP_CTRL_DATA_BYTES
};
const hrt_address HIVE_IF_SRST_ADDRESS[N_INPUT_FORMATTER_ID] = {
INPUT_FORMATTER0_SRST_OFFSET,
INPUT_FORMATTER1_SRST_OFFSET,
INPUT_FORMATTER2_SRST_OFFSET,
INPUT_FORMATTER3_SRST_OFFSET
};
const hrt_data HIVE_IF_SRST_MASK[N_INPUT_FORMATTER_ID] = {
INPUT_FORMATTER0_SRST_MASK,
INPUT_FORMATTER1_SRST_MASK,
INPUT_FORMATTER2_SRST_MASK,
INPUT_FORMATTER3_SRST_MASK
};
const u8 HIVE_IF_SWITCH_CODE[N_INPUT_FORMATTER_ID] = {
HIVE_INPUT_SWITCH_SELECT_IF_PRIM,
HIVE_INPUT_SWITCH_SELECT_IF_PRIM,
HIVE_INPUT_SWITCH_SELECT_IF_SEC,
HIVE_INPUT_SWITCH_SELECT_STR_TO_MEM
};
/* MW Should be part of system_global.h, where we have the main enumeration */
static const bool HIVE_IF_BIN_COPY[N_INPUT_FORMATTER_ID] = {
false, false, false, true
};
void input_formatter_rst(
const input_formatter_ID_t ID)
{
hrt_address addr;
hrt_data rst;
assert(ID < N_INPUT_FORMATTER_ID);
addr = HIVE_IF_SRST_ADDRESS[ID];
rst = HIVE_IF_SRST_MASK[ID];
/* TEMPORARY HACK: THIS RESET BREAKS THE METADATA FEATURE
* WICH USES THE STREAM2MEMRY BLOCK.
* MUST BE FIXED PROPERLY
*/
if (!HIVE_IF_BIN_COPY[ID])
input_formatter_reg_store(ID, addr, rst);
return;
}
unsigned int input_formatter_get_alignment(
const input_formatter_ID_t ID)
{
assert(ID < N_INPUT_FORMATTER_ID);
return input_formatter_alignment[ID];
}
void input_formatter_set_fifo_blocking_mode(
const input_formatter_ID_t ID,
const bool enable)
{
assert(ID < N_INPUT_FORMATTER_ID);
/* cnd_input_formatter_reg_store() */
if (!HIVE_IF_BIN_COPY[ID]) {
input_formatter_reg_store(ID,
HIVE_IF_BLOCK_FIFO_NO_REQ_ADDRESS, enable);
}
return;
Annotation
- Immediate include surface: `system_global.h`, `input_formatter.h`, `type_support.h`, `gp_device.h`, `assert_support.h`, `input_formatter_private.h`.
- Detected declarations: `function input_formatter_rst`, `function input_formatter_get_alignment`, `function input_formatter_set_fifo_blocking_mode`, `function input_formatter_get_switch_state`, `function input_formatter_get_state`, `function input_formatter_bin_get_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.