Commit e547b97e authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915/bios: Define VBT blocks 16,29,31 (Toggle List) contents



Define the contenst is VBT blocks 16,19,31 (Toggle List).
There are three variants of this block: pre-IVB, IVB, HSW+,
with each having slightly different entries.

Curiously many HSW/BDW machines seem to have both the IVB and
HSW+ variants in their VBTs simultanously. No idea why.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-20-ville.syrjala@linux.intel.com


Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 95f4cbc8
Loading
Loading
Loading
Loading
+62 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ enum bdb_block_id {
	BDB_DRIVER_PERSISTENCE		= 13,
	BDB_EXT_TABLE_PTRS		= 14, /* VBIOS only */
	BDB_DOT_CLOCK_OVERRIDE		= 15,
	BDB_DISPLAY_SELECT		= 16,
	BDB_DISPLAY_SELECT_OLD		= 16,
	BDB_SV_TEST_FUNCTIONS		= 17,
	BDB_DRIVER_ROTATION		= 18,
	BDB_DISPLAY_REMOVE		= 19,
@@ -167,6 +167,8 @@ enum bdb_block_id {
	BDB_SDVO_LVDS_PPS		= 25,
	BDB_TV_OPTIONS			= 26,
	BDB_EDP				= 27,
	BDB_DISPLAY_SELECT_IVB		= 29, /* 164+ */
	BDB_DISPLAY_SELECT_HSW		= 31, /* 166+ */
	BDB_LFP_OPTIONS			= 40,
	BDB_LFP_DATA_PTRS		= 41,
	BDB_LFP_DATA			= 42,
@@ -837,6 +839,27 @@ struct bdb_dot_clock_override {
	struct dot_clock_override_entry_gen3 table[]; /* or _gen2 */
} __packed;

/*
 * Block 16 - Toggle List Block (pre-HSW)
 */

struct toggle_list_entry_old {
	u8 display_select_pipe_a;
	u8 display_select_pipe_b;
	u8 caps;
} __packed;

struct toggle_list_table_old {
	u16 num_entries;
	u8 entry_size;
	struct toggle_list_entry_old list[];
} __packed;

struct bdb_display_select_old {
	/* each table has variable size! */
	struct toggle_list_table_old tables[4];
} __packed;

/*
 * Block 17 - SV Test Functions
 */
@@ -957,6 +980,44 @@ struct bdb_edp {
	u16 edp_dsc_disable;					/* 251+ */
} __packed;

/*
 * Block 29 - Toggle List Block (IVB)
 */

struct toggle_list_entry_ivb {
	u8 display_select;
} __packed;

struct toggle_list_table_ivb {
	u16 num_entries;
	u8 entry_size;
	struct toggle_list_entry_ivb list[];
} __packed;

struct bdb_display_select_ivb {
	/* each table has variable size! */
	struct toggle_list_table_ivb tables[4];
} __packed;

/*
 * Block 31 - Toggle List Block (HSW+)
 */

struct toggle_list_entry_hsw {
	u16 display_select;
} __packed;

struct toggle_list_table_hsw {
	u16 num_entries;
	u8 entry_size;
	struct toggle_list_entry_hsw list[];
} __packed;

struct bdb_display_select_hsw {
	/* each table has variable size! */
	struct toggle_list_table_hsw tables[4];
} __packed;

/*
 * Block 40 - LFP Data Block
 */