drivers/media/platform/samsung/s5p-mfc/s5p_mfc_common.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/samsung/s5p-mfc/s5p_mfc_common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/samsung/s5p-mfc/s5p_mfc_common.h- Extension
.h- Size
- 22299 bytes
- Lines
- 812
- 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.
- 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
linux/platform_device.hlinux/videodev2.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-ioctl.hmedia/videobuf2-v4l2.hregs-mfc.hregs-mfc-v12.hmedia/videobuf2-dma-contig.h
Detected Declarations
struct s5p_mfc_ctxstruct s5p_mfc_bufstruct s5p_mfc_pmstruct s5p_mfc_buf_size_v5struct s5p_mfc_buf_size_v6struct s5p_mfc_buf_sizestruct s5p_mfc_variantstruct s5p_mfc_priv_bufstruct s5p_mfc_devstruct s5p_mfc_h264_enc_paramsstruct s5p_mfc_mpeg4_enc_paramsstruct s5p_mfc_vp8_enc_paramsstruct s5p_mfc_hevc_enc_paramsstruct s5p_mfc_enc_paramsstruct s5p_mfc_codec_opsstruct s5p_mfc_ctxstruct s5p_mfc_fmtstruct mfc_controlenum s5p_mfc_fmt_typeenum s5p_mfc_inst_typeenum s5p_mfc_inst_stateenum s5p_mfc_queue_stateenum s5p_mfc_decode_argenum s5p_mfc_fw_ver
Annotated Snippet
struct s5p_mfc_buf {
struct vb2_v4l2_buffer *b;
struct list_head list;
union {
struct {
size_t luma;
size_t chroma;
size_t chroma_1;
} raw;
size_t stream;
} cookie;
int flags;
};
/*
* struct s5p_mfc_pm - power management data structure
*/
struct s5p_mfc_pm {
struct clk *clock_gate;
const char * const *clk_names;
struct clk *clocks[MFC_MAX_CLOCKS];
int num_clocks;
bool use_clock_gating;
struct device *device;
};
struct s5p_mfc_buf_size_v5 {
unsigned int h264_ctx;
unsigned int non_h264_ctx;
unsigned int dsc;
unsigned int shm;
};
struct s5p_mfc_buf_size_v6 {
unsigned int dev_ctx;
unsigned int h264_dec_ctx;
unsigned int other_dec_ctx;
unsigned int h264_enc_ctx;
unsigned int hevc_enc_ctx;
unsigned int other_enc_ctx;
};
struct s5p_mfc_buf_size {
unsigned int fw;
unsigned int cpb;
const void *priv;
};
struct s5p_mfc_variant {
unsigned int version;
unsigned int port_num;
u32 version_bit;
const struct s5p_mfc_buf_size *buf_size;
const char *fw_name[MFC_FW_MAX_VERSIONS];
const char *clk_names[MFC_MAX_CLOCKS];
int num_clocks;
bool use_clock_gating;
};
/**
* struct s5p_mfc_priv_buf - represents internal used buffer
* @ofs: offset of each buffer, will be used for MFC
* @virt: kernel virtual address, only valid when the
* buffer accessed by driver
* @dma: DMA address, only valid when kernel DMA API used
* @size: size of the buffer
* @ctx: memory context (bank) used for this allocation
*/
struct s5p_mfc_priv_buf {
unsigned long ofs;
void *virt;
dma_addr_t dma;
size_t size;
unsigned int ctx;
};
/**
* struct s5p_mfc_dev - The struct containing driver internal parameters.
*
* @v4l2_dev: v4l2_device
* @vfd_dec: video device for decoding
* @vfd_enc: video device for encoding
* @plat_dev: platform device
* @mem_dev: child devices of the memory banks
* @regs_base: base address of the MFC hw registers
* @irq: irq resource
* @dec_ctrl_handler: control framework handler for decoding
* @enc_ctrl_handler: control framework handler for encoding
* @pm: power management control
Annotation
- Immediate include surface: `linux/platform_device.h`, `linux/videodev2.h`, `media/v4l2-ctrls.h`, `media/v4l2-device.h`, `media/v4l2-ioctl.h`, `media/videobuf2-v4l2.h`, `regs-mfc.h`, `regs-mfc-v12.h`.
- Detected declarations: `struct s5p_mfc_ctx`, `struct s5p_mfc_buf`, `struct s5p_mfc_pm`, `struct s5p_mfc_buf_size_v5`, `struct s5p_mfc_buf_size_v6`, `struct s5p_mfc_buf_size`, `struct s5p_mfc_variant`, `struct s5p_mfc_priv_buf`, `struct s5p_mfc_dev`, `struct s5p_mfc_h264_enc_params`.
- Atlas domain: Driver Families / drivers/media.
- 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.