summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-05-03 11:52:12 +0300
committerJani Nikula <jani.nikula@intel.com>2016-05-12 14:02:31 +0300
commit17ae0a6d6b7c4aba359875988e2a896cf4943751 (patch)
treeb1dce53e67cb8477b887912a3d54efd0d4ce64d1 /tools
parentb6ccc55f074241341af5ee025d86d3d05c263180 (diff)
tools/intel_bios_reader: drop dependencies on lvds block parsing
Don't mandate a specific ordering on the parsing of the blocks. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/intel_bios_reader.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 10a1cab0..3e622b84 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -66,7 +66,6 @@ struct context {
int size;
uint32_t devid;
- const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
int panel_type;
};
@@ -469,16 +468,14 @@ static void dump_lvds_ptr_data(struct context *context,
const struct bdb_lvds_lfp_data_ptrs *ptrs = block->data;
printf("\tNumber of entries: %d\n", ptrs->lvds_entries);
-
- /* save for use by dump_lvds_data() */
- context->lvds_lfp_data_ptrs = ptrs;
}
static void dump_lvds_data(struct context *context,
const struct bdb_block *block)
{
const struct bdb_lvds_lfp_data *lvds_data = block->data;
- const struct bdb_lvds_lfp_data_ptrs *ptrs = context->lvds_lfp_data_ptrs;
+ struct bdb_block *ptrs_block;
+ const struct bdb_lvds_lfp_data_ptrs *ptrs;
int num_entries;
int i;
int hdisplay, hsyncstart, hsyncend, htotal;
@@ -486,11 +483,14 @@ static void dump_lvds_data(struct context *context,
float clock;
int lfp_data_size, dvo_offset;
- if (!ptrs) {
+ ptrs_block = find_section(context, BDB_LVDS_LFP_DATA_PTRS);
+ if (!ptrs_block) {
printf("No LVDS ptr block\n");
return;
}
+ ptrs = ptrs_block->data;
+
lfp_data_size =
ptrs->ptr[1].fp_timing_offset - ptrs->ptr[0].fp_timing_offset;
dvo_offset =
@@ -545,6 +545,8 @@ static void dump_lvds_data(struct context *context,
(hsyncend > htotal || vsyncend > vtotal) ?
"BAD!" : "good");
}
+
+ free(ptrs_block);
}
static void dump_driver_feature(struct context *context,