drivers/gpu/drm/drm_edid.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/drm_edid.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/drm_edid.c- Extension
.c- Size
- 238032 bytes
- Lines
- 7666
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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.
- 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/bitfield.hlinux/byteorder/generic.hlinux/cec.hlinux/export.hlinux/hdmi.hlinux/i2c.hlinux/kernel.hlinux/module.hlinux/pci.hlinux/seq_buf.hlinux/slab.hlinux/vga_switcheroo.hdrm/drm_drv.hdrm/drm_edid.hdrm/drm_eld.hdrm/drm_encoder.hdrm/drm_print.hdrm_crtc_internal.hdrm_displayid_internal.hdrm_internal.h
Detected Declarations
struct amd_vsdb_v3_payloadstruct detailed_mode_closurestruct drm_edid_match_closurestruct minimodestruct drm_edidstruct drm_edid_iterstruct stereo_mandatory_modestruct cea_db_iterstruct cea_dbenum drm_edid_internal_quirkenum edid_block_statusfunction Copyrightfunction edid_hfeeodb_block_countfunction edid_extension_block_countfunction edid_block_countfunction edid_size_by_blocksfunction edid_sizefunction __drm_edid_block_countfunction drm_edid_block_countfunction drm_edid_extension_block_countfunction drm_edid_iter_for_eachfunction drm_edid_iter_beginfunction drm_edid_iter_endfunction edid_header_fixfunction drm_edid_header_is_validfunction edid_block_compute_checksumfunction edid_block_get_checksumfunction edid_block_tagfunction edid_block_is_zerofunction drm_edid_eqfunction edid_block_checkfunction edid_block_status_validfunction edid_block_validfunction edid_block_status_printfunction edid_block_dumpfunction drm_edid_block_validfunction drm_edid_is_validfunction drm_edid_validfunction drm_do_probe_ddc_edidfunction connector_bad_edidfunction drm_edid_override_showfunction drm_edid_override_setfunction drm_edid_override_resetfunction drm_helper_probe_single_connector_modesfunction edid_block_readfunction drm_edid_freefunction drm_edid_freefunction drm_edid_free
Annotated Snippet
struct amd_vsdb_v3_payload {
u8 oui[3];
u8 version;
u8 feature_caps;
u8 rsvd0[3];
u8 cs_eotf_support;
u8 lum1_max;
u8 lum1_min;
u8 lum2_max;
u8 lum2_min;
u8 rsvd1[2];
/*
* Bytes beyond AMD_VSDB_V3_PAYLOAD_MIN_LEN are optional; a
* monitor may provide a payload as short as 15 bytes. Always
* check cea_db_payload_len() before accessing extra[].
*/
u8 extra[AMD_VSDB_V3_PAYLOAD_MAX_LEN - AMD_VSDB_V3_PAYLOAD_MIN_LEN];
} __packed;
struct detailed_mode_closure {
struct drm_connector *connector;
const struct drm_edid *drm_edid;
bool preferred;
int modes;
};
struct drm_edid_match_closure {
const struct drm_edid_ident *ident;
bool matched;
};
#define LEVEL_DMT 0
#define LEVEL_GTF 1
#define LEVEL_GTF2 2
#define LEVEL_CVT 3
#define EDID_QUIRK(vend_chr_0, vend_chr_1, vend_chr_2, product_id, _quirks) \
{ \
.ident = { \
.panel_id = drm_edid_encode_panel_id(vend_chr_0, vend_chr_1, \
vend_chr_2, product_id), \
}, \
.quirks = _quirks \
}
static const struct edid_quirk {
const struct drm_edid_ident ident;
u32 quirks;
} edid_quirk_list[] = {
/* Acer AL1706 */
EDID_QUIRK('A', 'C', 'R', 44358, BIT(EDID_QUIRK_PREFER_LARGE_60)),
/* Acer F51 */
EDID_QUIRK('A', 'P', 'I', 0x7602, BIT(EDID_QUIRK_PREFER_LARGE_60)),
/* AEO model 0 reports 8 bpc, but is a 6 bpc panel */
EDID_QUIRK('A', 'E', 'O', 0, BIT(EDID_QUIRK_FORCE_6BPC)),
/* BenQ GW2765 */
EDID_QUIRK('B', 'N', 'Q', 0x78d6, BIT(EDID_QUIRK_FORCE_8BPC)),
/* BOE model on HP Pavilion 15-n233sl reports 8 bpc, but is a 6 bpc panel */
EDID_QUIRK('B', 'O', 'E', 0x78b, BIT(EDID_QUIRK_FORCE_6BPC)),
/* CPT panel of Asus UX303LA reports 8 bpc, but is a 6 bpc panel */
EDID_QUIRK('C', 'P', 'T', 0x17df, BIT(EDID_QUIRK_FORCE_6BPC)),
/* SDC panel of Lenovo B50-80 reports 8 bpc, but is a 6 bpc panel */
EDID_QUIRK('S', 'D', 'C', 0x3652, BIT(EDID_QUIRK_FORCE_6BPC)),
/* BOE model 0x0771 reports 8 bpc, but is a 6 bpc panel */
EDID_QUIRK('B', 'O', 'E', 0x0771, BIT(EDID_QUIRK_FORCE_6BPC)),
/* Belinea 10 15 55 */
EDID_QUIRK('M', 'A', 'X', 1516, BIT(EDID_QUIRK_PREFER_LARGE_60)),
EDID_QUIRK('M', 'A', 'X', 0x77e, BIT(EDID_QUIRK_PREFER_LARGE_60)),
/* Envision Peripherals, Inc. EN-7100e */
EDID_QUIRK('E', 'P', 'I', 59264, BIT(EDID_QUIRK_135_CLOCK_TOO_HIGH)),
/* Envision EN2028 */
EDID_QUIRK('E', 'P', 'I', 8232, BIT(EDID_QUIRK_PREFER_LARGE_60)),
/* Funai Electronics PM36B */
EDID_QUIRK('F', 'C', 'M', 13600, BIT(EDID_QUIRK_PREFER_LARGE_75) |
BIT(EDID_QUIRK_DETAILED_IN_CM)),
/* LG 27GP950 */
EDID_QUIRK('G', 'S', 'M', 0x5bbf, BIT(EDID_QUIRK_CAP_DSC_15BPP)),
/* LG 27GN950 */
EDID_QUIRK('G', 'S', 'M', 0x5b9a, BIT(EDID_QUIRK_CAP_DSC_15BPP)),
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/byteorder/generic.h`, `linux/cec.h`, `linux/export.h`, `linux/hdmi.h`, `linux/i2c.h`, `linux/kernel.h`, `linux/module.h`.
- Detected declarations: `struct amd_vsdb_v3_payload`, `struct detailed_mode_closure`, `struct drm_edid_match_closure`, `struct minimode`, `struct drm_edid`, `struct drm_edid_iter`, `struct stereo_mandatory_mode`, `struct cea_db_iter`, `struct cea_db`, `enum drm_edid_internal_quirk`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: integration 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.