include/media/v4l2-dv-timings.h

Source file repositories/reference/linux-study-clean/include/media/v4l2-dv-timings.h

File Facts

System
Linux kernel
Corpus path
include/media/v4l2-dv-timings.h
Extension
.h
Size
11002 bytes
Lines
311
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

struct v4l2_hdmi_colorimetry {
	enum v4l2_colorspace colorspace;
	enum v4l2_ycbcr_encoding ycbcr_enc;
	enum v4l2_quantization quantization;
	enum v4l2_xfer_func xfer_func;
};

struct hdmi_avi_infoframe;
struct hdmi_vendor_infoframe;

struct v4l2_hdmi_colorimetry
v4l2_hdmi_rx_colorimetry(const struct hdmi_avi_infoframe *avi,
			 const struct hdmi_vendor_infoframe *hdmi,
			 unsigned int height);

unsigned int v4l2_num_edid_blocks(const u8 *edid, unsigned int max_blocks);
u16 v4l2_get_edid_phys_addr(const u8 *edid, unsigned int size,
			    unsigned int *offset);
void v4l2_set_edid_phys_addr(u8 *edid, unsigned int size, u16 phys_addr);
u16 v4l2_phys_addr_for_input(u16 phys_addr, u8 input);
int v4l2_phys_addr_validate(u16 phys_addr, u16 *parent, u16 *port);

/* Add support for exporting InfoFrames to debugfs */

/*
 * HDMI InfoFrames start with a 3 byte header, then a checksum,
 * followed by the actual IF payload.
 *
 * The payload length is limited to 30 bytes according to the HDMI spec,
 * but since the length is encoded in 5 bits, it can be 31 bytes theoretically.
 * So set the max length as 31 + 3 (header) + 1 (checksum) = 35.
 */
#define V4L2_DEBUGFS_IF_MAX_LEN (35)

#define V4L2_DEBUGFS_IF_AVI	BIT(0)
#define V4L2_DEBUGFS_IF_AUDIO	BIT(1)
#define V4L2_DEBUGFS_IF_SPD	BIT(2)
#define V4L2_DEBUGFS_IF_HDMI	BIT(3)
#define V4L2_DEBUGFS_IF_DRM	BIT(4)

typedef ssize_t (*v4l2_debugfs_if_read_t)(u32 type, void *priv,
					  struct file *filp, char __user *ubuf,
					  size_t count, loff_t *ppos);

struct v4l2_debugfs_if {
	struct dentry *if_dir;
	void *priv;

	v4l2_debugfs_if_read_t if_read;
};

#ifdef CONFIG_DEBUG_FS
struct v4l2_debugfs_if *v4l2_debugfs_if_alloc(struct dentry *root, u32 if_types,
					      void *priv,
					      v4l2_debugfs_if_read_t if_read);
void v4l2_debugfs_if_free(struct v4l2_debugfs_if *infoframes);
#else
static inline
struct v4l2_debugfs_if *v4l2_debugfs_if_alloc(struct dentry *root, u32 if_types,
					      void *priv,
					      v4l2_debugfs_if_read_t if_read)
{
	return NULL;
}

static inline void v4l2_debugfs_if_free(struct v4l2_debugfs_if *infoframes)
{
}
#endif

#endif

Annotation

Implementation Notes