drivers/media/platform/mediatek/mdp3/mtk-mdp3-regs.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/mediatek/mdp3/mtk-mdp3-regs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/mediatek/mdp3/mtk-mdp3-regs.h- Extension
.h- Size
- 14387 bytes
- Lines
- 379
- 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/videodev2.hmedia/videobuf2-core.hmtk-img-ipi.h
Detected Declarations
struct mdp_formatstruct mdp_pix_limitstruct mdp_limitstruct mdp_cropstruct mdp_framestruct mdp_frameparamstruct mdp_devenum mdp_colorenum mdp_ycbcr_profileenum mdp_stream_typefunction MDP_COLOR_IS_UV_COPLANEfunction mdp_color_get_min_y_stridefunction mdp_color_get_min_uv_stridefunction mdp_color_get_min_y_sizefunction mdp_color_get_min_uv_sizefunction mdp_target_is_cropfunction mdp_target_is_compose
Annotated Snippet
struct mdp_format {
u32 pixelformat;
u32 mdp_color;
u8 depth[VIDEO_MAX_PLANES];
u8 row_depth[VIDEO_MAX_PLANES];
u8 num_planes;
u8 walign;
u8 halign;
u8 salign;
u32 flags;
};
struct mdp_pix_limit {
u32 wmin;
u32 hmin;
u32 wmax;
u32 hmax;
};
struct mdp_limit {
struct mdp_pix_limit out_limit;
struct mdp_pix_limit cap_limit;
u32 h_scale_up_max;
u32 v_scale_up_max;
u32 h_scale_down_max;
u32 v_scale_down_max;
};
enum mdp_stream_type {
MDP_STREAM_TYPE_UNKNOWN,
MDP_STREAM_TYPE_BITBLT,
MDP_STREAM_TYPE_GPU_BITBLT,
MDP_STREAM_TYPE_DUAL_BITBLT,
MDP_STREAM_TYPE_2ND_BITBLT,
MDP_STREAM_TYPE_ISP_IC,
MDP_STREAM_TYPE_ISP_VR,
MDP_STREAM_TYPE_ISP_ZSD,
MDP_STREAM_TYPE_ISP_IP,
MDP_STREAM_TYPE_ISP_VSS,
MDP_STREAM_TYPE_ISP_ZSD_SLOW,
MDP_STREAM_TYPE_WPE,
MDP_STREAM_TYPE_WPE2,
};
struct mdp_crop {
struct v4l2_rect c;
struct v4l2_fract left_subpix;
struct v4l2_fract top_subpix;
struct v4l2_fract width_subpix;
struct v4l2_fract height_subpix;
};
struct mdp_frame {
struct v4l2_format format;
const struct mdp_format *mdp_fmt;
u32 ycbcr_prof; /* enum mdp_ycbcr_profile */
u32 usage; /* enum mdp_buffer_usage */
struct mdp_crop crop;
struct v4l2_rect compose;
s32 rotation;
u32 hflip:1;
u32 vflip:1;
u32 hdr:1;
u32 dre:1;
u32 sharpness:1;
u32 dither:1;
};
static inline bool mdp_target_is_crop(u32 target)
{
return (target == V4L2_SEL_TGT_CROP) ||
(target == V4L2_SEL_TGT_CROP_DEFAULT) ||
(target == V4L2_SEL_TGT_CROP_BOUNDS);
}
static inline bool mdp_target_is_compose(u32 target)
{
return (target == V4L2_SEL_TGT_COMPOSE) ||
(target == V4L2_SEL_TGT_COMPOSE_DEFAULT) ||
(target == V4L2_SEL_TGT_COMPOSE_BOUNDS);
}
#define MDP_MAX_CAPTURES IMG_MAX_HW_OUTPUTS
#define MDP_VPU_INIT BIT(0)
#define MDP_M2M_CTX_ERROR BIT(1)
struct mdp_frameparam {
struct list_head list;
struct mdp_m2m_ctx *ctx;
Annotation
- Immediate include surface: `linux/videodev2.h`, `media/videobuf2-core.h`, `mtk-img-ipi.h`.
- Detected declarations: `struct mdp_format`, `struct mdp_pix_limit`, `struct mdp_limit`, `struct mdp_crop`, `struct mdp_frame`, `struct mdp_frameparam`, `struct mdp_dev`, `enum mdp_color`, `enum mdp_ycbcr_profile`, `enum mdp_stream_type`.
- 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.