include/linux/vgaarb.h
Source file repositories/reference/linux-study-clean/include/linux/vgaarb.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/vgaarb.h- Extension
.h- Size
- 2880 bytes
- Lines
- 104
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
video/vga.h
Detected Declarations
struct pci_devfunction vga_set_legacy_decodingfunction vga_getfunction vga_putfunction vga_set_default_devicefunction vga_client_registerfunction vga_get_interruptiblefunction vga_get_uninterruptiblefunction vga_client_unregister
Annotated Snippet
#ifndef LINUX_VGA_H
#define LINUX_VGA_H
#include <video/vga.h>
struct pci_dev;
/* Legacy VGA regions */
#define VGA_RSRC_NONE 0x00
#define VGA_RSRC_LEGACY_IO 0x01
#define VGA_RSRC_LEGACY_MEM 0x02
#define VGA_RSRC_LEGACY_MASK (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM)
/* Non-legacy access */
#define VGA_RSRC_NORMAL_IO 0x04
#define VGA_RSRC_NORMAL_MEM 0x08
#ifdef CONFIG_VGA_ARB
void vga_set_legacy_decoding(struct pci_dev *pdev, unsigned int decodes);
int vga_get(struct pci_dev *pdev, unsigned int rsrc, int interruptible);
void vga_put(struct pci_dev *pdev, unsigned int rsrc);
struct pci_dev *vga_default_device(void);
void vga_set_default_device(struct pci_dev *pdev);
int vga_remove_vgacon(struct pci_dev *pdev);
int vga_client_register(struct pci_dev *pdev,
unsigned int (*set_decode)(struct pci_dev *pdev, bool state));
#else /* CONFIG_VGA_ARB */
static inline void vga_set_legacy_decoding(struct pci_dev *pdev,
unsigned int decodes)
{
};
static inline int vga_get(struct pci_dev *pdev, unsigned int rsrc,
int interruptible)
{
return 0;
}
static inline void vga_put(struct pci_dev *pdev, unsigned int rsrc)
{
}
static inline struct pci_dev *vga_default_device(void)
{
return NULL;
}
static inline void vga_set_default_device(struct pci_dev *pdev)
{
}
static inline int vga_remove_vgacon(struct pci_dev *pdev)
{
return 0;
}
static inline int vga_client_register(struct pci_dev *pdev,
unsigned int (*set_decode)(struct pci_dev *pdev, bool state))
{
return 0;
}
#endif /* CONFIG_VGA_ARB */
/**
* vga_get_interruptible
* @pdev: pci device of the VGA card or NULL for the system default
* @rsrc: bit mask of resources to acquire and lock
*
* Shortcut to vga_get with interruptible set to true.
*
* On success, release the VGA resource again with vga_put().
*/
static inline int vga_get_interruptible(struct pci_dev *pdev,
unsigned int rsrc)
{
return vga_get(pdev, rsrc, 1);
}
/**
* vga_get_uninterruptible - shortcut to vga_get()
* @pdev: pci device of the VGA card or NULL for the system default
* @rsrc: bit mask of resources to acquire and lock
*
* Shortcut to vga_get with interruptible set to false.
*
* On success, release the VGA resource again with vga_put().
*/
static inline int vga_get_uninterruptible(struct pci_dev *pdev,
unsigned int rsrc)
{
return vga_get(pdev, rsrc, 0);
}
static inline void vga_client_unregister(struct pci_dev *pdev)
{
vga_client_register(pdev, NULL);
}
Annotation
- Immediate include surface: `video/vga.h`.
- Detected declarations: `struct pci_dev`, `function vga_set_legacy_decoding`, `function vga_get`, `function vga_put`, `function vga_set_default_device`, `function vga_client_register`, `function vga_get_interruptible`, `function vga_get_uninterruptible`, `function vga_client_unregister`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.