summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-05-03 12:36:32 +0300
committerJani Nikula <jani.nikula@intel.com>2016-05-12 14:04:58 +0300
commit96647f1845a8b17584883395eda209523fbf6088 (patch)
tree30943972570c36366ddaaa92595039ca35b3994f /tools
parent1c33231d9daf71282ca85d0c66a4d717e3aa0397 (diff)
tools/intel_bios_reader: add --all-panels option to dump all panels
Only dump the one matching panel_type by default. Cleans up the output, and allows the users to get more verbose output if he so chooses. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/intel_bios_reader.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 9bbb655a..6538870d 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -67,6 +67,7 @@ struct context {
uint32_t devid;
int panel_type;
+ bool dump_all_panel_types;
bool hexdump;
};
@@ -513,6 +514,9 @@ static void dump_lvds_data(struct context *context,
(const struct bdb_lvds_lfp_data_entry *)lfp_data_ptr;
char marker;
+ if (i != context->panel_type && !context->dump_all_panel_types)
+ continue;
+
if (i == context->panel_type)
marker = '*';
else
@@ -628,6 +632,9 @@ static void dump_edp(struct context *context,
int i;
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\tPower Sequence: T3 %d T7 %d T9 %d T10 %d T12 %d\n",
@@ -1402,6 +1409,7 @@ enum opt {
OPT_FILE,
OPT_DEVID,
OPT_PANEL_TYPE,
+ OPT_ALL_PANELS,
OPT_HEXDUMP,
OPT_BLOCK,
};
@@ -1430,6 +1438,7 @@ int main(int argc, char **argv)
{ "file", required_argument, NULL, OPT_FILE },
{ "devid", required_argument, NULL, OPT_DEVID },
{ "panel-type", required_argument, NULL, OPT_PANEL_TYPE },
+ { "all-panels", no_argument, NULL, OPT_ALL_PANELS },
{ "hexdump", no_argument, NULL, OPT_HEXDUMP },
{ "block", required_argument, NULL, OPT_BLOCK },
{ 0 }
@@ -1457,6 +1466,9 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}
break;
+ case OPT_ALL_PANELS:
+ context.dump_all_panel_types = true;
+ break;
case OPT_HEXDUMP:
context.hexdump = true;
break;