drivers/staging/media/atomisp/pci/atomisp_subdev.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/atomisp_subdev.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/atomisp/pci/atomisp_subdev.h
Extension
.h
Size
10378 bytes
Lines
343
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 atomisp_in_fmt_conv {
	u32     code;
	u8 bpp; /* bits per pixel */
	u8 depth; /* uncompressed */
	enum atomisp_input_format atomisp_in_fmt;
	enum ia_css_bayer_order bayer_order;
};

struct atomisp_sub_device;

struct atomisp_video_pipe {
	struct video_device vdev;
	enum v4l2_buf_type type;
	struct media_pad pad;
	struct media_pipeline pipe;
	struct vb2_queue vb_queue;
	/* Lock for vb_queue, when also taking isp->mutex this must be taken first! */
	struct mutex vb_queue_mutex;
	/* List of video-buffers handed over to the CSS  */
	struct list_head buffers_in_css;
	/* List of video-buffers handed over to the driver, but not yet to the CSS */
	struct list_head activeq;
	/*
	 * the buffers waiting for per-frame parameters, this is only valid
	 * in per-frame setting mode.
	 */
	struct list_head buffers_waiting_for_param;
	/* the link list to store per_frame parameters */
	struct list_head per_frame_params;

	/* Filled through atomisp_get_css_frame_info() on queue setup */
	struct ia_css_frame_info frame_info;

	/*
	 * irq_lock is used to protect video buffer state change operations and
	 * also to make activeq and capq operations atomic.
	 */
	spinlock_t irq_lock;
	unsigned int users;

	struct atomisp_device *isp;
	struct v4l2_pix_format pix;
	u32 sh_fmt;

	struct atomisp_sub_device *asd;

	/*
	 * This frame_config_id is got from CSS when dequueues buffers from CSS,
	 * it is used to indicate which parameter it has applied.
	 */
	unsigned int frame_config_id[VIDEO_MAX_FRAME];
	/*
	 * This config id is set when camera HAL enqueues buffer, it has a
	 * non-zero value to indicate which parameter it needs to applu
	 */
	unsigned int frame_request_config_id[VIDEO_MAX_FRAME];
	struct atomisp_css_params_with_list *frame_params[VIDEO_MAX_FRAME];
};

#define vq_to_pipe(queue) \
	container_of(queue, struct atomisp_video_pipe, vb_queue)

#define vb_to_pipe(vb) vq_to_pipe((vb)->vb2_queue)

struct atomisp_pad_format {
	struct v4l2_mbus_framefmt fmt;
	struct v4l2_rect crop;
	struct v4l2_rect compose;
};

/*
 * This structure is used to cache the CSS parameters, it aligns to
 * struct ia_css_isp_config but without un-supported and deprecated parts.
 */
struct atomisp_css_params {
	struct ia_css_wb_config   wb_config;
	struct ia_css_cc_config   cc_config;
	struct ia_css_tnr_config  tnr_config;
	struct ia_css_ecd_config  ecd_config;
	struct ia_css_ynr_config  ynr_config;
	struct ia_css_fc_config   fc_config;
	struct ia_css_formats_config formats_config;
	struct ia_css_cnr_config  cnr_config;
	struct ia_css_macc_config macc_config;
	struct ia_css_ctc_config  ctc_config;
	struct ia_css_aa_config   aa_config;
	struct ia_css_aa_config   baa_config;
	struct ia_css_ce_config   ce_config;
	struct ia_css_ob_config   ob_config;
	struct ia_css_dp_config   dp_config;

Annotation

Implementation Notes