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.

Dependency Surface

Detected Declarations

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

Implementation Notes