drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.h
Extension
.h
Size
1869 bytes
Lines
79
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct sun6i_isp_capture_format {
	u32	pixelformat;
	u8	output_format;
};

#undef current
struct sun6i_isp_capture_state {
	struct list_head		queue;
	spinlock_t			lock; /* Queue and buffers lock. */

	struct sun6i_isp_buffer		*pending;
	struct sun6i_isp_buffer		*current;
	struct sun6i_isp_buffer		*complete;

	unsigned int			sequence;
	bool				streaming;
};

struct sun6i_isp_capture {
	struct sun6i_isp_capture_state	state;

	struct video_device		video_dev;
	struct vb2_queue		queue;
	struct mutex			lock; /* Queue lock. */
	struct media_pad		pad;

	struct v4l2_format		format;
};

/* Helpers */

void sun6i_isp_capture_dimensions(struct sun6i_isp_device *isp_dev,
				  unsigned int *width, unsigned int *height);
void sun6i_isp_capture_format(struct sun6i_isp_device *isp_dev,
			      u32 *pixelformat);

/* Format */

const struct sun6i_isp_capture_format *
sun6i_isp_capture_format_find(u32 pixelformat);

/* Capture */

void sun6i_isp_capture_configure(struct sun6i_isp_device *isp_dev);

/* State */

void sun6i_isp_capture_state_update(struct sun6i_isp_device *isp_dev,
				    bool *update);
void sun6i_isp_capture_state_complete(struct sun6i_isp_device *isp_dev);
void sun6i_isp_capture_finish(struct sun6i_isp_device *isp_dev);

/* Capture */

int sun6i_isp_capture_setup(struct sun6i_isp_device *isp_dev);
void sun6i_isp_capture_cleanup(struct sun6i_isp_device *isp_dev);

#endif

Annotation

Implementation Notes