drivers/media/platform/samsung/s5p-jpeg/jpeg-core.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/samsung/s5p-jpeg/jpeg-core.h- Extension
.h- Size
- 7023 bytes
- Lines
- 258
- 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/interrupt.hmedia/jpeg.hmedia/v4l2-device.hmedia/v4l2-fh.hmedia/v4l2-ctrls.h
Detected Declarations
struct s5p_jpegstruct s5p_jpeg_variantstruct s5p_jpeg_fmtstruct s5p_jpeg_markerstruct s5p_jpeg_q_datastruct s5p_jpeg_ctxstruct s5p_jpeg_bufferstruct s5p_jpeg_addrenum sjpeg_versionenum exynos4_jpeg_resultenum exynos4_jpeg_img_quality_levelenum s5p_jpeg_ctx_state
Annotated Snippet
struct s5p_jpeg {
struct mutex lock;
spinlock_t slock;
struct v4l2_device v4l2_dev;
struct video_device *vfd_encoder;
struct video_device *vfd_decoder;
struct v4l2_m2m_dev *m2m_dev;
void __iomem *regs;
unsigned int irq;
enum exynos4_jpeg_result irq_ret;
struct clk *clocks[JPEG_MAX_CLOCKS];
struct device *dev;
struct s5p_jpeg_variant *variant;
u32 irq_status;
};
struct s5p_jpeg_variant {
unsigned int version;
unsigned int fmt_ver_flag;
unsigned int hw3250_compat:1;
unsigned int htbl_reinit:1;
unsigned int hw_ex4_compat:1;
const struct v4l2_m2m_ops *m2m_ops;
irqreturn_t (*jpeg_irq)(int irq, void *priv);
const char *clk_names[JPEG_MAX_CLOCKS];
int num_clocks;
};
/**
* struct s5p_jpeg_fmt - driver's internal color format data
* @fourcc: the fourcc code, 0 if not applicable
* @depth: number of bits per pixel
* @colplanes: number of color planes (1 for packed formats)
* @memplanes: number of memory planes (1 for packed formats)
* @h_align: horizontal alignment order (align to 2^h_align)
* @v_align: vertical alignment order (align to 2^v_align)
* @subsampling:subsampling of a raw format or a JPEG
* @flags: flags describing format applicability
*/
struct s5p_jpeg_fmt {
u32 fourcc;
int depth;
int colplanes;
int memplanes;
int h_align;
int v_align;
int subsampling;
u32 flags;
};
/**
* struct s5p_jpeg_marker - collection of markers from jpeg header
* @marker: markers' positions relative to the buffer beginning
* @len: markers' payload lengths (without length field)
* @n: number of markers in collection
*/
struct s5p_jpeg_marker {
u32 marker[S5P_JPEG_MAX_MARKER];
u32 len[S5P_JPEG_MAX_MARKER];
u32 n;
};
/**
* struct s5p_jpeg_q_data - parameters of one queue
* @fmt: driver-specific format of this queue
* @w: image width
* @h: image height
* @sos: JPEG_MARKER_SOS's position relative to the buffer beginning
* @dht: JPEG_MARKER_DHT' positions relative to the buffer beginning
* @dqt: JPEG_MARKER_DQT' positions relative to the buffer beginning
* @sof: JPEG_MARKER_SOF0's position relative to the buffer beginning
* @sof_len: JPEG_MARKER_SOF0's payload length (without length field itself)
* @size: image buffer size in bytes
*/
struct s5p_jpeg_q_data {
struct s5p_jpeg_fmt *fmt;
u32 w;
u32 h;
u32 sos;
struct s5p_jpeg_marker dht;
struct s5p_jpeg_marker dqt;
u32 sof;
u32 sof_len;
u32 size;
};
/**
* struct s5p_jpeg_ctx - the device context data
Annotation
- Immediate include surface: `linux/interrupt.h`, `media/jpeg.h`, `media/v4l2-device.h`, `media/v4l2-fh.h`, `media/v4l2-ctrls.h`.
- Detected declarations: `struct s5p_jpeg`, `struct s5p_jpeg_variant`, `struct s5p_jpeg_fmt`, `struct s5p_jpeg_marker`, `struct s5p_jpeg_q_data`, `struct s5p_jpeg_ctx`, `struct s5p_jpeg_buffer`, `struct s5p_jpeg_addr`, `enum sjpeg_version`, `enum exynos4_jpeg_result`.
- 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.