samples/vfio-mdev/mdpy-fb.c
Source file repositories/reference/linux-study-clean/samples/vfio-mdev/mdpy-fb.c
File Facts
- System
- Linux kernel
- Corpus path
samples/vfio-mdev/mdpy-fb.c- Extension
.c- Size
- 5567 bytes
- Lines
- 234
- Domain
- Support Tooling And Documentation
- Bucket
- samples
- Inferred role
- Support Tooling And Documentation: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/errno.hlinux/fb.hlinux/io.hlinux/pci.hlinux/module.hdrm/drm_fourcc.hmdpy-defs.h
Detected Declarations
struct mdpy_fb_parfunction mdpy_fb_setcolregfunction mdpy_fb_destroyfunction mdpy_fb_probefunction mdpy_fb_removefunction mdpy_fb_initmodule init mdpy_fb_init
Annotated Snippet
static struct pci_driver mdpy_fb_pci_driver = {
.name = "mdpy-fb",
.id_table = mdpy_fb_pci_table,
.probe = mdpy_fb_probe,
.remove = mdpy_fb_remove,
};
static int __init mdpy_fb_init(void)
{
int ret;
ret = pci_register_driver(&mdpy_fb_pci_driver);
if (ret)
return ret;
return 0;
}
module_init(mdpy_fb_init);
MODULE_DEVICE_TABLE(pci, mdpy_fb_pci_table);
MODULE_DESCRIPTION("Framebuffer driver for mdpy (mediated virtual pci display device)");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/errno.h`, `linux/fb.h`, `linux/io.h`, `linux/pci.h`, `linux/module.h`, `drm/drm_fourcc.h`, `mdpy-defs.h`.
- Detected declarations: `struct mdpy_fb_par`, `function mdpy_fb_setcolreg`, `function mdpy_fb_destroy`, `function mdpy_fb_probe`, `function mdpy_fb_remove`, `function mdpy_fb_init`, `module init mdpy_fb_init`.
- Atlas domain: Support Tooling And Documentation / samples.
- Implementation status: pattern 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.