drivers/video/fbdev/uvesafb.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/uvesafb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/uvesafb.c- Extension
.c- Size
- 49654 bytes
- Lines
- 1998
- Domain
- Driver Families
- Bucket
- drivers/video
- 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.
- 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/init.hlinux/module.hlinux/moduleparam.hlinux/skbuff.hlinux/timer.hlinux/completion.hlinux/connector.hlinux/random.hlinux/platform_device.hlinux/limits.hlinux/fb.hlinux/io.hlinux/mutex.hlinux/slab.hvideo/edid.hvideo/uvesafb.hvideo/vga.hedid.h
Detected Declarations
function uvesafb_cn_callbackfunction uvesafb_helper_startfunction andfunction uvesafb_freefunction uvesafb_resetfunction uvesafb_setup_varfunction uvesafb_vbe_find_modefunction uvesafb_vbe_state_restorefunction uvesafb_vbe_getinfofunction uvesafb_vbe_getmodesfunction uvesafb_vbe_getpmifunction uvesafb_is_valid_modefunction uvesafb_vbe_getedidfunction uvesafb_vbe_getmonspecsfunction uvesafb_vbe_getstatesizefunction uvesafb_vbe_initfunction uvesafb_vbe_init_modefunction list_for_eachfunction uvesafb_setpalettefunction uvesafb_setcolregfunction uvesafb_setcmapfunction uvesafb_pan_displayfunction uvesafb_blankfunction uvesafb_openfunction uvesafb_releasefunction uvesafb_set_parfunction uvesafb_check_limitsfunction uvesafb_check_varfunction uvesafb_init_infofunction uvesafb_init_mtrrfunction uvesafb_ioremapfunction uvesafb_show_vbe_verfunction uvesafb_show_vbe_modesfunction uvesafb_show_vendorfunction uvesafb_show_product_namefunction uvesafb_show_product_revfunction uvesafb_show_oem_stringfunction uvesafb_show_nocrtcfunction uvesafb_store_nocrtcfunction uvesafb_probefunction uvesafb_removefunction uvesafb_setupfunction v86d_showfunction v86d_storefunction uvesafb_initfunction uvesafb_exitfunction param_set_scrollmodule init uvesafb_init
Annotated Snippet
static ssize_t v86d_show(struct device_driver *dev, char *buf)
{
return snprintf(buf, PAGE_SIZE, "%s\n", v86d_path);
}
static ssize_t v86d_store(struct device_driver *dev, const char *buf,
size_t count)
{
strscpy_pad(v86d_path, buf);
return count;
}
static DRIVER_ATTR_RW(v86d);
static int uvesafb_init(void)
{
int err;
#ifndef MODULE
char *option = NULL;
if (fb_get_options("uvesafb", &option))
return -ENODEV;
uvesafb_setup(option);
#endif
err = cn_add_callback(&uvesafb_cn_id, "uvesafb", uvesafb_cn_callback);
if (err)
return err;
err = platform_driver_register(&uvesafb_driver);
if (!err) {
uvesafb_device = platform_device_alloc("uvesafb", 0);
if (uvesafb_device)
err = platform_device_add(uvesafb_device);
else
err = -ENOMEM;
if (err) {
platform_device_put(uvesafb_device);
platform_driver_unregister(&uvesafb_driver);
cn_del_callback(&uvesafb_cn_id);
return err;
}
err = driver_create_file(&uvesafb_driver.driver,
&driver_attr_v86d);
if (err) {
pr_warn("failed to register attributes\n");
err = 0;
}
}
return err;
}
module_init(uvesafb_init);
static void uvesafb_exit(void)
{
struct uvesafb_ktask *task;
if (v86d_started) {
task = uvesafb_prep();
if (task) {
task->t.flags = TF_EXIT;
uvesafb_exec(task);
uvesafb_free(task);
}
}
driver_remove_file(&uvesafb_driver.driver, &driver_attr_v86d);
platform_device_unregister(uvesafb_device);
platform_driver_unregister(&uvesafb_driver);
cn_del_callback(&uvesafb_cn_id);
}
module_exit(uvesafb_exit);
static int param_set_scroll(const char *val, const struct kernel_param *kp)
{
ypan = 0;
if (!strcmp(val, "redraw"))
ypan = 0;
else if (!strcmp(val, "ypan"))
ypan = 1;
else if (!strcmp(val, "ywrap"))
ypan = 2;
else
return -EINVAL;
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/skbuff.h`, `linux/timer.h`, `linux/completion.h`, `linux/connector.h`, `linux/random.h`.
- Detected declarations: `function uvesafb_cn_callback`, `function uvesafb_helper_start`, `function and`, `function uvesafb_free`, `function uvesafb_reset`, `function uvesafb_setup_var`, `function uvesafb_vbe_find_mode`, `function uvesafb_vbe_state_restore`, `function uvesafb_vbe_getinfo`, `function uvesafb_vbe_getmodes`.
- Atlas domain: Driver Families / drivers/video.
- 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.