drivers/media/platform/samsung/s3c-camif/camif-core.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/samsung/s3c-camif/camif-core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/samsung/s3c-camif/camif-core.h- Extension
.h- Size
- 10910 bytes
- Lines
- 398
- 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/io.hlinux/irq.hlinux/platform_device.hlinux/sched.hlinux/spinlock.hlinux/types.hlinux/videodev2.hmedia/media-entity.hmedia/v4l2-ctrls.hmedia/v4l2-dev.hmedia/v4l2-device.hmedia/v4l2-mediabus.hmedia/videobuf2-v4l2.hmedia/drv-intf/s3c_camif.h
Detected Declarations
struct camif_fmtstruct camif_dma_offsetstruct camif_framestruct vp_pix_limitsstruct camif_pix_limitsstruct s3c_camif_variantstruct s3c_camif_drvdatastruct camif_scalerstruct camif_devstruct camif_vpstruct camif_devstruct cam_sensorstruct camif_addrstruct camif_bufferenum img_fmtfunction camif_active_queue_addfunction list_for_each_entry_safefunction camif_pending_queue_add
Annotated Snippet
struct camif_fmt {
u32 fourcc;
u32 color;
u16 colplanes;
u16 flags;
u8 depth;
u8 ybpp;
};
/**
* struct camif_dma_offset - pixel offset information for DMA
* @initial: offset (in pixels) to first pixel
* @line: offset (in pixels) from end of line to start of next line
*/
struct camif_dma_offset {
int initial;
int line;
};
/**
* struct camif_frame - source/target frame properties
* @f_width: full pixel width
* @f_height: full pixel height
* @rect: crop/composition rectangle
* @dma_offset: DMA offset configuration
*/
struct camif_frame {
u16 f_width;
u16 f_height;
struct v4l2_rect rect;
struct camif_dma_offset dma_offset;
};
/* CAMIF clocks enumeration */
enum {
CLK_GATE,
CLK_CAM,
CLK_MAX_NUM,
};
struct vp_pix_limits {
u16 max_out_width;
u16 max_sc_out_width;
u16 out_width_align;
u16 max_height;
u8 min_out_width;
u16 out_hor_offset_align;
};
struct camif_pix_limits {
u16 win_hor_offset_align;
};
/**
* struct s3c_camif_variant - CAMIF variant structure
* @vp_pix_limits: pixel limits for the codec and preview paths
* @pix_limits: pixel limits for the camera input interface
* @ip_revision: the CAMIF IP revision: 0x20 for s3c244x, 0x32 for s3c6410
* @has_img_effect: supports image effects
* @vp_offset: register offset
*/
struct s3c_camif_variant {
struct vp_pix_limits vp_pix_limits[2];
struct camif_pix_limits pix_limits;
u8 ip_revision;
u8 has_img_effect;
unsigned int vp_offset;
};
struct s3c_camif_drvdata {
const struct s3c_camif_variant *variant;
unsigned long bus_clk_freq;
};
struct camif_scaler {
u8 scaleup_h;
u8 scaleup_v;
u8 copy;
u8 enable;
u32 h_shift;
u32 v_shift;
u32 pre_h_ratio;
u32 pre_v_ratio;
u32 pre_dst_width;
u32 pre_dst_height;
u32 main_h_ratio;
u32 main_v_ratio;
};
struct camif_dev;
Annotation
- Immediate include surface: `linux/io.h`, `linux/irq.h`, `linux/platform_device.h`, `linux/sched.h`, `linux/spinlock.h`, `linux/types.h`, `linux/videodev2.h`, `media/media-entity.h`.
- Detected declarations: `struct camif_fmt`, `struct camif_dma_offset`, `struct camif_frame`, `struct vp_pix_limits`, `struct camif_pix_limits`, `struct s3c_camif_variant`, `struct s3c_camif_drvdata`, `struct camif_scaler`, `struct camif_dev`, `struct camif_vp`.
- 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.