drivers/gpu/drm/i915/display/intel_bios.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_bios.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_bios.c- Extension
.c- Size
- 107522 bytes
- Lines
- 3862
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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.
- 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/debugfs.hlinux/firmware.hdrm/display/drm_dp_helper.hdrm/display/drm_dsc_helper.hdrm/drm_edid.hdrm/drm_fixed.hdrm/drm_print.hintel_display.hintel_display_core.hintel_display_rpm.hintel_display_types.hintel_display_utils.hintel_gmbus.hintel_rom.hintel_vdsc.hintel_vbt_defs.h
Detected Declarations
struct intel_bios_encoder_datastruct bdb_block_entryenum panel_typefunction _get_blocksizefunction get_blocksizefunction find_raw_sectionfunction datafunction bdb_find_sectionfunction list_for_each_entryfunction lfp_data_min_sizefunction validate_lfp_data_ptrsfunction fixup_lfp_data_ptrsfunction make_lfp_data_ptrfunction next_lfp_data_ptrfunction init_bdb_blockfunction init_bdb_blocksfunction fill_detail_timing_datafunction get_lfp_dvo_timingfunction get_lfp_fp_timingfunction get_lfp_pnp_idfunction get_lfp_data_tailfunction opregion_get_panel_typefunction vbt_get_panel_typefunction pnpid_get_panel_typefunction fallback_get_panel_typefunction get_panel_typefunction panel_bitsfunction panel_boolfunction parse_panel_optionsfunction parse_lfp_panel_dtdfunction parse_lfp_datafunction parse_generic_dtdfunction parse_lfp_backlightfunction parse_sdvo_lvds_datafunction intel_bios_ssc_frequencyfunction parse_general_featuresfunction child_device_ptrfunction parse_sdvo_device_mappingfunction list_for_each_entryfunction parse_driver_featuresfunction parse_panel_driver_featuresfunction parse_power_conservation_featuresfunction vbt_edp_to_pps_delaysfunction parse_edpfunction parse_psrfunction parse_dsi_backlight_portsfunction parse_mipi_configfunction find_panel_sequence_block
Annotated Snippet
struct intel_bios_encoder_data {
struct intel_display *display;
struct child_device_config child;
struct dsc_compression_parameters_entry *dsc;
struct list_head node;
};
#define TARGET_ADDR1 0x70
#define TARGET_ADDR2 0x72
/* Get BDB block size given a pointer to Block ID. */
static u32 _get_blocksize(const u8 *block_base)
{
/* The MIPI Sequence Block v3+ has a separate size field. */
if (*block_base == BDB_MIPI_SEQUENCE && *(block_base + 3) >= 3)
return *((const u32 *)(block_base + 4));
else
return *((const u16 *)(block_base + 1));
}
/* Get BDB block size give a pointer to data after Block ID and Block Size. */
static u32 get_blocksize(const void *block_data)
{
return _get_blocksize(block_data - 3);
}
static const void *
find_raw_section(const void *_bdb, enum bdb_block_id section_id)
{
const struct bdb_header *bdb = _bdb;
const u8 *base = _bdb;
int index = 0;
u32 total, current_size;
enum bdb_block_id current_id;
/* skip to first section */
index += bdb->header_size;
total = bdb->bdb_size;
/* walk the sections looking for section_id */
while (index + 3 < total) {
current_id = *(base + index);
current_size = _get_blocksize(base + index);
index += 3;
if (index + current_size > total)
return NULL;
if (current_id == section_id)
return base + index;
index += current_size;
}
return NULL;
}
/*
* Offset from the start of BDB to the start of the
* block data (just past the block header).
*/
static u32 raw_block_offset(const void *bdb, enum bdb_block_id section_id)
{
const void *block;
block = find_raw_section(bdb, section_id);
if (!block)
return 0;
return block - bdb;
}
struct bdb_block_entry {
struct list_head node;
enum bdb_block_id section_id;
u8 data[];
};
static const void *
bdb_find_section(struct intel_display *display,
enum bdb_block_id section_id)
{
struct bdb_block_entry *entry;
list_for_each_entry(entry, &display->vbt.bdb_blocks, node) {
if (entry->section_id == section_id)
return entry->data + 3;
}
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/firmware.h`, `drm/display/drm_dp_helper.h`, `drm/display/drm_dsc_helper.h`, `drm/drm_edid.h`, `drm/drm_fixed.h`, `drm/drm_print.h`, `intel_display.h`.
- Detected declarations: `struct intel_bios_encoder_data`, `struct bdb_block_entry`, `enum panel_type`, `function _get_blocksize`, `function get_blocksize`, `function find_raw_section`, `function data`, `function bdb_find_section`, `function list_for_each_entry`, `function lfp_data_min_size`.
- Atlas domain: Driver Families / drivers/gpu.
- 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.