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.
- 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/spinlock_types.hmedia/media-entity.hmedia/v4l2-device.hmedia/v4l2-subdev.hcamss-video.hcamss-vfe-gen1.h
Detected Declarations
struct vfe_outputstruct vfe_linestruct vfe_devicestruct vfe_hw_opsstruct vfe_isr_opsstruct vfe_subdev_resourcesstruct vfe_devicestruct camss_subdev_resourcesenum vfe_output_stateenum vfe_line_id
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
- Immediate include surface: `linux/clk.h`, `linux/spinlock_types.h`, `media/media-entity.h`, `media/v4l2-device.h`, `media/v4l2-subdev.h`, `camss-video.h`, `camss-vfe-gen1.h`.
- Detected declarations: `struct vfe_output`, `struct vfe_line`, `struct vfe_device`, `struct vfe_hw_ops`, `struct vfe_isr_ops`, `struct vfe_subdev_resources`, `struct vfe_device`, `struct camss_subdev_resources`, `enum vfe_output_state`, `enum vfe_line_id`.
- 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.