drivers/media/test-drivers/visl/visl.h

Source file repositories/reference/linux-study-clean/drivers/media/test-drivers/visl/visl.h

File Facts

System
Linux kernel
Corpus path
drivers/media/test-drivers/visl/visl.h
Extension
.h
Size
4519 bytes
Lines
174
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 visl_ctrls {
	const struct visl_ctrl_desc *ctrls;
	unsigned int num_ctrls;
};

struct visl_coded_format_desc {
	u32 pixelformat;
	struct v4l2_frmsize_stepwise frmsize;
	const struct visl_ctrls *ctrls;
	unsigned int num_decoded_fmts;
	const u32 *decoded_fmts;
};

extern const struct visl_coded_format_desc visl_coded_fmts[];
extern const size_t num_coded_fmts;

enum {
	V4L2_M2M_SRC = 0,
	V4L2_M2M_DST = 1,
};

extern unsigned int visl_debug;
#define dprintk(dev, fmt, arg...) \
	v4l2_dbg(1, visl_debug, &(dev)->v4l2_dev, "%s: " fmt, __func__, ## arg)

extern int visl_dprintk_frame_start;
extern unsigned int visl_dprintk_nframes;
extern bool keep_bitstream_buffers;
extern int bitstream_trace_frame_start;
extern unsigned int bitstream_trace_nframes;
extern bool tpg_verbose;

#define frame_dprintk(dev, current, fmt, arg...) \
	do { \
		if (visl_dprintk_frame_start > -1 && \
		    (current) >= visl_dprintk_frame_start && \
		    (current) < visl_dprintk_frame_start + visl_dprintk_nframes) \
			dprintk(dev, fmt, ## arg); \
	} while (0) \

struct visl_q_data {
	unsigned int		sequence;
};

struct visl_dev {
	struct v4l2_device	v4l2_dev;
	struct video_device	vfd;
#ifdef CONFIG_MEDIA_CONTROLLER
	struct media_device	mdev;
#endif

	struct mutex		dev_mutex;

	struct v4l2_m2m_dev	*m2m_dev;

#ifdef CONFIG_VISL_DEBUGFS
	struct dentry		*debugfs_root;
	struct dentry		*bitstream_debugfs;
	struct list_head	bitstream_blobs;

	/* Protects the "blob" list */
	struct mutex		bitstream_lock;
#endif
};

enum visl_codec {
	VISL_CODEC_NONE,
	VISL_CODEC_FWHT,
	VISL_CODEC_MPEG2,
	VISL_CODEC_VP8,
	VISL_CODEC_VP9,
	VISL_CODEC_H264,
	VISL_CODEC_HEVC,
	VISL_CODEC_AV1,
};

struct visl_blob {
	struct list_head list;
	struct dentry *dentry;
	struct debugfs_blob_wrapper blob;
};

struct visl_ctx {
	struct v4l2_fh		fh;
	struct visl_dev	*dev;
	struct v4l2_ctrl_handler hdl;

	struct mutex		vb_mutex;

	struct visl_q_data	q_data[VISL_M2M_NQUEUES];

Annotation

Implementation Notes