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.
- 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
media/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-subdev.hmedia/videobuf2-v4l2.hatomisp_common.hatomisp_compat.hatomisp_v4l2.hia_css.h
Detected Declarations
struct atomisp_in_fmt_convstruct atomisp_sub_devicestruct atomisp_video_pipestruct atomisp_pad_formatstruct atomisp_css_paramsstruct atomisp_subdev_paramsstruct atomisp_css_params_with_liststruct atomisp_sub_device
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
- Immediate include surface: `media/v4l2-ctrls.h`, `media/v4l2-device.h`, `media/v4l2-subdev.h`, `media/videobuf2-v4l2.h`, `atomisp_common.h`, `atomisp_compat.h`, `atomisp_v4l2.h`, `ia_css.h`.
- Detected declarations: `struct atomisp_in_fmt_conv`, `struct atomisp_sub_device`, `struct atomisp_video_pipe`, `struct atomisp_pad_format`, `struct atomisp_css_params`, `struct atomisp_subdev_params`, `struct atomisp_css_params_with_list`, `struct atomisp_sub_device`.
- 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.