drivers/staging/media/ipu7/ipu7-isys-video.h
Source file repositories/reference/linux-study-clean/drivers/staging/media/ipu7/ipu7-isys-video.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/ipu7/ipu7-isys-video.h- Extension
.h- Size
- 3152 bytes
- Lines
- 118
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/atomic.hlinux/completion.hlinux/container_of.hlinux/list.hlinux/mutex.hmedia/media-entity.hmedia/v4l2-dev.hipu7-isys-queue.h
Detected Declarations
struct filestruct ipu7_isysstruct ipu7_isys_csi2struct ipu7_insys_stream_cfgstruct ipu7_isys_subdevstruct ipu7_isys_pixelformatstruct sequence_infostruct output_pin_datastruct ipu7_isys_streamstruct ipu7_isys_video
Annotated Snippet
struct ipu7_isys_pixelformat {
u32 pixelformat;
u32 bpp;
u32 bpp_packed;
u32 code;
u32 css_pixelformat;
};
struct sequence_info {
unsigned int sequence;
u64 timestamp;
};
struct output_pin_data {
void (*pin_ready)(struct ipu7_isys_stream *stream,
struct ipu7_insys_resp *info);
struct ipu7_isys_queue *aq;
};
/*
* Align with firmware stream. Each stream represents a CSI virtual channel.
* May map to multiple video devices
*/
struct ipu7_isys_stream {
struct mutex mutex;
struct media_entity *source_entity;
atomic_t sequence;
atomic_t buf_id;
unsigned int seq_index;
struct sequence_info seq[IPU_ISYS_MAX_PARALLEL_SOF];
int stream_source;
int stream_handle;
unsigned int nr_output_pins;
struct ipu7_isys_subdev *asd;
int nr_queues; /* Number of capture queues */
int nr_streaming;
int streaming;
struct list_head queues;
struct completion stream_open_completion;
struct completion stream_close_completion;
struct completion stream_start_completion;
struct completion stream_stop_completion;
struct ipu7_isys *isys;
struct output_pin_data output_pins[IPU_INSYS_OUTPUT_PINS];
int error;
u8 vc;
};
struct ipu7_isys_video {
struct ipu7_isys_queue aq;
/* Serialise access to other fields in the struct. */
struct mutex mutex;
struct media_pad pad;
struct video_device vdev;
struct v4l2_pix_format pix_fmt;
struct ipu7_isys *isys;
struct ipu7_isys_csi2 *csi2;
struct ipu7_isys_stream *stream;
unsigned int streaming;
u8 vc;
u8 dt;
};
#define ipu7_isys_queue_to_video(__aq) \
container_of(__aq, struct ipu7_isys_video, aq)
extern const struct ipu7_isys_pixelformat ipu7_isys_pfmts[];
const struct ipu7_isys_pixelformat *ipu7_isys_get_isys_format(u32 pixelformat);
int ipu7_isys_video_prepare_stream(struct ipu7_isys_video *av,
struct media_entity *source_entity,
int nr_queues);
int ipu7_isys_video_set_streaming(struct ipu7_isys_video *av, int state,
struct ipu7_isys_buffer_list *bl);
int ipu7_isys_fw_open(struct ipu7_isys *isys);
void ipu7_isys_fw_close(struct ipu7_isys *isys);
int ipu7_isys_setup_video(struct ipu7_isys_video *av,
struct media_entity **source_entity, int *nr_queues);
int ipu7_isys_video_init(struct ipu7_isys_video *av);
void ipu7_isys_video_cleanup(struct ipu7_isys_video *av);
void ipu7_isys_put_stream(struct ipu7_isys_stream *stream);
struct ipu7_isys_stream *
ipu7_isys_query_stream_by_handle(struct ipu7_isys *isys,
u8 stream_handle);
struct ipu7_isys_stream *
ipu7_isys_query_stream_by_source(struct ipu7_isys *isys, int source, u8 vc);
#endif /* IPU7_ISYS_VIDEO_H */
Annotation
- Immediate include surface: `linux/atomic.h`, `linux/completion.h`, `linux/container_of.h`, `linux/list.h`, `linux/mutex.h`, `media/media-entity.h`, `media/v4l2-dev.h`, `ipu7-isys-queue.h`.
- Detected declarations: `struct file`, `struct ipu7_isys`, `struct ipu7_isys_csi2`, `struct ipu7_insys_stream_cfg`, `struct ipu7_isys_subdev`, `struct ipu7_isys_pixelformat`, `struct sequence_info`, `struct output_pin_data`, `struct ipu7_isys_stream`, `struct ipu7_isys_video`.
- Atlas domain: Driver Families / drivers/staging.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.