drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/rockchip/rkisp1/rkisp1-common.h- Extension
.h- Size
- 22006 bytes
- Lines
- 701
- 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 IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/interrupt.hlinux/mutex.hlinux/rkisp1-config.hmedia/media-device.hmedia/media-entity.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/videobuf2-v4l2.hrkisp1-regs.h
Detected Declarations
struct dentrystruct dev_pm_domain_liststruct regmapstruct rkisp1_infostruct rkisp1_sensor_asyncstruct rkisp1_csistruct rkisp1_ispstruct rkisp1_vdev_nodestruct rkisp1_bufferstruct rkisp1_params_bufferstruct rkisp1_dummy_bufferstruct rkisp1_devicestruct rkisp1_capturestruct rkisp1_statsstruct rkisp1_stats_opsstruct rkisp1_statsstruct rkisp1_paramsstruct rkisp1_params_opsstruct rkisp1_paramsstruct rkisp1_resizerstruct rkisp1_debugstruct rkisp1_devicestruct rkisp1_mbus_infoenum rkisp1_irq_lineenum rkisp1_rsz_padenum rkisp1_csi_padenum rkisp1_stream_idenum rkisp1_fmt_raw_pat_typeenum rkisp1_isp_padenum rkisp1_featurefunction to_rkisp1_params_bufferfunction rkisp1_writefunction rkisp1_readfunction rkisp1_path_countfunction rkisp1_debug_init
Annotated Snippet
struct rkisp1_info {
unsigned int num_clocks;
const struct rkisp1_isr_data *isrs;
unsigned int isr_size;
enum rkisp1_cif_isp_version isp_ver;
unsigned int features;
unsigned int max_width;
unsigned int max_height;
struct {
const char * const *names;
unsigned int count;
} pm_domains;
};
/*
* struct rkisp1_sensor_async - A container for the v4l2_async_subdev to add to the notifier
* of the v4l2-async API
*
* @asd: async_subdev variable for the sensor
* @index: index of the sensor (counting sensor found in DT)
* @source_ep: fwnode for the sensor source endpoint
* @lanes: number of lanes
* @mbus_type: type of bus (currently only CSI2 is supported)
* @mbus_flags: media bus (V4L2_MBUS_*) flags
* @sd: a pointer to v4l2_subdev struct of the sensor
* @pixel_rate_ctrl: pixel rate of the sensor, used to initialize the phy
* @port: port number (0: MIPI, 1: Parallel)
*/
struct rkisp1_sensor_async {
struct v4l2_async_connection asd;
unsigned int index;
struct fwnode_handle *source_ep;
unsigned int lanes;
enum v4l2_mbus_type mbus_type;
unsigned int mbus_flags;
struct v4l2_subdev *sd;
struct v4l2_ctrl *pixel_rate_ctrl;
unsigned int port;
};
/*
* struct rkisp1_csi - CSI receiver subdev
*
* @rkisp1: pointer to the rkisp1 device
* @dphy: a pointer to the phy
* @is_dphy_errctrl_disabled: if dphy errctrl is disabled (avoid endless interrupt)
* @sd: v4l2_subdev variable
* @pads: media pads
* @source: source in-use, set when starting streaming
*/
struct rkisp1_csi {
struct rkisp1_device *rkisp1;
struct phy *dphy;
bool is_dphy_errctrl_disabled;
struct v4l2_subdev sd;
struct media_pad pads[RKISP1_CSI_PAD_NUM];
struct v4l2_subdev *source;
};
/*
* struct rkisp1_isp - ISP subdev entity
*
* @sd: v4l2_subdev variable
* @rkisp1: pointer to rkisp1_device
* @pads: media pads
* @sink_fmt: input format
* @frame_sequence: used to synchronize frame_id between video devices.
*/
struct rkisp1_isp {
struct v4l2_subdev sd;
struct rkisp1_device *rkisp1;
struct media_pad pads[RKISP1_ISP_PAD_MAX];
const struct rkisp1_mbus_info *sink_fmt;
__u32 frame_sequence;
bool frame_active;
};
/*
* struct rkisp1_vdev_node - Container for the video nodes: params, stats, mainpath, selfpath
*
* @buf_queue: queue of buffers
* @vlock: lock of the video node
* @vdev: video node
* @pad: media pad
*/
struct rkisp1_vdev_node {
struct vb2_queue buf_queue;
struct mutex vlock; /* ioctl serialization mutex */
struct video_device vdev;
struct media_pad pad;
Annotation
- Immediate include surface: `linux/clk.h`, `linux/interrupt.h`, `linux/mutex.h`, `linux/rkisp1-config.h`, `media/media-device.h`, `media/media-entity.h`, `media/v4l2-ctrls.h`, `media/v4l2-device.h`.
- Detected declarations: `struct dentry`, `struct dev_pm_domain_list`, `struct regmap`, `struct rkisp1_info`, `struct rkisp1_sensor_async`, `struct rkisp1_csi`, `struct rkisp1_isp`, `struct rkisp1_vdev_node`, `struct rkisp1_buffer`, `struct rkisp1_params_buffer`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.