drivers/video/fbdev/core/fbmon.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/core/fbmon.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/core/fbmon.c- Extension
.c- Size
- 38638 bytes
- Lines
- 1526
- Domain
- Driver Families
- Bucket
- drivers/video
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/export.hlinux/fb.hlinux/module.hlinux/pci.hlinux/slab.hlinux/string_choices.hlinux/sysfb.hvideo/of_videomode.hvideo/videomode.h../edid.h
Detected Declarations
struct broken_edidstruct __fb_timingsfunction copy_stringfunction edid_is_serial_blockfunction edid_is_ascii_blockfunction edid_is_limits_blockfunction edid_is_monitor_blockfunction edid_is_timing_blockfunction check_edidfunction fix_edidfunction edid_checksumfunction edid_check_headerfunction parse_vendor_blockfunction get_dpms_capabilitiesfunction get_chromafunction calc_mode_timingsfunction get_est_timingfunction get_std_timingfunction get_dst_timingfunction get_detailed_timingfunction fb_destroy_modedbfunction fb_get_monitor_limitsfunction get_monspecsfunction fb_parse_edidfunction fb_edid_to_monspecsfunction fb_get_vblankfunction fb_get_hblank_by_hfreqfunction fb_get_hblank_by_dclkfunction fb_get_hfreqfunction fb_timings_vfreqfunction fb_timings_hfreqfunction fb_timings_dclkfunction fb_get_modefunction fb_videomode_from_videomodefunction dump_fb_videomodefunction of_get_fb_videomodefunction fb_parse_edidfunction fb_edid_to_monspecsfunction fb_validate_modeexport fb_videomode_from_videomodeexport of_get_fb_videomodeexport fb_firmware_edidexport fb_parse_edidexport fb_edid_to_monspecsexport fb_get_modeexport fb_validate_modeexport fb_destroy_modedb
Annotated Snippet
struct broken_edid {
u8 manufacturer[4];
u32 model;
u32 fix;
};
static const struct broken_edid brokendb[] = {
/* DEC FR-PCXAV-YZ */
{
.manufacturer = "DEC",
.model = 0x073a,
.fix = FBMON_FIX_HEADER,
},
/* ViewSonic PF775a */
{
.manufacturer = "VSC",
.model = 0x5a44,
.fix = FBMON_FIX_INPUT,
},
/* Sharp UXGA? */
{
.manufacturer = "SHP",
.model = 0x138e,
.fix = FBMON_FIX_TIMINGS,
},
};
static const unsigned char edid_v1_header[] = { 0x00, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x00
};
static void copy_string(unsigned char *c, unsigned char *s)
{
int i;
c = c + 5;
for (i = 0; (i < 13 && *c != 0x0A); i++)
*(s++) = *(c++);
*s = 0;
while (i-- && (*--s == 0x20)) *s = 0;
}
static int edid_is_serial_block(unsigned char *block)
{
if ((block[0] == 0x00) && (block[1] == 0x00) &&
(block[2] == 0x00) && (block[3] == 0xff) &&
(block[4] == 0x00))
return 1;
else
return 0;
}
static int edid_is_ascii_block(unsigned char *block)
{
if ((block[0] == 0x00) && (block[1] == 0x00) &&
(block[2] == 0x00) && (block[3] == 0xfe) &&
(block[4] == 0x00))
return 1;
else
return 0;
}
static int edid_is_limits_block(unsigned char *block)
{
if ((block[0] == 0x00) && (block[1] == 0x00) &&
(block[2] == 0x00) && (block[3] == 0xfd) &&
(block[4] == 0x00))
return 1;
else
return 0;
}
static int edid_is_monitor_block(unsigned char *block)
{
if ((block[0] == 0x00) && (block[1] == 0x00) &&
(block[2] == 0x00) && (block[3] == 0xfc) &&
(block[4] == 0x00))
return 1;
else
return 0;
}
static int edid_is_timing_block(unsigned char *block)
{
if ((block[0] != 0x00) || (block[1] != 0x00) ||
(block[2] != 0x00) || (block[4] != 0x00))
return 1;
else
return 0;
}
Annotation
- Immediate include surface: `linux/export.h`, `linux/fb.h`, `linux/module.h`, `linux/pci.h`, `linux/slab.h`, `linux/string_choices.h`, `linux/sysfb.h`, `video/of_videomode.h`.
- Detected declarations: `struct broken_edid`, `struct __fb_timings`, `function copy_string`, `function edid_is_serial_block`, `function edid_is_ascii_block`, `function edid_is_limits_block`, `function edid_is_monitor_block`, `function edid_is_timing_block`, `function check_edid`, `function fix_edid`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: integration 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.