]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/i915/bios: Define VBT blocks 16,29,31 (Toggle List) contents
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 3 May 2024 12:24:33 +0000 (15:24 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 8 May 2024 13:41:39 +0000 (16:41 +0300)
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.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503122449.27266-20-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_vbt_defs.h

index 09d16704936b4798b2d99ed1cd60b32131b1735d..63cfb1684c71fc354a3db8ee91c8b62fe7543a33 100644 (file)
@@ -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
  */