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.

Dependency Surface

Detected Declarations

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

Implementation Notes