drivers/media/platform/qcom/camss/camss-vfe.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/camss/camss-vfe.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/qcom/camss/camss-vfe.h
Extension
.h
Size
8450 bytes
Lines
318
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 vfe_output {
	u8 wm_num;
	u8 wm_idx[3];

	struct camss_buffer *buf[2];
	struct camss_buffer *last_buffer;
	struct list_head pending_bufs;

	unsigned int drop_update_idx;

	union {
		struct {
			int active_buf;
			int wait_sof;
		} gen1;
		struct {
			int active_num;
		} gen2;
	};
	enum vfe_output_state state;
	unsigned int sequence;

	int wait_reg_update;
	struct completion sof;
	struct completion reg_update;
};

struct vfe_line {
	enum vfe_line_id id;
	struct v4l2_subdev subdev;
	struct media_pad pads[MSM_VFE_PADS_NUM];
	struct v4l2_mbus_framefmt fmt[MSM_VFE_PADS_NUM];
	struct v4l2_rect compose;
	struct v4l2_rect crop;
	struct camss_video video_out;
	struct vfe_output output;
	const struct camss_format_info *formats;
	unsigned int nformats;
};

struct vfe_device;

struct vfe_hw_ops {
	void (*enable_irq)(struct vfe_device *vfe);
	void (*global_reset)(struct vfe_device *vfe);
	u32 (*hw_version)(struct vfe_device *vfe);
	irqreturn_t (*isr)(int irq, void *dev);
	void (*isr_read)(struct vfe_device *vfe, u32 *value0, u32 *value1);
	void (*pm_domain_off)(struct vfe_device *vfe);
	int (*pm_domain_on)(struct vfe_device *vfe);
	void (*reg_update)(struct vfe_device *vfe, enum vfe_line_id line_id);
	void (*reg_update_clear)(struct vfe_device *vfe,
				 enum vfe_line_id line_id);
	void (*subdev_init)(struct device *dev, struct vfe_device *vfe);
	int (*vfe_disable)(struct vfe_line *line);
	int (*vfe_enable)(struct vfe_line *line);
	int (*vfe_halt)(struct vfe_device *vfe);
	void (*violation_read)(struct vfe_device *vfe);
	void (*vfe_wm_start)(struct vfe_device *vfe, u8 wm,
			     struct vfe_line *line);
	void (*vfe_wm_stop)(struct vfe_device *vfe, u8 wm);
	void (*vfe_buf_done)(struct vfe_device *vfe, int port_id);
	void (*vfe_wm_update)(struct vfe_device *vfe, u8 wm, u32 addr,
			      struct vfe_line *line);
};

struct vfe_isr_ops {
	void (*reset_ack)(struct vfe_device *vfe);
	void (*halt_ack)(struct vfe_device *vfe);
	void (*reg_update)(struct vfe_device *vfe, enum vfe_line_id line_id);
	void (*sof)(struct vfe_device *vfe, enum vfe_line_id line_id);
	void (*comp_done)(struct vfe_device *vfe, u8 comp);
	void (*wm_done)(struct vfe_device *vfe, u8 wm);
};

struct vfe_subdev_resources {
	bool is_lite;
	u8 line_num;
	bool has_pd;
	char *pd_name;
	bool has_vbif;
	char *vbif_name;
	const struct vfe_hw_ops *hw_ops;
	const struct camss_formats *formats_rdi;
	const struct camss_formats *formats_pix;
};

struct vfe_device {
	struct camss *camss;
	u8 id;

Annotation

Implementation Notes