drivers/media/pci/mgb4/mgb4_io.h
Source file repositories/reference/linux-study-clean/drivers/media/pci/mgb4/mgb4_io.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/mgb4/mgb4_io.h- Extension
.h- Size
- 1464 bytes
- Lines
- 55
- 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/math64.hmedia/v4l2-dev.hmgb4_core.h
Detected Declarations
struct mgb4_frame_bufferfunction has_yuv_and_timeperframefunction pixel_size
Annotated Snippet
struct mgb4_frame_buffer {
struct vb2_v4l2_buffer vb;
struct list_head list;
};
static inline struct mgb4_frame_buffer *to_frame_buffer(struct vb2_v4l2_buffer *vbuf)
{
return container_of(vbuf, struct mgb4_frame_buffer, vb);
}
static inline bool has_yuv_and_timeperframe(struct mgb4_regs *video)
{
u32 status = mgb4_read_reg(video, 0xD0);
return (status & (1U << 8));
}
#define has_yuv(video) has_yuv_and_timeperframe(video)
#define has_timeperframe(video) has_yuv_and_timeperframe(video)
static inline u32 pixel_size(struct v4l2_dv_timings *timings)
{
struct v4l2_bt_timings *bt = &timings->bt;
u32 height = bt->height + bt->vfrontporch + bt->vsync + bt->vbackporch;
u32 width = bt->width + bt->hfrontporch + bt->hsync + bt->hbackporch;
return width * height;
}
#endif
Annotation
- Immediate include surface: `linux/math64.h`, `media/v4l2-dev.h`, `mgb4_core.h`.
- Detected declarations: `struct mgb4_frame_buffer`, `function has_yuv_and_timeperframe`, `function pixel_size`.
- 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.