drivers/media/test-drivers/vivid/vivid-core.h
Source file repositories/reference/linux-study-clean/drivers/media/test-drivers/vivid/vivid-core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/test-drivers/vivid/vivid-core.h- Extension
.h- Size
- 20711 bytes
- Lines
- 707
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/fb.hlinux/workqueue.hmedia/cec.hmedia/videobuf2-v4l2.hmedia/v4l2-device.hmedia/v4l2-dev.hmedia/v4l2-ctrls.hmedia/tpg/v4l2-tpg.hvivid-rds-gen.hvivid-vbi-gen.h
Detected Declarations
struct vivid_fmtstruct vivid_bufferstruct vivid_cec_xferstruct vivid_devenum vivid_inputenum vivid_signal_modeenum vivid_colorspacefunction vivid_is_webcamfunction vivid_is_tv_capfunction vivid_is_svid_capfunction vivid_is_hdmi_capfunction vivid_is_sdtv_capfunction vivid_is_svid_outfunction vivid_is_hdmi_out
Annotated Snippet
struct vivid_fmt {
u32 fourcc; /* v4l2 format id */
enum tgp_color_enc color_enc;
bool can_do_overlay;
u8 vdownsampling[TPG_MAX_PLANES];
u32 alpha_mask;
u8 planes;
u8 buffers;
u32 data_offset[TPG_MAX_PLANES];
u32 bit_depth[TPG_MAX_PLANES];
};
extern struct vivid_fmt vivid_formats[];
/* buffer for one video frame */
struct vivid_buffer {
/* common v4l buffer stuff -- must be first */
struct vb2_v4l2_buffer vb;
struct list_head list;
};
enum vivid_input {
WEBCAM,
TV,
SVID,
HDMI,
};
enum vivid_signal_mode {
CURRENT_DV_TIMINGS,
CURRENT_STD = CURRENT_DV_TIMINGS,
NO_SIGNAL,
NO_LOCK,
OUT_OF_RANGE,
SELECTED_DV_TIMINGS,
SELECTED_STD = SELECTED_DV_TIMINGS,
CYCLE_DV_TIMINGS,
CYCLE_STD = CYCLE_DV_TIMINGS,
CUSTOM_DV_TIMINGS,
};
enum vivid_colorspace {
VIVID_CS_170M,
VIVID_CS_709,
VIVID_CS_SRGB,
VIVID_CS_OPRGB,
VIVID_CS_2020,
VIVID_CS_DCI_P3,
VIVID_CS_240M,
VIVID_CS_SYS_M,
VIVID_CS_SYS_BG,
};
#define VIVID_INVALID_SIGNAL(mode) \
((mode) == NO_SIGNAL || (mode) == NO_LOCK || (mode) == OUT_OF_RANGE)
struct vivid_cec_xfer {
struct cec_adapter *adap;
u8 msg[CEC_MAX_MSG_SIZE];
u32 len;
u32 sft;
};
struct vivid_dev {
u8 inst;
struct v4l2_device v4l2_dev;
#ifdef CONFIG_MEDIA_CONTROLLER
struct media_device mdev;
struct media_pad vid_cap_pad;
struct media_pad vid_out_pad;
struct media_pad vbi_cap_pad;
struct media_pad vbi_out_pad;
struct media_pad sdr_cap_pad;
struct media_pad meta_cap_pad;
struct media_pad meta_out_pad;
struct media_pad touch_cap_pad;
#endif
struct v4l2_ctrl_handler ctrl_hdl_user_gen;
struct v4l2_ctrl_handler ctrl_hdl_user_vid;
struct v4l2_ctrl_handler ctrl_hdl_user_aud;
struct v4l2_ctrl_handler ctrl_hdl_streaming;
struct v4l2_ctrl_handler ctrl_hdl_sdtv_cap;
struct v4l2_ctrl_handler ctrl_hdl_loop_cap;
struct v4l2_ctrl_handler ctrl_hdl_fb;
struct video_device vid_cap_dev;
struct v4l2_ctrl_handler ctrl_hdl_vid_cap;
struct video_device vid_out_dev;
struct v4l2_ctrl_handler ctrl_hdl_vid_out;
struct video_device vbi_cap_dev;
struct v4l2_ctrl_handler ctrl_hdl_vbi_cap;
Annotation
- Immediate include surface: `linux/fb.h`, `linux/workqueue.h`, `media/cec.h`, `media/videobuf2-v4l2.h`, `media/v4l2-device.h`, `media/v4l2-dev.h`, `media/v4l2-ctrls.h`, `media/tpg/v4l2-tpg.h`.
- Detected declarations: `struct vivid_fmt`, `struct vivid_buffer`, `struct vivid_cec_xfer`, `struct vivid_dev`, `enum vivid_input`, `enum vivid_signal_mode`, `enum vivid_colorspace`, `function vivid_is_webcam`, `function vivid_is_tv_cap`, `function vivid_is_svid_cap`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.