[PATCH i-g-t 09/27] tools/intel_vbt_decode: Decode block 12 (Driver Persistent Algorithm)
Ville Syrjala
ville.syrjala at linux.intel.com
Fri Jun 7 13:57:40 UTC 2024
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Decode VBT block 12 (Driver Persistent Algorithm). Doubtful there's
anything actually interesting here, but might as well decode it while
at it.
Example output from MGM:
BDB block 13 (3 bytes, min 3 bytes) - Driver persistent algorithm:
0000: 0d 03 00 78 00 0a
Docking persistent algorithm: OS default
DVO hotplug persistent on mode: no
EDID persistent on mode: no
Hotkey persistent on mode: yes
Hotkey persistent on restore pipe: yes
Hotkey persistent on refresh rate: yes
Hotkey persistent on MDS/Twin: yes
Power management persistent algorithm: OS default
Lid switch persistent algorithm: OS default
Hotkey persisentt algorithm: OS default
Persistent max config: 10
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
tools/intel_vbt_decode.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index c5752d3161a3..fd0753eb11d7 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -335,6 +335,8 @@ static size_t block_min_size(const struct context *context, int section_id)
return sizeof(struct bdb_legacy_child_devices);
case BDB_DRIVER_FEATURES:
return sizeof(struct bdb_driver_features);
+ case BDB_DRIVER_PERSISTENCE:
+ return sizeof(struct bdb_driver_persistence);
case BDB_SDVO_LVDS_OPTIONS:
return sizeof(struct bdb_sdvo_lvds_options);
case BDB_SDVO_LVDS_DTD:
@@ -1870,6 +1872,34 @@ static void dump_driver_feature(struct context *context,
YESNO(feature->rmpm_enabled));
}
+static void dump_driver_persistence(struct context *context,
+ const struct bdb_block *block)
+{
+ const struct bdb_driver_persistence *persistence = block_data(block);
+
+ printf("\tDocking persistent algorithm: %s\n",
+ default_algorithm(persistence->docking_persistent_algorithm));
+ printf("\tDVO hotplug persistent on mode: %s\n",
+ YESNO(persistence->dvo_hotplug_persistent_on_mode));
+ printf("\tEDID persistent on mode: %s\n",
+ YESNO(persistence->edid_persistent_on_mode));
+ printf("\tHotkey persistent on mode: %s\n",
+ YESNO(persistence->hotkey_persistent_on_mode));
+ printf("\tHotkey persistent on restore pipe: %s\n",
+ YESNO(persistence->hotkey_persistent_on_restore_pipe));
+ printf("\tHotkey persistent on refresh rate: %s\n",
+ YESNO(persistence->hotkey_persistent_on_refresh_rate));
+ printf("\tHotkey persistent on MDS/Twin: %s\n",
+ YESNO(persistence->hotkey_persistent_on_mds_twin));
+ printf("\tPower management persistent algorithm: %s\n",
+ default_algorithm(persistence->power_management_persistent_algorithm));
+ printf("\tLid switch persistent algorithm: %s\n",
+ default_algorithm(persistence->lid_switch_persistent_algorithm));
+ printf("\tHotkey persisentt algorithm: %s\n",
+ default_algorithm(persistence->hotkey_persistent_algorithm));
+ printf("\tPersistent max config: %d\n", persistence->persistent_max_config);
+}
+
static void dump_edp(struct context *context,
const struct bdb_block *block)
{
@@ -2957,6 +2987,11 @@ struct dumper dumpers[] = {
.name = "Driver feature data block",
.dump = dump_driver_feature,
},
+ {
+ .id = BDB_DRIVER_PERSISTENCE,
+ .name = "Driver persistent algorithm",
+ .dump = dump_driver_persistence,
+ },
{
.id = BDB_SDVO_LVDS_OPTIONS,
.name = "SDVO LVDS options block",
--
2.44.2
More information about the igt-dev
mailing list