drivers/staging/media/atomisp/pci/hive_isp_css_common/host/fifo_monitor.c
Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/fifo_monitor.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/atomisp/pci/hive_isp_css_common/host/fifo_monitor.c- Extension
.c- Size
- 21839 bytes
- Lines
- 562
- 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
fifo_monitor.htype_support.hdevice_access.hbits.hgp_device.hassert_support.hfifo_monitor_private.h
Detected Declarations
function fifo_channel_get_statefunction fifo_switch_get_statefunction fifo_monitor_get_statefunction fifo_monitor_status_validfunction fifo_monitor_status_accept
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Support for Intel Camera Imaging ISP subsystem.
* Copyright (c) 2010-2015, Intel Corporation.
*/
#include "fifo_monitor.h"
#include <type_support.h>
#include "device_access.h"
#include <bits.h>
#include "gp_device.h"
#include "assert_support.h"
#ifndef __INLINE_FIFO_MONITOR__
#define STORAGE_CLASS_FIFO_MONITOR_DATA static const
#else
#define STORAGE_CLASS_FIFO_MONITOR_DATA const
#endif /* __INLINE_FIFO_MONITOR__ */
STORAGE_CLASS_FIFO_MONITOR_DATA unsigned int FIFO_SWITCH_ADDR[N_FIFO_SWITCH] = {
_REG_GP_SWITCH_IF_ADDR,
_REG_GP_SWITCH_GDC1_ADDR,
_REG_GP_SWITCH_GDC2_ADDR
};
#ifndef __INLINE_FIFO_MONITOR__
#include "fifo_monitor_private.h"
#endif /* __INLINE_FIFO_MONITOR__ */
static inline bool fifo_monitor_status_valid(
const fifo_monitor_ID_t ID,
const unsigned int reg,
const unsigned int port_id);
static inline bool fifo_monitor_status_accept(
const fifo_monitor_ID_t ID,
const unsigned int reg,
const unsigned int port_id);
void fifo_channel_get_state(
const fifo_monitor_ID_t ID,
const fifo_channel_t channel_id,
fifo_channel_state_t *state)
{
assert(channel_id < N_FIFO_CHANNEL);
assert(state);
switch (channel_id) {
case FIFO_CHANNEL_ISP0_TO_SP0:
state->src_valid = fifo_monitor_status_valid(ID,
HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
ISP_STR_MON_PORT_SND_SP); /* ISP_STR_MON_PORT_ISP2SP */
state->fifo_accept = fifo_monitor_status_accept(ID,
HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
ISP_STR_MON_PORT_SND_SP);
state->fifo_valid = fifo_monitor_status_valid(ID,
HIVE_GP_REGS_SP_STREAM_STAT_IDX,
SP_STR_MON_PORT_RCV_ISP); /* ISP_STR_MON_PORT_SP2ISP */
state->sink_accept = fifo_monitor_status_accept(ID,
HIVE_GP_REGS_SP_STREAM_STAT_IDX,
SP_STR_MON_PORT_RCV_ISP);
break;
case FIFO_CHANNEL_SP0_TO_ISP0:
state->src_valid = fifo_monitor_status_valid(ID,
HIVE_GP_REGS_SP_STREAM_STAT_IDX,
SP_STR_MON_PORT_SND_ISP); /* ISP_STR_MON_PORT_SP2ISP */
state->fifo_accept = fifo_monitor_status_accept(ID,
HIVE_GP_REGS_SP_STREAM_STAT_IDX,
SP_STR_MON_PORT_SND_ISP);
state->fifo_valid = fifo_monitor_status_valid(ID,
HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
ISP_STR_MON_PORT_RCV_SP); /* ISP_STR_MON_PORT_ISP2SP */
state->sink_accept = fifo_monitor_status_accept(ID,
HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
ISP_STR_MON_PORT_RCV_SP);
break;
case FIFO_CHANNEL_ISP0_TO_IF0:
state->src_valid = fifo_monitor_status_valid(ID,
HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
ISP_STR_MON_PORT_SND_PIF_A); /* ISP_STR_MON_PORT_ISP2PIFA */
state->fifo_accept = fifo_monitor_status_accept(ID,
HIVE_GP_REGS_ISP_STREAM_STAT_IDX,
ISP_STR_MON_PORT_SND_PIF_A);
state->fifo_valid = fifo_monitor_status_valid(ID,
HIVE_GP_REGS_MOD_STREAM_STAT_IDX,
MOD_STR_MON_PORT_RCV_PIF_A); /* MOD_STR_MON_PORT_CELLS2PIFA */
Annotation
- Immediate include surface: `fifo_monitor.h`, `type_support.h`, `device_access.h`, `bits.h`, `gp_device.h`, `assert_support.h`, `fifo_monitor_private.h`.
- Detected declarations: `function fifo_channel_get_state`, `function fifo_switch_get_state`, `function fifo_monitor_get_state`, `function fifo_monitor_status_valid`, `function fifo_monitor_status_accept`.
- 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.