drivers/video/fbdev/core/fb_internal.h
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/core/fb_internal.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/core/fb_internal.h- Extension
.h- Size
- 1922 bytes
- Lines
- 86
- Domain
- Driver Families
- Bucket
- drivers/video
- Inferred role
- Driver Families: implementation source
- Status
- source 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 or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/fb.hlinux/mutex.h
Detected Declarations
function fb_register_chrdevfunction fb_unregister_chrdevfunction fb_prepare_logofunction fb_show_logofunction fb_init_procfsfunction fb_cleanup_procfsfunction fb_device_createfunction fb_device_destroy
Annotated Snippet
#ifndef _FB_INTERNAL_H
#define _FB_INTERNAL_H
#include <linux/device.h>
#include <linux/fb.h>
#include <linux/mutex.h>
/* fb_devfs.c */
#if defined(CONFIG_FB_DEVICE)
int fb_register_chrdev(void);
void fb_unregister_chrdev(void);
#else
static inline int fb_register_chrdev(void)
{
return 0;
}
static inline void fb_unregister_chrdev(void)
{ }
#endif
/* fb_logo.c */
#if defined(CONFIG_LOGO)
extern bool fb_center_logo;
extern int fb_logo_count;
int fb_prepare_logo(struct fb_info *fb_info, int rotate);
int fb_show_logo(struct fb_info *fb_info, int rotate);
#else
static inline int fb_prepare_logo(struct fb_info *info, int rotate)
{
return 0;
}
static inline int fb_show_logo(struct fb_info *info, int rotate)
{
return 0;
}
#endif /* CONFIG_LOGO */
/* fbmem.c */
extern struct class *fb_class;
extern struct mutex registration_lock;
extern struct fb_info *registered_fb[FB_MAX];
extern int num_registered_fb;
struct fb_info *get_fb_info(unsigned int idx);
void put_fb_info(struct fb_info *fb_info);
int fb_blank_from_user(struct fb_info *info, int blank);
/* fb_procfs.c */
#if defined(CONFIG_FB_DEVICE)
int fb_init_procfs(void);
void fb_cleanup_procfs(void);
#else
static inline int fb_init_procfs(void)
{
return 0;
}
static inline void fb_cleanup_procfs(void)
{ }
#endif
/* fbsysfs.c */
#if defined(CONFIG_FB_DEVICE)
int fb_device_create(struct fb_info *fb_info);
void fb_device_destroy(struct fb_info *fb_info);
#else
static inline int fb_device_create(struct fb_info *fb_info)
{
/*
* Acquire a reference on the parent device to avoid
* unplug operations behind our back. With the fbdev
* device enabled, this is performed within register_device().
*/
get_device(fb_info->device);
return 0;
}
static inline void fb_device_destroy(struct fb_info *fb_info)
{
/* Undo the get_device() from fb_device_create() */
put_device(fb_info->device);
}
#endif
#endif
Annotation
- Immediate include surface: `linux/device.h`, `linux/fb.h`, `linux/mutex.h`.
- Detected declarations: `function fb_register_chrdev`, `function fb_unregister_chrdev`, `function fb_prepare_logo`, `function fb_show_logo`, `function fb_init_procfs`, `function fb_cleanup_procfs`, `function fb_device_create`, `function fb_device_destroy`.
- Atlas domain: Driver Families / drivers/video.
- 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.