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.

Dependency Surface

Detected Declarations

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

Implementation Notes