drivers/media/platform/mediatek/mdp/mtk_mdp_core.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/mediatek/mdp/mtk_mdp_core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/mediatek/mdp/mtk_mdp_core.h- Extension
.h- Size
- 7661 bytes
- Lines
- 257
- 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
linux/videodev2.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-mem2mem.hmedia/videobuf2-core.hmedia/videobuf2-dma-contig.hmtk_mdp_vpu.hmtk_mdp_comp.h
Detected Declarations
struct mtk_mdp_pix_alignstruct mtk_mdp_fmtstruct mtk_mdp_addrstruct mtk_mdp_ctrlsstruct mtk_mdp_framestruct mtk_mdp_variantstruct mtk_mdp_devstruct mtk_mdp_ctx
Annotated Snippet
struct mtk_mdp_pix_align {
u16 org_w;
u16 org_h;
u16 target_w;
u16 target_h;
};
/**
* struct mtk_mdp_fmt - the driver's internal color format data
* @pixelformat: the fourcc code for this format, 0 if not applicable
* @num_planes: number of physically non-contiguous data planes
* @num_comp: number of logical data planes
* @depth: per plane driver's private 'number of bits per pixel'
* @row_depth: per plane driver's private 'number of bits per pixel per row'
* @flags: flags indicating which operation mode format applies to
* MTK_MDP_FMT_FLAG_OUTPUT is used in OUTPUT stream
* MTK_MDP_FMT_FLAG_CAPTURE is used in CAPTURE stream
* @align: pointer to a pixel alignment struct, NULL if using default value
*/
struct mtk_mdp_fmt {
u32 pixelformat;
u16 num_planes;
u16 num_comp;
u8 depth[VIDEO_MAX_PLANES];
u8 row_depth[VIDEO_MAX_PLANES];
u32 flags;
struct mtk_mdp_pix_align *align;
};
/**
* struct mtk_mdp_addr - the image processor physical address set
* @addr: address of planes
*/
struct mtk_mdp_addr {
dma_addr_t addr[MTK_MDP_MAX_NUM_PLANE];
};
/* struct mtk_mdp_ctrls - the image processor control set
* @rotate: rotation degree
* @hflip: horizontal flip
* @vflip: vertical flip
* @global_alpha: the alpha value of current frame
*/
struct mtk_mdp_ctrls {
struct v4l2_ctrl *rotate;
struct v4l2_ctrl *hflip;
struct v4l2_ctrl *vflip;
struct v4l2_ctrl *global_alpha;
};
/**
* struct mtk_mdp_frame - source/target frame properties
* @width: SRC : SRCIMG_WIDTH, DST : OUTPUTDMA_WHOLE_IMG_WIDTH
* @height: SRC : SRCIMG_HEIGHT, DST : OUTPUTDMA_WHOLE_IMG_HEIGHT
* @crop: cropped(source)/scaled(destination) size
* @payload: image size in bytes (w x h x bpp)
* @pitch: bytes per line of image in memory
* @addr: image frame buffer physical addresses
* @fmt: color format pointer
* @alpha: frame's alpha value
*/
struct mtk_mdp_frame {
u32 width;
u32 height;
struct v4l2_rect crop;
unsigned long payload[VIDEO_MAX_PLANES];
unsigned int pitch[VIDEO_MAX_PLANES];
struct mtk_mdp_addr addr;
const struct mtk_mdp_fmt *fmt;
u8 alpha;
};
/**
* struct mtk_mdp_variant - image processor variant information
* @pix_max: maximum limit of image size
* @pix_min: minimum limit of image size
* @pix_align: alignment of image
* @h_scale_up_max: maximum scale-up in horizontal
* @v_scale_up_max: maximum scale-up in vertical
* @h_scale_down_max: maximum scale-down in horizontal
* @v_scale_down_max: maximum scale-down in vertical
*/
struct mtk_mdp_variant {
struct mtk_mdp_pix_limit *pix_max;
struct mtk_mdp_pix_limit *pix_min;
struct mtk_mdp_pix_align *pix_align;
u16 h_scale_up_max;
u16 v_scale_up_max;
u16 h_scale_down_max;
u16 v_scale_down_max;
Annotation
- Immediate include surface: `linux/videodev2.h`, `media/v4l2-ctrls.h`, `media/v4l2-device.h`, `media/v4l2-mem2mem.h`, `media/videobuf2-core.h`, `media/videobuf2-dma-contig.h`, `mtk_mdp_vpu.h`, `mtk_mdp_comp.h`.
- Detected declarations: `struct mtk_mdp_pix_align`, `struct mtk_mdp_fmt`, `struct mtk_mdp_addr`, `struct mtk_mdp_ctrls`, `struct mtk_mdp_frame`, `struct mtk_mdp_variant`, `struct mtk_mdp_dev`, `struct mtk_mdp_ctx`.
- 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.