drivers/video/fbdev/metronomefb.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/metronomefb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/metronomefb.c- Extension
.c- Size
- 17541 bytes
- Lines
- 729
- Domain
- Driver Families
- Bucket
- drivers/video
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/kernel.hlinux/errno.hlinux/string.hlinux/mm.hlinux/vmalloc.hlinux/delay.hlinux/interrupt.hlinux/fb.hlinux/init.hlinux/platform_device.hlinux/list.hlinux/firmware.hlinux/dma-mapping.hlinux/uaccess.hlinux/irq.hvideo/metronomefb.hlinux/unaligned.h
Detected Declarations
struct epd_framestruct waveform_hdrfunction calc_cksumfunction calc_img_cksumfunction load_waveformfunction metronome_display_cmdfunction metronome_powerup_cmdfunction metronome_config_cmdfunction metronome_init_cmdfunction metronome_init_regsfunction metronomefb_dpy_updatefunction metronomefb_dpy_update_pagefunction metronomefb_dpy_deferred_iofunction metronomefb_defio_damage_rangefunction metronomefb_defio_damage_areafunction metronomefb_probefunction metronomefb_remove
Annotated Snippet
struct epd_frame {
int fw; /* frame width */
int fh; /* frame height */
u16 config[4];
int wfm_size;
};
static struct epd_frame epd_frame_table[] = {
{
.fw = 832,
.fh = 622,
.config = {
15 /* sdlew */
| 2 << 8 /* sdosz */
| 0 << 11 /* sdor */
| 0 << 12 /* sdces */
| 0 << 15, /* sdcer */
42 /* gdspl */
| 1 << 8 /* gdr1 */
| 1 << 9 /* sdshr */
| 0 << 15, /* gdspp */
18 /* gdspw */
| 0 << 15, /* dispc */
599 /* vdlc */
| 0 << 11 /* dsi */
| 0 << 12, /* dsic */
},
.wfm_size = 47001,
},
{
.fw = 1088,
.fh = 791,
.config = {
0x0104,
0x031f,
0x0088,
0x02ff,
},
.wfm_size = 46770,
},
{
.fw = 1200,
.fh = 842,
.config = {
0x0101,
0x030e,
0x0012,
0x0280,
},
.wfm_size = 46770,
},
};
static struct fb_fix_screeninfo metronomefb_fix = {
.id = "metronomefb",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_STATIC_PSEUDOCOLOR,
.xpanstep = 0,
.ypanstep = 0,
.ywrapstep = 0,
.line_length = DPY_W,
.accel = FB_ACCEL_NONE,
};
static struct fb_var_screeninfo metronomefb_var = {
.xres = DPY_W,
.yres = DPY_H,
.xres_virtual = DPY_W,
.yres_virtual = DPY_H,
.bits_per_pixel = 8,
.grayscale = 1,
.nonstd = 1,
.red = { 4, 3, 0 },
.green = { 0, 0, 0 },
.blue = { 0, 0, 0 },
.transp = { 0, 0, 0 },
};
/* the waveform structure that is coming from userspace firmware */
struct waveform_hdr {
u8 stuff[32];
u8 wmta[3];
u8 fvsn;
u8 luts;
u8 mc;
u8 trc;
u8 stuff3;
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/errno.h`, `linux/string.h`, `linux/mm.h`, `linux/vmalloc.h`, `linux/delay.h`, `linux/interrupt.h`.
- Detected declarations: `struct epd_frame`, `struct waveform_hdr`, `function calc_cksum`, `function calc_img_cksum`, `function load_waveform`, `function metronome_display_cmd`, `function metronome_powerup_cmd`, `function metronome_config_cmd`, `function metronome_init_cmd`, `function metronome_init_regs`.
- Atlas domain: Driver Families / drivers/video.
- 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.