drivers/media/platform/ti/omap/omap_voutdef.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/ti/omap/omap_voutdef.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/ti/omap/omap_voutdef.h
Extension
.h
Size
5265 bytes
Lines
220
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 vid_vrfb_dma {
	struct dma_chan *chan;
	struct dma_interleaved_template *xt;

	int req_status;
	int tx_status;
	wait_queue_head_t wait;
};

struct omapvideo_info {
	int id;
	int num_overlays;
	struct omap_overlay *overlays[MAX_OVLS];
	enum vout_rotaion_type rotation_type;
};

struct omap2video_device {
	struct mutex  mtx;

	int state;

	struct v4l2_device v4l2_dev;
	struct omap_vout_device *vouts[MAX_VOUT_DEV];

	int num_displays;
	struct omap_dss_device *displays[MAX_DISPLAYS];
	int num_overlays;
	struct omap_overlay *overlays[MAX_OVLS];
	int num_managers;
	struct omap_overlay_manager *managers[MAX_MANAGERS];
};

/* buffer for one video frame */
struct omap_vout_buffer {
	/* common v4l buffer stuff -- must be first */
	struct vb2_v4l2_buffer		vbuf;
	struct list_head		queue;
};

static inline struct omap_vout_buffer *vb2_to_omap_vout_buffer(struct vb2_buffer *vb)
{
	struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb);

	return container_of(vbuf, struct omap_vout_buffer, vbuf);
}

/* per-device data structure */
struct omap_vout_device {

	struct omapvideo_info vid_info;
	struct video_device *vfd;
	struct omap2video_device *vid_dev;
	struct v4l2_ctrl_handler ctrl_handler;
	int vid;

	/* allow to reuse previously allocated buffer which is big enough */
	int buffer_size;
	enum omap_color_mode dss_mode;

	u32 sequence;

	struct v4l2_pix_format pix;
	struct v4l2_rect crop;
	struct v4l2_window win;
	struct v4l2_framebuffer fbuf;

	/* Lock to protect the shared data structures in ioctl */
	struct mutex lock;

	enum dss_rotation rotation;
	bool mirror;
	int flicker_filter;

	int bpp; /* bytes per pixel */
	int vrfb_bpp; /* bytes per pixel with respect to VRFB */

	struct vid_vrfb_dma vrfb_dma_tx;
	unsigned int smsshado_phy_addr[MAC_VRFB_CTXS];
	unsigned int smsshado_virt_addr[MAC_VRFB_CTXS];
	struct vrfb vrfb_context[MAC_VRFB_CTXS];
	bool vrfb_static_allocation;
	unsigned int smsshado_size;
	unsigned char pos;

	int ps, vr_ps, line_length, first_int, field_id;
	struct omap_vout_buffer *cur_frm, *next_frm;
	spinlock_t vbq_lock;            /* spinlock for dma_queue */
	struct list_head dma_queue;
	dma_addr_t queued_buf_addr[VIDEO_MAX_FRAME];
	u32 cropped_offset;

Annotation

Implementation Notes