drivers/gpu/drm/tiny/bochs.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/tiny/bochs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/tiny/bochs.c- Extension
.c- Size
- 23001 bytes
- Lines
- 837
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bug.hlinux/aperture.hlinux/module.hlinux/pci.hdrm/clients/drm_client_setup.hdrm/drm_atomic.hdrm/drm_atomic_helper.hdrm/drm_damage_helper.hdrm/drm_drv.hdrm/drm_edid.hdrm/drm_fbdev_shmem.hdrm/drm_fourcc.hdrm/drm_framebuffer.hdrm/drm_gem_atomic_helper.hdrm/drm_gem_framebuffer_helper.hdrm/drm_gem_shmem_helper.hdrm/drm_managed.hdrm/drm_module.hdrm/drm_panic.hdrm/drm_plane_helper.hdrm/drm_print.hdrm/drm_probe_helper.hdrm/drm_vblank.hdrm/drm_vblank_helper.hvideo/vga.h
Detected Declarations
struct bochs_deviceenum bochs_typesfunction bochs_uses_mmiofunction bochs_vga_writebfunction bochs_vga_readbfunction bochs_dispi_readfunction bochs_dispi_writefunction bochs_hw_set_big_endianfunction bochs_hw_set_little_endianfunction bochs_get_edid_blockfunction bochs_hw_initfunction bochs_hw_blankfunction bochs_hw_setmodefunction bochs_hw_setformatfunction bochs_hw_setbasefunction bochs_primary_plane_helper_atomic_checkfunction bochs_primary_plane_helper_atomic_updatefunction bochs_primary_plane_helper_get_scanout_bufferfunction bochs_crtc_helper_mode_set_nofbfunction bochs_crtc_helper_atomic_checkfunction bochs_crtc_helper_atomic_enablefunction bochs_crtc_helper_atomic_disablefunction bochs_connector_helper_get_modesfunction bochs_mode_config_mode_validfunction bochs_kms_initfunction bochs_loadfunction bochs_pm_suspendfunction bochs_pm_resumefunction bochs_pci_probefunction bochs_pci_removefunction bochs_pci_shutdown
Annotated Snippet
static struct pci_driver bochs_pci_driver = {
.name = "bochs-drm",
.id_table = bochs_pci_tbl,
.probe = bochs_pci_probe,
.remove = bochs_pci_remove,
.shutdown = bochs_pci_shutdown,
.driver.pm = &bochs_pm_ops,
};
/* ---------------------------------------------------------------------- */
/* module init/exit */
drm_module_pci_driver_if_modeset(bochs_pci_driver, bochs_modeset);
MODULE_DEVICE_TABLE(pci, bochs_pci_tbl);
MODULE_AUTHOR("Gerd Hoffmann <kraxel@redhat.com>");
MODULE_DESCRIPTION("DRM Support for bochs dispi vga interface (qemu stdvga)");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/bug.h`, `linux/aperture.h`, `linux/module.h`, `linux/pci.h`, `drm/clients/drm_client_setup.h`, `drm/drm_atomic.h`, `drm/drm_atomic_helper.h`, `drm/drm_damage_helper.h`.
- Detected declarations: `struct bochs_device`, `enum bochs_types`, `function bochs_uses_mmio`, `function bochs_vga_writeb`, `function bochs_vga_readb`, `function bochs_dispi_read`, `function bochs_dispi_write`, `function bochs_hw_set_big_endian`, `function bochs_hw_set_little_endian`, `function bochs_get_edid_block`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.