Video BIOS Table (VBT)

The Video BIOS Table, or VBT, provides platform and board specific configuration information to the driver that is not discoverable or available through other means. The configuration is mostly related to display hardware. The VBT is available via the ACPI OpRegion or, on older systems, in the PCI ROM.

The VBT consists of a VBT Header (defined as struct vbt_header), a BDB Header (struct bdb_header), and a number of BIOS Data Blocks (BDB) that contain the actual configuration information. The VBT Header, and thus the VBT, begins with “$VBT” signature. The VBT Header contains the offset of the BDB Header. The data blocks are concatenated after the BDB Header. The data blocks have a 1-byte Block ID, 2-byte Block Size, and Block Size bytes of data. (Block 53, the MIPI Sequence Block is an exception.)

The driver parses the VBT during load. The relevant information is stored in driver private data for ease of use, and the actual VBT is not read after that.

bool intel_bios_is_valid_vbt(struct intel_display *display, const void *buf, size_t size)

does the given buffer contain a valid VBT

Parameters

struct intel_display *display

display device

const void *buf

pointer to a buffer to validate

size_t size

size of the buffer

Description

Returns true on valid VBT.

void intel_bios_init(struct intel_display *display)

find VBT and initialize settings from the BIOS

Parameters

struct intel_display *display

display device instance

Description

Parse and initialize settings from the Video BIOS Tables (VBT). If the VBT was not found in ACPI OpRegion, try to find it in PCI ROM first. Also initialize some defaults if the VBT is not present at all.

void intel_bios_driver_remove(struct intel_display *display)

Free any resources allocated by intel_bios_init()

Parameters

struct intel_display *display

display device instance

bool intel_bios_is_tv_present(struct intel_display *display)

is integrated TV present in VBT

Parameters

struct intel_display *display

display device instance

Description

Return true if TV is present. If no child devices were parsed from VBT, assume TV is present.

bool intel_bios_is_lvds_present(struct intel_display *display, u8 *i2c_pin)

is LVDS present in VBT

Parameters

struct intel_display *display

display device instance

u8 *i2c_pin

i2c pin for LVDS if present

Description

Return true if LVDS is present. If no child devices were parsed from VBT, assume LVDS is present.

bool intel_bios_is_port_present(struct intel_display *display, enum port port)

is the specified digital port present

Parameters

struct intel_display *display

display device instance

enum port port

port to check

Description

Return true if the device in port is present.

bool intel_bios_is_dsi_present(struct intel_display *display, enum port *port)

is DSI present in VBT

Parameters

struct intel_display *display

display device instance

enum port *port

port for DSI if present

Description

Return true if DSI is present, and return the port in port.

struct vbt_header

VBT Header structure

Definition:

struct vbt_header {
    u8 signature[20];
    u16 version;
    u16 header_size;
    u16 vbt_size;
    u8 vbt_checksum;
    u8 reserved0;
    u32 bdb_offset;
    u32 aim_offset[4];
};

Members

signature

VBT signature, always starts with “$VBT”

version

Version of this structure

header_size

Size of this structure

vbt_size

Size of VBT (VBT Header, BDB Header and data blocks)

vbt_checksum

Checksum

reserved0

Reserved

bdb_offset

Offset of struct bdb_header from beginning of VBT

aim_offset

Offsets of add-in data blocks from beginning of VBT

struct bdb_header

BDB Header structure

Definition:

struct bdb_header {
    u8 signature[16];
    u16 version;
    u16 header_size;
    u16 bdb_size;
};

Members

signature

BDB signature “BIOS_DATA_BLOCK”

version

Version of the data block definitions

header_size

Size of this structure

bdb_size

Size of BDB (BDB Header and data blocks)