summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2022-03-11 01:30:33 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2022-06-22 15:38:01 +0300
commit067ec9e4a56a72c0f0ba10922012c7467698e404 (patch)
tree8f1f78fdb0a1414b3aaf86a579fb1ff755c0916f
parent043a69f79cd5931dd8f9848bd685942f435e8440 (diff)
tools/intel_vbt_decode: Decode the LFP power block
Decode the contents of the LFP power conservation block (44). Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
-rw-r--r--tools/intel_vbt_decode.c85
1 files changed, 85 insertions, 0 deletions
diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index fdee0a41..37f62756 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -1067,6 +1067,86 @@ static void dump_psr(struct context *context,
}
}
+static void dump_lfp_power(struct context *context,
+ const struct bdb_block *block)
+{
+ const struct bdb_lfp_power *lfp_block = block->data;
+ int i;
+
+ printf("\tALS enable: %s\n",
+ YESNO(lfp_block->features.als_enable));
+ printf("\tDisplay LACE support: %s\n",
+ YESNO(lfp_block->features.lace_support));
+ printf("\tDefault Display LACE enabled status: %s\n",
+ YESNO(lfp_block->features.lace_enabled_status));
+ printf("\tPower conservation preference level: %d\n",
+ lfp_block->features.power_conservation_pref);
+
+ for (i = 0; i < 5; i++) {
+ printf("\tALS backlight adjust: %d\n",
+ lfp_block->als[i].backlight_adjust);
+ printf("\tALS Lux: %d\n",
+ lfp_block->als[i].lux);
+ }
+
+ printf("\tDisplay LACE aggressiveness profile: %d\n",
+ lfp_block->lace_aggressiveness_profile);
+
+ if (context->bdb->version < 228)
+ return;
+
+ for (i = 0; i < 16; i++) {
+ if (i != context->panel_type && !context->dump_all_panel_types)
+ continue;
+
+ printf("\tPanel %d%s\n", i, context->panel_type == i ? " *" : "");
+
+ printf("\t\tDPST: %s\n",
+ YESNO((lfp_block->dpst >> i) & 1));
+ printf("\t\tPSR: %s\n",
+ YESNO((lfp_block->psr >> i) & 1));
+ printf("\t\tDRRS: %s\n",
+ YESNO((lfp_block->drrs >> i) & 1));
+ printf("\t\tDisplay LACE support: %s\n",
+ YESNO((lfp_block->lace_support >> i) & 1));
+ printf("\t\tADT: %s\n",
+ YESNO((lfp_block->adt >> i) & 1));
+ printf("\t\tDMRRS: %s\n",
+ YESNO((lfp_block->dmrrs >> i) & 1));
+ printf("\t\tADB: %s\n", YESNO((lfp_block->adb >> i) & 1));
+ printf("\t\tDefault Display LACE enabled: %s\n",
+ YESNO((lfp_block->lace_enabled_status >> i) & 1));
+ printf("\t\tLACE Aggressiveness: %d\n",
+ lfp_block->aggressiveness[i].lace_aggressiveness);
+ printf("\t\tDPST Aggressiveness: %d\n",
+ lfp_block->aggressiveness[i].dpst_aggressiveness);
+
+ if (context->bdb->version < 232)
+ continue;
+
+ printf("\t\tEDP 4k/2k HOBL feature: %s\n",
+ YESNO((lfp_block->hobl >> i) & 1));
+
+ if (context->bdb->version < 233)
+ continue;
+
+ printf("\t\tVRR feature: %s\n",
+ YESNO((lfp_block->vrr_feature_enabled >> i) & 1));
+
+ if (context->bdb->version < 247)
+ continue;
+
+ printf("\t\tELP: %s\n",
+ YESNO((lfp_block->elp >> i) & 1));
+ printf("\t\tOPST: %s\n",
+ YESNO((lfp_block->opst >> i) & 1));
+ printf("\t\tELP Aggressiveness: %d\n",
+ lfp_block->aggressiveness2[i].elp_aggressiveness);
+ printf("\t\tOPST Aggrgessiveness: %d\n",
+ lfp_block->aggressiveness2[i].opst_aggressiveness);
+ }
+}
+
static void
print_detail_timing_data(const struct lvds_dvo_timing *dvo_timing)
{
@@ -1762,6 +1842,11 @@ struct dumper dumpers[] = {
.dump = dump_backlight_info,
},
{
+ .id = BDB_LFP_POWER,
+ .name = "LFP power conservation features block",
+ .dump = dump_lfp_power,
+ },
+ {
.id = BDB_SDVO_LVDS_OPTIONS,
.name = "SDVO LVDS options block",
.dump = dump_sdvo_lvds_options,