drivers/media/platform/st/sti/bdisp/bdisp.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/st/sti/bdisp/bdisp.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/st/sti/bdisp/bdisp.h
Extension
.h
Size
6636 bytes
Lines
215
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 bdisp_ctrls {
	struct v4l2_ctrl        *hflip;
	struct v4l2_ctrl        *vflip;
};

/**
 * struct bdisp_fmt - driver's internal color format data
 * @pixelformat:fourcc code for this format
 * @nb_planes:  number of planes  (ex: [0]=RGB/Y - [1]=Cb/Cr, ...)
 * @bpp:        bits per pixel (general)
 * @bpp_plane0: byte per pixel for the 1st plane
 * @w_align:    width alignment in pixel (multiple of)
 * @h_align:    height alignment in pixel (multiple of)
 */
struct bdisp_fmt {
	u32                     pixelformat;
	u8                      nb_planes;
	u8                      bpp;
	u8                      bpp_plane0;
	u8                      w_align;
	u8                      h_align;
};

/**
 * struct bdisp_frame - frame properties
 *
 * @width:      frame width (including padding)
 * @height:     frame height (including padding)
 * @fmt:        pointer to frame format descriptor
 * @field:      frame / field type
 * @bytesperline: stride of the 1st plane
 * @sizeimage:  image size in bytes
 * @colorspace: colorspace
 * @crop:       crop area
 * @paddr:      image physical addresses per plane ([0]=RGB/Y - [1]=Cb/Cr, ...)
 */
struct bdisp_frame {
	u32                     width;
	u32                     height;
	const struct bdisp_fmt  *fmt;
	enum v4l2_field         field;
	u32                     bytesperline;
	u32                     sizeimage;
	enum v4l2_colorspace    colorspace;
	struct v4l2_rect        crop;
	dma_addr_t              paddr[4];
};

/**
 * struct bdisp_request - bdisp request
 *
 * @src:        source frame properties
 * @dst:        destination frame properties
 * @hflip:      horizontal flip
 * @vflip:      vertical flip
 * @nb_req:     number of run request
 */
struct bdisp_request {
	struct bdisp_frame      src;
	struct bdisp_frame      dst;
	unsigned int            hflip:1;
	unsigned int            vflip:1;
	int                     nb_req;
};

/**
 * struct bdisp_ctx - device context data
 *
 * @src:        source frame properties
 * @dst:        destination frame properties
 * @state:      flags to keep track of user configuration
 * @hflip:      horizontal flip
 * @vflip:      vertical flip
 * @bdisp_dev:  the device this context applies to
 * @node:       node array
 * @node_paddr: node physical address array
 * @fh:         v4l2 file handle
 * @ctrl_handler: v4l2 controls handler
 * @bdisp_ctrls: bdisp control set
 * @ctrls_rdy:  true if the control handler is initialized
 */
struct bdisp_ctx {
	struct bdisp_frame      src;
	struct bdisp_frame      dst;
	u32                     state;
	unsigned int            hflip:1;
	unsigned int            vflip:1;
	struct bdisp_dev        *bdisp_dev;
	struct bdisp_node       *node[MAX_NB_NODE];
	dma_addr_t              node_paddr[MAX_NB_NODE];

Annotation

Implementation Notes