drivers/gpu/drm/gma500/psb_drv.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/gma500/psb_drv.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/gma500/psb_drv.c- Extension
.c- Size
- 15363 bytes
- Lines
- 548
- 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/aperture.hlinux/cpu.hlinux/module.hlinux/notifier.hlinux/pm_runtime.hlinux/spinlock.hlinux/delay.hasm/set_memory.hacpi/video.hdrm/clients/drm_client_setup.hdrm/drm.hdrm/drm_drv.hdrm/drm_file.hdrm/drm_ioctl.hdrm/drm_print.hdrm/drm_vblank.hframebuffer.hgem.hintel_bios.hmid_bios.hpower.hpsb_drv.hpsb_intel_reg.hpsb_irq.hpsb_reg.h
Detected Declarations
function psb_spankfunction psb_do_initfunction psb_driver_unloadfunction psb_device_releasefunction psb_driver_loadfunction devicefunction psb_pci_probefunction psb_pci_removefunction psb_initfunction psb_exit
Annotated Snippet
static const struct file_operations psb_gem_fops = {
.owner = THIS_MODULE,
.open = drm_open,
.release = drm_release,
.unlocked_ioctl = drm_ioctl,
.compat_ioctl = drm_compat_ioctl,
.mmap = drm_gem_mmap,
.poll = drm_poll,
.read = drm_read,
.fop_flags = FOP_UNSIGNED_OFFSET,
};
static const struct drm_driver driver = {
.driver_features = DRIVER_MODESET | DRIVER_GEM,
.num_ioctls = ARRAY_SIZE(psb_ioctls),
.dumb_create = psb_gem_dumb_create,
PSB_FBDEV_DRIVER_OPS,
.ioctls = psb_ioctls,
.fops = &psb_gem_fops,
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
.major = DRIVER_MAJOR,
.minor = DRIVER_MINOR,
.patchlevel = DRIVER_PATCHLEVEL
};
static struct pci_driver psb_pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = psb_pci_probe,
.remove = psb_pci_remove,
.driver.pm = &psb_pm_ops,
};
static int __init psb_init(void)
{
if (drm_firmware_drivers_only())
return -ENODEV;
return pci_register_driver(&psb_pci_driver);
}
static void __exit psb_exit(void)
{
pci_unregister_driver(&psb_pci_driver);
}
late_initcall(psb_init);
module_exit(psb_exit);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/aperture.h`, `linux/cpu.h`, `linux/module.h`, `linux/notifier.h`, `linux/pm_runtime.h`, `linux/spinlock.h`, `linux/delay.h`, `asm/set_memory.h`.
- Detected declarations: `function psb_spank`, `function psb_do_init`, `function psb_driver_unload`, `function psb_device_release`, `function psb_driver_load`, `function device`, `function psb_pci_probe`, `function psb_pci_remove`, `function psb_init`, `function psb_exit`.
- 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.