From: Ville Syrjälä <ville.syrj...@linux.intel.com>

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: Ville Syrjälä <ville.syrj...@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_vbt_defs.h | 63 ++++++++++++++++++-
 1 file changed, 62 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h 
b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 2792da3c916e..cfa17a848105 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -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
  */
-- 
2.43.2

Reply via email to