drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h- Extension
.h- Size
- 5977 bytes
- Lines
- 226
- 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.
- 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-fh.h
Detected Declarations
struct mxc_jpeg_fmtstruct mxc_jpeg_descstruct mxc_jpeg_q_datastruct mxc_jpeg_ctxstruct mxc_jpeg_slot_datastruct mxc_jpeg_enc_opsstruct mxc_jpeg_devstruct mxc_jpeg_sof_compstruct mxc_jpeg_sofstruct mxc_jpeg_sos_compstruct mxc_jpeg_sosenum mxc_jpeg_enc_stateenum mxc_jpeg_mode
Annotated Snippet
struct mxc_jpeg_fmt {
const char *name;
u32 fourcc;
enum v4l2_jpeg_chroma_subsampling subsampling;
int nc;
int depth;
int mem_planes;
int comp_planes;
int h_align;
int v_align;
u32 flags;
u8 precision;
u8 is_rgb;
};
struct mxc_jpeg_desc {
u32 next_descpt_ptr;
u32 buf_base0;
u32 buf_base1;
u32 line_pitch;
u32 stm_bufbase;
u32 stm_bufsize;
u32 imgsize;
u32 stm_ctrl;
/* below parameters are valid for v1 */
u32 mode;
u32 cfg_mode;
u32 quality;
u32 rc_regs_sel;
u32 lumth;
u32 chrth;
u32 nomfrsize_lo;
u32 nomfrsize_hi;
u32 ofbsize_lo;
u32 ofbsize_hi;
} __packed;
struct mxc_jpeg_q_data {
const struct mxc_jpeg_fmt *fmt;
u32 sizeimage[MXC_JPEG_MAX_PLANES];
u32 bytesperline[MXC_JPEG_MAX_PLANES];
int w;
int w_adjusted;
int h;
int h_adjusted;
unsigned int sequence;
struct v4l2_rect crop;
};
struct mxc_jpeg_ctx {
struct mxc_jpeg_dev *mxc_jpeg;
struct mxc_jpeg_q_data out_q;
struct mxc_jpeg_q_data cap_q;
struct v4l2_fh fh;
enum mxc_jpeg_enc_state enc_state;
int slot;
unsigned int source_change;
bool need_initial_source_change_evt;
bool header_parsed;
bool extseq;
struct v4l2_ctrl_handler ctrl_handler;
u8 jpeg_quality;
struct delayed_work task_timer;
};
struct mxc_jpeg_slot_data {
int slot;
bool used;
struct mxc_jpeg_desc *desc; // enc/dec descriptor
struct mxc_jpeg_desc *cfg_desc; // configuration descriptor
void *cfg_stream_vaddr; // configuration bitstream virtual address
unsigned int cfg_stream_size;
dma_addr_t desc_handle;
dma_addr_t cfg_desc_handle; // configuration descriptor dma address
dma_addr_t cfg_stream_handle; // configuration bitstream dma address
dma_addr_t cfg_dec_size;
void *cfg_dec_vaddr;
dma_addr_t cfg_dec_daddr;
};
struct mxc_jpeg_enc_ops {
/* Manual configuration (v0 hardware) - two-phase process */
void (*enter_config_mode)(struct mxc_jpeg_ctx *ctx);
void (*exit_config_mode)(struct mxc_jpeg_ctx *ctx);
/* Descriptor-based configuration (v1 hardware) - single-phase */
void (*setup_desc)(struct mxc_jpeg_ctx *ctx);
};
struct mxc_jpeg_dev {
Annotation
- Immediate include surface: `media/v4l2-ctrls.h`, `media/v4l2-device.h`, `media/v4l2-fh.h`.
- Detected declarations: `struct mxc_jpeg_fmt`, `struct mxc_jpeg_desc`, `struct mxc_jpeg_q_data`, `struct mxc_jpeg_ctx`, `struct mxc_jpeg_slot_data`, `struct mxc_jpeg_enc_ops`, `struct mxc_jpeg_dev`, `struct mxc_jpeg_sof_comp`, `struct mxc_jpeg_sof`, `struct mxc_jpeg_sos_comp`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
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.