summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2024-05-02 16:19:42 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2024-06-13 20:12:17 +0300
commit8b09d50f7f91e94afa141a8368317d1b74a34b26 (patch)
treecd03ab622ea06e76c51d7937f66d69dc450f8206 /tools
parent34efd52a7daf27d257545bfda87605f2c51a9baf (diff)
tools/intel_vbt_decode: Decode block 20 (OEM Customizable Modes)
Decode VBT block 20 (OEM Customizable Modes). Just some list of modes, which we probably don't care about. Example output from ADL: BDB block 20 (170 bytes, min 2 bytes) - OEM customizable modes: 0000: 14 aa 00 06 1c 04 00 56 05 00 03 00 3c 00 00 00 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 0020: 01 04 00 56 05 56 03 00 3c 00 00 00 00 00 00 00 0030: 00 00 00 00 00 00 00 00 00 00 00 ff 01 00 00 00 0040: 00 00 00 00 3c 00 00 00 00 00 00 00 00 00 00 00 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0060: 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0070: 00 00 00 00 00 00 00 00 00 00 00 00 3c 00 00 00 0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0090: 00 00 00 00 00 00 00 00 3c 00 00 00 00 00 00 00 00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 Num entries: 6 Entry size: 28 Entry #1: Enable in GOP: yes Enable in OS: no Enable in VBIOS: no Resolution: 1366x768 Display flags: none (0x00) Color depth: 0x00 Refresh rate: 60 DTD: hdisplay: 0 hsync [0, 0] -sync htotal: 0 vdisplay: 0 vsync [0, 0] -sync vtotal: 0 clock: 0 Display flags 2: EFP1,EFP2,EFP3,EFP4,EFP5,EFP6,EFP7,LFP1,LFP2 (0x01ff) ... Entry #6: Enable in GOP: no Enable in OS: no Enable in VBIOS: no Resolution: 0x0 Display flags: none (0x00) Color depth: 0x00 Refresh rate: 60 DTD: hdisplay: 0 hsync [0, 0] -sync htotal: 0 vdisplay: 0 vsync [0, 0] -sync vtotal: 0 clock: 0 Display flags 2: none (0x0000) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/intel_vbt_decode.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index 3021c49a3..76806fc69 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -346,6 +346,8 @@ static size_t block_min_size(const struct context *context, int section_id)
return sizeof(struct bdb_driver_rotation);
case BDB_DISPLAY_REMOVE_OLD:
return sizeof(struct bdb_display_remove_old);
+ case BDB_OEM_CUSTOM:
+ return sizeof(struct bdb_oem_custom);
case BDB_SDVO_LVDS_OPTIONS:
return sizeof(struct bdb_sdvo_lvds_options);
case BDB_SDVO_LVDS_DTD:
@@ -2227,6 +2229,39 @@ static void dump_driver_rotation(struct context *context,
printf("\tRotation flags 4: 0x%08x\n", rot->rotation_flags_4);
}
+static void dump_oem_custom(struct context *context,
+ const struct bdb_block *block)
+{
+ const struct bdb_oem_custom *oem = block_data(block);
+
+ printf("\tNum entries: %d\n", oem->num_entries);
+ printf("\tEntry size: %d\n", oem->entry_size);
+
+ for (int i = 0; i < oem->num_entries; i++) {
+ const struct oem_mode *m = (const void *)&oem->modes[0] +
+ i * oem->entry_size;
+
+ printf("\tEntry #%d:\n", i+1);
+ printf("\t\tEnable in GOP: %s\n", YESNO(m->enable_in_gop));
+ printf("\t\tEnable in OS: %s\n", YESNO(m->enable_in_os));
+ printf("\t\tEnable in VBIOS: %s\n", YESNO(m->enable_in_vbios));
+ printf("\t\tResolution: %dx%d\n", m->x_res, m->y_res);
+ printf("\t\tDisplay flags: %s (0x%02x)\n",
+ child_device_handle(context, m->display_flags),
+ m->display_flags);
+ printf("\t\tColor depth: 0x%02x\n", m->color_depth);
+ printf("\t\tRefresh rate: %d\n", m->refresh_rate);
+
+ printf("\t\tDTD:\n");
+ print_detail_timing_data(&m->dtd);
+
+ if (oem->entry_size >= 28)
+ printf("\t\tDisplay flags 2: %s (0x%04x)\n",
+ child_device_handle(context, m->display_flags_2),
+ m->display_flags_2);
+ }
+}
+
static void dump_edp(struct context *context,
const struct bdb_block *block)
{
@@ -3346,6 +3381,11 @@ struct dumper dumpers[] = {
.dump = dump_display_remove_old,
},
{
+ .id = BDB_OEM_CUSTOM,
+ .name = "OEM customizable modes",
+ .dump = dump_oem_custom,
+ },
+ {
.id = BDB_SDVO_LVDS_OPTIONS,
.name = "SDVO LVDS options block",
.dump = dump_sdvo_lvds_options,