All of lore.kernel.org
 help / color / mirror / Atom feed
* [i-g-t PATCH 0/6] intel_bios_reader: support MIPI sequence block v3
@ 2016-01-14 15:51 Jani Nikula
  2016-01-14 15:51 ` [i-g-t PATCH 1/6] intel_bios_reader: pass bdb pointer around instead of having as global Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Jani Nikula @ 2016-01-14 15:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Support MIPI sequence block v3 in the intel_bios_reader tool. This is
mostly copied from the kernel. It makes some of the parts a bit
artifical for an userspace tool, but hey, this pattern has been followed
all around in IGT and it makes debugging kernel issues much easier that
the code is similar.

BR,
Jani.


Jani Nikula (6):
  intel_bios_reader: pass bdb pointer around instead of having as global
  intel_bios_reader: fix size handling for 32-bit block size
  intel_bios_reader: make the VBT pointers more const
  intel_bios_reader: port find_panel_sequence_block from kernel
  intel_bios_reader: port the sequence block parsing from kernel
  intel_bios_reader: dump MIPI sequence block v3

 tools/intel_bios_reader.c | 412 +++++++++++++++++++++++++++++++++-------------
 1 file changed, 296 insertions(+), 116 deletions(-)

-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [i-g-t PATCH 1/6] intel_bios_reader: pass bdb pointer around instead of having as global
  2016-01-14 15:51 [i-g-t PATCH 0/6] intel_bios_reader: support MIPI sequence block v3 Jani Nikula
@ 2016-01-14 15:51 ` Jani Nikula
  2016-01-14 15:51 ` [i-g-t PATCH 2/6] intel_bios_reader: fix size handling for 32-bit block size Jani Nikula
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2016-01-14 15:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_bios_reader.c | 88 ++++++++++++++++++++++++++++-------------------
 1 file changed, 52 insertions(+), 36 deletions(-)

diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index b31f648f0607..7b525f220f16 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -71,13 +71,13 @@ struct bdb_block {
 	void *data;
 };
 
-struct bdb_header *bdb;
 struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
 static int tv_present;
 static int lvds_present;
 static int panel_type;
 
-static struct bdb_block *find_section(int section_id, int length)
+static struct bdb_block *find_section(const struct bdb_header *bdb,
+				      int section_id, int length)
 {
 	struct bdb_block *block;
 	unsigned char *base = (unsigned char *)bdb;
@@ -118,7 +118,8 @@ static struct bdb_block *find_section(int section_id, int length)
 	return NULL;
 }
 
-static void dump_general_features(const struct bdb_block *block)
+static void dump_general_features(const struct bdb_header *bdb,
+				  const struct bdb_block *block)
 {
 	struct bdb_general_features *features = block->data;
 
@@ -170,7 +171,8 @@ static void dump_general_features(const struct bdb_block *block)
 	lvds_present = 1;	/* should be based on IS_MOBILE() */
 }
 
-static void dump_backlight_info(const struct bdb_block *block)
+static void dump_backlight_info(const struct bdb_header *bdb,
+				const struct bdb_block *block)
 {
 	struct bdb_lvds_backlight *backlight = block->data;
 	struct blc_struct *blc;
@@ -352,7 +354,8 @@ static const char *efp_conn(uint8_t type)
 
 
 
-static void dump_child_device(struct child_device_config *child)
+static void dump_child_device(const struct bdb_header *bdb,
+			      struct child_device_config *child)
 {
 	char child_id[11];
 
@@ -390,7 +393,8 @@ static void dump_child_device(struct child_device_config *child)
 	}
 }
 
-static void dump_general_definitions(const struct bdb_block *block)
+static void dump_general_definitions(const struct bdb_header *bdb,
+				     const struct bdb_block *block)
 {
 	struct bdb_general_definitions *defs = block->data;
 	int i;
@@ -409,10 +413,11 @@ static void dump_general_definitions(const struct bdb_block *block)
 	child_device_num = (block->size - sizeof(*defs)) /
 		defs->child_dev_size;
 	for (i = 0; i < child_device_num; i++)
-		dump_child_device((void*)&defs->devices[i * defs->child_dev_size]);
+		dump_child_device(bdb,(void*)&defs->devices[i * defs->child_dev_size]);
 }
 
-static void dump_child_devices(const struct bdb_block *block)
+static void dump_child_devices(const struct bdb_header *bdb,
+			       const struct bdb_block *block)
 {
 	struct bdb_child_devices *child_devs = block->data;
 	struct child_device_config *child;
@@ -435,7 +440,8 @@ static void dump_child_devices(const struct bdb_block *block)
 	}
 }
 
-static void dump_lvds_options(const struct bdb_block *block)
+static void dump_lvds_options(const struct bdb_header *bdb,
+			      const struct bdb_block *block)
 {
 	struct bdb_lvds_options *options = block->data;
 
@@ -451,7 +457,8 @@ static void dump_lvds_options(const struct bdb_block *block)
 	printf("\tPFIT mode: %d\n", options->pfit_mode);
 }
 
-static void dump_lvds_ptr_data(const struct bdb_block *block)
+static void dump_lvds_ptr_data(const struct bdb_header *bdb,
+			       const struct bdb_block *block)
 {
 	struct bdb_lvds_lfp_data_ptrs *ptrs = block->data;
 
@@ -461,7 +468,8 @@ static void dump_lvds_ptr_data(const struct bdb_block *block)
 	lvds_lfp_data_ptrs = ptrs;
 }
 
-static void dump_lvds_data(const struct bdb_block *block)
+static void dump_lvds_data(const struct bdb_header *bdb,
+			   const struct bdb_block *block)
 {
 	struct bdb_lvds_lfp_data *lvds_data = block->data;
 	struct bdb_lvds_lfp_data_ptrs *ptrs = lvds_lfp_data_ptrs;
@@ -533,7 +541,8 @@ static void dump_lvds_data(const struct bdb_block *block)
 	}
 }
 
-static void dump_driver_feature(const struct bdb_block *block)
+static void dump_driver_feature(const struct bdb_header *bdb,
+				const struct bdb_block *block)
 {
 	struct bdb_driver_feature *feature = block->data;
 
@@ -599,7 +608,8 @@ static void dump_driver_feature(const struct bdb_block *block)
 	       feature->legacy_crt_max_refresh);
 }
 
-static void dump_edp(const struct bdb_block *block)
+static void dump_edp(const struct bdb_header *bdb,
+		     const struct bdb_block *block)
 {
 	struct bdb_edp *edp = block->data;
 	int bpp, msa;
@@ -728,7 +738,8 @@ print_detail_timing_data(struct lvds_dvo_timing2 *dvo_timing)
 	printf("\tclock: %d\n", dvo_timing->clock * 10);
 }
 
-static void dump_sdvo_panel_dtds(const struct bdb_block *block)
+static void dump_sdvo_panel_dtds(const struct bdb_header *bdb,
+				 const struct bdb_block *block)
 {
 	struct lvds_dvo_timing2 *dvo_timing = block->data;
 	int n, count;
@@ -740,7 +751,8 @@ static void dump_sdvo_panel_dtds(const struct bdb_block *block)
 	}
 }
 
-static void dump_sdvo_lvds_options(const struct bdb_block *block)
+static void dump_sdvo_lvds_options(const struct bdb_header *bdb,
+				   const struct bdb_block *block)
 {
 	struct bdb_sdvo_lvds_options *options = block->data;
 
@@ -761,7 +773,8 @@ static void dump_sdvo_lvds_options(const struct bdb_block *block)
 	printf("\tmisc[3]: %x\n", options->panel_misc_bits_4);
 }
 
-static void dump_mipi_config(const struct bdb_block *block)
+static void dump_mipi_config(const struct bdb_header *bdb,
+			     const struct bdb_block *block)
 {
 	struct bdb_mipi_config *start = block->data;
 	struct mipi_config *config;
@@ -989,7 +1002,8 @@ static uint16_t get_blocksize(void *p)
 	return block_size;
 }
 
-static void dump_mipi_sequence(const struct bdb_block *block)
+static void dump_mipi_sequence(const struct bdb_header *bdb,
+			       const struct bdb_block *block)
 {
 	struct bdb_mipi_sequence *sequence = block->data;
 	const uint8_t *data;
@@ -1075,7 +1089,8 @@ get_device_id(unsigned char *bios, int size)
 struct dumper {
 	uint8_t id;
 	const char *name;
-	void (*dump)(const struct bdb_block *block);
+	void (*dump)(const struct bdb_header *bdb,
+		     const struct bdb_block *block);
 };
 
 struct dumper dumpers[] = {
@@ -1167,7 +1182,7 @@ static void hex_dump(const struct bdb_block *block)
 	printf("\n\n");
 }
 
-static void dump_section(int section_id, int size)
+static void dump_section(const struct bdb_header *bdb, int section_id, int size)
 {
 	struct dumper *dumper = NULL;
 	const struct bdb_block *block;
@@ -1178,7 +1193,7 @@ static void dump_section(int section_id, int size)
 		return;
 	done[section_id] = 1;
 
-	block = find_section(section_id, size);
+	block = find_section(bdb, section_id, size);
 	if (!block)
 		return;
 
@@ -1196,7 +1211,7 @@ static void dump_section(int section_id, int size)
 
 	hex_dump(block);
 	if (dumper && dumper->dump)
-		dumper->dump(block);
+		dumper->dump(bdb, block);
 	printf("\n");
 }
 
@@ -1209,6 +1224,7 @@ int main(int argc, char **argv)
 	struct stat finfo;
 	int size;
 	struct bdb_block *block;
+	struct bdb_header *bdb;
 	char signature[17];
 	char *devid_string;
 
@@ -1291,7 +1307,7 @@ int main(int argc, char **argv)
 	printf("Available sections: ");
 
 	for (i = 0; i < 256; i++) {
-		block = find_section(i, size);
+		block = find_section(bdb, i, size);
 		if (!block)
 			continue;
 		printf("%d ", i);
@@ -1304,24 +1320,24 @@ int main(int argc, char **argv)
 	if (devid == -1)
 	    printf("Warning: could not find PCI device ID!\n");
 
-	dump_section(BDB_GENERAL_FEATURES, size);
-	dump_section(BDB_GENERAL_DEFINITIONS, size);
-	dump_section(BDB_CHILD_DEVICE_TABLE, size);
-	dump_section(BDB_LVDS_OPTIONS, size);
-	dump_section(BDB_LVDS_LFP_DATA_PTRS, size);
-	dump_section(BDB_LVDS_LFP_DATA, size);
-	dump_section(BDB_LVDS_BACKLIGHT, size);
+	dump_section(bdb, BDB_GENERAL_FEATURES, size);
+	dump_section(bdb, BDB_GENERAL_DEFINITIONS, size);
+	dump_section(bdb, BDB_CHILD_DEVICE_TABLE, size);
+	dump_section(bdb, BDB_LVDS_OPTIONS, size);
+	dump_section(bdb, BDB_LVDS_LFP_DATA_PTRS, size);
+	dump_section(bdb, BDB_LVDS_LFP_DATA, size);
+	dump_section(bdb, BDB_LVDS_BACKLIGHT, size);
 
-	dump_section(BDB_SDVO_LVDS_OPTIONS, size);
-	dump_section(BDB_SDVO_PANEL_DTDS, size);
+	dump_section(bdb, BDB_SDVO_LVDS_OPTIONS, size);
+	dump_section(bdb, BDB_SDVO_PANEL_DTDS, size);
 
-	dump_section(BDB_DRIVER_FEATURES, size);
-	dump_section(BDB_EDP, size);
-	dump_section(BDB_MIPI_CONFIG, size);
-	dump_section(BDB_MIPI_SEQUENCE, size);
+	dump_section(bdb, BDB_DRIVER_FEATURES, size);
+	dump_section(bdb, BDB_EDP, size);
+	dump_section(bdb, BDB_MIPI_CONFIG, size);
+	dump_section(bdb, BDB_MIPI_SEQUENCE, size);
 
 	for (i = 0; i < 256; i++)
-		dump_section(i, size);
+		dump_section(bdb, i, size);
 
 	return 0;
 }
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [i-g-t PATCH 2/6] intel_bios_reader: fix size handling for 32-bit block size
  2016-01-14 15:51 [i-g-t PATCH 0/6] intel_bios_reader: support MIPI sequence block v3 Jani Nikula
  2016-01-14 15:51 ` [i-g-t PATCH 1/6] intel_bios_reader: pass bdb pointer around instead of having as global Jani Nikula
@ 2016-01-14 15:51 ` Jani Nikula
  2016-01-14 15:51 ` [i-g-t PATCH 3/6] intel_bios_reader: make the VBT pointers more const Jani Nikula
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2016-01-14 15:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

The MIPI DSI sequence block v3+ has a separate block size field.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_bios_reader.c | 46 +++++++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 7b525f220f16..496f2b4f8d1e 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -65,9 +65,10 @@ uint8_t *VBIOS;
 
 #define YESNO(val) ((val) ? "yes" : "no")
 
+/* This is not for mapping to memory layout. */
 struct bdb_block {
 	uint8_t id;
-	uint16_t size;
+	uint32_t size;
 	void *data;
 };
 
@@ -76,17 +77,27 @@ static int tv_present;
 static int lvds_present;
 static int panel_type;
 
+/* Get BDB block size given a pointer to Block ID. */
+static uint32_t _get_blocksize(const uint8_t *block_base)
+{
+	/* The MIPI Sequence Block v3+ has a separate size field. */
+	if (*block_base == BDB_MIPI_SEQUENCE && *(block_base + 3) >= 3)
+		return *((const uint32_t *)(block_base + 4));
+	else
+		return *((const uint16_t *)(block_base + 1));
+}
+
 static struct bdb_block *find_section(const struct bdb_header *bdb,
 				      int section_id, int length)
 {
 	struct bdb_block *block;
 	unsigned char *base = (unsigned char *)bdb;
-	int idx = 0;
-	uint16_t total, current_size;
+	int index = 0;
+	uint32_t total, current_size;
 	unsigned char current_id;
 
 	/* skip to first section */
-	idx += bdb->header_size;
+	index += bdb->header_size;
 	total = bdb->bdb_size;
 	if (total > length)
 		total = length;
@@ -98,20 +109,22 @@ static struct bdb_block *find_section(const struct bdb_header *bdb,
 	}
 
 	/* walk the sections looking for section_id */
-	while (idx + 3 < total) {
-		current_id = *(base + idx);
-		current_size = *(uint16_t *)(base + idx + 1);
-		if (idx + current_size > total)
+	while (index + 3 < total) {
+		current_id = *(base + index);
+		current_size = _get_blocksize(base + index);
+		index += 3;
+
+		if (index + current_size > total)
 			return NULL;
 
 		if (current_id == section_id) {
 			block->id = current_id;
 			block->size = current_size;
-			block->data = base + idx + 3;
+			block->data = base + index;
 			return block;
 		}
 
-		idx += current_size + 3;
+		index += current_size;
 	}
 
 	free(block);
@@ -993,22 +1006,13 @@ static const uint8_t *dump_sequence(const uint8_t *data)
 	return data;
 }
 
-static uint16_t get_blocksize(void *p)
-{
-	uint16_t *block_ptr, block_size;
-
-	block_ptr = (uint16_t *)((char *)p - 2);
-	block_size = *block_ptr;
-	return block_size;
-}
-
 static void dump_mipi_sequence(const struct bdb_header *bdb,
 			       const struct bdb_block *block)
 {
 	struct bdb_mipi_sequence *sequence = block->data;
 	const uint8_t *data;
 	int i, panel_id, seq_size;
-	uint16_t block_size;
+	uint32_t block_size;
 
 	/* Check if we have sequence block as well */
 	if (!sequence) {
@@ -1021,7 +1025,7 @@ static void dump_mipi_sequence(const struct bdb_header *bdb,
 	if (sequence->version >= 3)
 		return;
 
-	block_size = get_blocksize(sequence);
+	block_size = block->size;
 
 	data = &sequence->data[0];
 
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [i-g-t PATCH 3/6] intel_bios_reader: make the VBT pointers more const
  2016-01-14 15:51 [i-g-t PATCH 0/6] intel_bios_reader: support MIPI sequence block v3 Jani Nikula
  2016-01-14 15:51 ` [i-g-t PATCH 1/6] intel_bios_reader: pass bdb pointer around instead of having as global Jani Nikula
  2016-01-14 15:51 ` [i-g-t PATCH 2/6] intel_bios_reader: fix size handling for 32-bit block size Jani Nikula
@ 2016-01-14 15:51 ` Jani Nikula
  2016-01-14 15:51 ` [i-g-t PATCH 4/6] intel_bios_reader: port find_panel_sequence_block from kernel Jani Nikula
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2016-01-14 15:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

In const we trust.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_bios_reader.c | 56 +++++++++++++++++++++++------------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 496f2b4f8d1e..7dbda3eac77c 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -69,10 +69,10 @@ uint8_t *VBIOS;
 struct bdb_block {
 	uint8_t id;
 	uint32_t size;
-	void *data;
+	const void *data;
 };
 
-struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
+const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs;
 static int tv_present;
 static int lvds_present;
 static int panel_type;
@@ -91,7 +91,7 @@ static struct bdb_block *find_section(const struct bdb_header *bdb,
 				      int section_id, int length)
 {
 	struct bdb_block *block;
-	unsigned char *base = (unsigned char *)bdb;
+	const uint8_t *base = (const uint8_t *)bdb;
 	int index = 0;
 	uint32_t total, current_size;
 	unsigned char current_id;
@@ -134,7 +134,7 @@ static struct bdb_block *find_section(const struct bdb_header *bdb,
 static void dump_general_features(const struct bdb_header *bdb,
 				  const struct bdb_block *block)
 {
-	struct bdb_general_features *features = block->data;
+	const struct bdb_general_features *features = block->data;
 
 	printf("\tPanel fitting: ");
 	switch (features->panel_fitting) {
@@ -187,8 +187,8 @@ static void dump_general_features(const struct bdb_header *bdb,
 static void dump_backlight_info(const struct bdb_header *bdb,
 				const struct bdb_block *block)
 {
-	struct bdb_lvds_backlight *backlight = block->data;
-	struct blc_struct *blc;
+	const struct bdb_lvds_backlight *backlight = block->data;
+	const struct blc_struct *blc;
 
 	if (sizeof(struct blc_struct) != backlight->blcstruct_size) {
 		printf("\tBacklight struct sizes don't match (expected %zu, got %u), skipping\n",
@@ -409,7 +409,7 @@ static void dump_child_device(const struct bdb_header *bdb,
 static void dump_general_definitions(const struct bdb_header *bdb,
 				     const struct bdb_block *block)
 {
-	struct bdb_general_definitions *defs = block->data;
+	const struct bdb_general_definitions *defs = block->data;
 	int i;
 	int child_device_num;
 
@@ -432,8 +432,8 @@ static void dump_general_definitions(const struct bdb_header *bdb,
 static void dump_child_devices(const struct bdb_header *bdb,
 			       const struct bdb_block *block)
 {
-	struct bdb_child_devices *child_devs = block->data;
-	struct child_device_config *child;
+	const struct bdb_child_devices *child_devs = block->data;
+	const struct child_device_config *child;
 	int i;
 
 	for (i = 0; i < DEVICE_CHILD_SIZE; i++) {
@@ -456,7 +456,7 @@ static void dump_child_devices(const struct bdb_header *bdb,
 static void dump_lvds_options(const struct bdb_header *bdb,
 			      const struct bdb_block *block)
 {
-	struct bdb_lvds_options *options = block->data;
+	const struct bdb_lvds_options *options = block->data;
 
 	panel_type = options->panel_type;
 	printf("\tPanel type: %d\n", panel_type);
@@ -473,7 +473,7 @@ static void dump_lvds_options(const struct bdb_header *bdb,
 static void dump_lvds_ptr_data(const struct bdb_header *bdb,
 			       const struct bdb_block *block)
 {
-	struct bdb_lvds_lfp_data_ptrs *ptrs = block->data;
+	const struct bdb_lvds_lfp_data_ptrs *ptrs = block->data;
 
 	printf("\tNumber of entries: %d\n", ptrs->lvds_entries);
 
@@ -484,8 +484,8 @@ static void dump_lvds_ptr_data(const struct bdb_header *bdb,
 static void dump_lvds_data(const struct bdb_header *bdb,
 			   const struct bdb_block *block)
 {
-	struct bdb_lvds_lfp_data *lvds_data = block->data;
-	struct bdb_lvds_lfp_data_ptrs *ptrs = lvds_lfp_data_ptrs;
+	const struct bdb_lvds_lfp_data *lvds_data = block->data;
+	const struct bdb_lvds_lfp_data_ptrs *ptrs = lvds_lfp_data_ptrs;
 	int num_entries;
 	int i;
 	int hdisplay, hsyncstart, hsyncend, htotal;
@@ -509,11 +509,11 @@ static void dump_lvds_data(const struct bdb_header *bdb,
 	       num_entries);
 
 	for (i = 0; i < num_entries; i++) {
-		uint8_t *lfp_data_ptr =
-		    (uint8_t *) lvds_data->data + lfp_data_size * i;
-		uint8_t *timing_data = lfp_data_ptr + dvo_offset;
-		struct bdb_lvds_lfp_data_entry *lfp_data =
-		    (struct bdb_lvds_lfp_data_entry *)lfp_data_ptr;
+		const uint8_t *lfp_data_ptr =
+		    (const uint8_t *) lvds_data->data + lfp_data_size * i;
+		const uint8_t *timing_data = lfp_data_ptr + dvo_offset;
+		const struct bdb_lvds_lfp_data_entry *lfp_data =
+		    (const struct bdb_lvds_lfp_data_entry *)lfp_data_ptr;
 		char marker;
 
 		if (i == panel_type)
@@ -557,7 +557,7 @@ static void dump_lvds_data(const struct bdb_header *bdb,
 static void dump_driver_feature(const struct bdb_header *bdb,
 				const struct bdb_block *block)
 {
-	struct bdb_driver_feature *feature = block->data;
+	const struct bdb_driver_feature *feature = block->data;
 
 	printf("\tBoot Device Algorithm: %s\n", feature->boot_dev_algorithm ?
 	       "driver default" : "os default");
@@ -624,7 +624,7 @@ static void dump_driver_feature(const struct bdb_header *bdb,
 static void dump_edp(const struct bdb_header *bdb,
 		     const struct bdb_block *block)
 {
-	struct bdb_edp *edp = block->data;
+	const struct bdb_edp *edp = block->data;
 	int bpp, msa;
 	int i;
 
@@ -723,7 +723,7 @@ static void dump_edp(const struct bdb_header *bdb,
 }
 
 static void
-print_detail_timing_data(struct lvds_dvo_timing2 *dvo_timing)
+print_detail_timing_data(const struct lvds_dvo_timing2 *dvo_timing)
 {
 	int display, sync_start, sync_end, total;
 
@@ -754,7 +754,7 @@ print_detail_timing_data(struct lvds_dvo_timing2 *dvo_timing)
 static void dump_sdvo_panel_dtds(const struct bdb_header *bdb,
 				 const struct bdb_block *block)
 {
-	struct lvds_dvo_timing2 *dvo_timing = block->data;
+	const struct lvds_dvo_timing2 *dvo_timing = block->data;
 	int n, count;
 
 	count = block->size / sizeof(struct lvds_dvo_timing2);
@@ -767,7 +767,7 @@ static void dump_sdvo_panel_dtds(const struct bdb_header *bdb,
 static void dump_sdvo_lvds_options(const struct bdb_header *bdb,
 				   const struct bdb_block *block)
 {
-	struct bdb_sdvo_lvds_options *options = block->data;
+	const struct bdb_sdvo_lvds_options *options = block->data;
 
 	printf("\tbacklight: %d\n", options->panel_backlight);
 	printf("\th40 type: %d\n", options->h40_set_panel_type);
@@ -789,9 +789,9 @@ static void dump_sdvo_lvds_options(const struct bdb_header *bdb,
 static void dump_mipi_config(const struct bdb_header *bdb,
 			     const struct bdb_block *block)
 {
-	struct bdb_mipi_config *start = block->data;
-	struct mipi_config *config;
-	struct mipi_pps_data *pps;
+	const struct bdb_mipi_config *start = block->data;
+	const struct mipi_config *config;
+	const struct mipi_pps_data *pps;
 
 	config = &start->config[panel_type];
 	pps = &start->pps[panel_type];
@@ -1009,7 +1009,7 @@ static const uint8_t *dump_sequence(const uint8_t *data)
 static void dump_mipi_sequence(const struct bdb_header *bdb,
 			       const struct bdb_block *block)
 {
-	struct bdb_mipi_sequence *sequence = block->data;
+	const struct bdb_mipi_sequence *sequence = block->data;
 	const uint8_t *data;
 	int i, panel_id, seq_size;
 	uint32_t block_size;
@@ -1168,7 +1168,7 @@ struct dumper dumpers[] = {
 static void hex_dump(const struct bdb_block *block)
 {
 	int i;
-	uint8_t *p = block->data;
+	const uint8_t *p = block->data;
 
 	for (i = 0; i < block->size; i++) {
 		if (i % 16 == 0)
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [i-g-t PATCH 4/6] intel_bios_reader: port find_panel_sequence_block from kernel
  2016-01-14 15:51 [i-g-t PATCH 0/6] intel_bios_reader: support MIPI sequence block v3 Jani Nikula
                   ` (2 preceding siblings ...)
  2016-01-14 15:51 ` [i-g-t PATCH 3/6] intel_bios_reader: make the VBT pointers more const Jani Nikula
@ 2016-01-14 15:51 ` Jani Nikula
  2016-01-14 15:51 ` [i-g-t PATCH 5/6] intel_bios_reader: port the sequence block parsing " Jani Nikula
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2016-01-14 15:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

No need to reinvent wheels, reuse the code from kernel.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_bios_reader.c | 81 ++++++++++++++++++++++++++++++-----------------
 1 file changed, 52 insertions(+), 29 deletions(-)

diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 7dbda3eac77c..eb550817c44e 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -1006,13 +1006,60 @@ static const uint8_t *dump_sequence(const uint8_t *data)
 	return data;
 }
 
+/* Find the sequence block and size for the given panel. */
+static const uint8_t *
+find_panel_sequence_block(const struct bdb_mipi_sequence *sequence,
+			  uint16_t panel_id, uint32_t total, uint32_t *seq_size)
+{
+	const uint8_t *data = &sequence->data[0];
+	uint8_t current_id;
+	uint32_t current_size;
+	int header_size = sequence->version >= 3 ? 5 : 3;
+	int index = 0;
+	int i;
+
+	/* skip new block size */
+	if (sequence->version >= 3)
+		data += 4;
+
+	for (i = 0; i < MAX_MIPI_CONFIGURATIONS && index < total; i++) {
+		if (index + header_size > total) {
+			fprintf(stderr, "Invalid sequence block (header)\n");
+			return NULL;
+		}
+
+		current_id = *(data + index);
+		if (sequence->version >= 3)
+			current_size = *((const uint32_t *)(data + index + 1));
+		else
+			current_size = *((const uint16_t *)(data + index + 1));
+
+		index += header_size;
+
+		if (index + current_size > total) {
+			fprintf(stderr, "Invalid sequence block\n");
+			return NULL;
+		}
+
+		if (current_id == panel_id) {
+			*seq_size = current_size;
+			return data + index;
+		}
+
+		index += current_size;
+	}
+
+	fprintf(stderr, "Sequence block detected but no valid configuration\n");
+
+	return NULL;
+}
+
 static void dump_mipi_sequence(const struct bdb_header *bdb,
 			       const struct bdb_block *block)
 {
 	const struct bdb_mipi_sequence *sequence = block->data;
 	const uint8_t *data;
-	int i, panel_id, seq_size;
-	uint32_t block_size;
+	uint32_t seq_size;
 
 	/* Check if we have sequence block as well */
 	if (!sequence) {
@@ -1025,34 +1072,10 @@ static void dump_mipi_sequence(const struct bdb_header *bdb,
 	if (sequence->version >= 3)
 		return;
 
-	block_size = block->size;
-
-	data = &sequence->data[0];
-
-	/*
-	 * sequence block is variable length and hence we need to parse and
-	 * get the sequence data for specific panel id
-	 */
-	for (i = 0; i < MAX_MIPI_CONFIGURATIONS; i++) {
-		panel_id = *data;
-		seq_size = *((uint16_t *) (data + 1));
-		data += 3;
-
-		if (data + seq_size > (const uint8_t *)sequence + block_size) {
-			printf("Invalid sequence block\n");
-			return;
-		}
-
-		if (panel_id == panel_type)
-			break;
-
-		data += seq_size;
-	}
-
-	if (i == MAX_MIPI_CONFIGURATIONS) {
-		printf("Sequence block detected but no valid configuration\n");
+	data = find_panel_sequence_block(sequence, panel_type,
+					 block->size, &seq_size);
+	if (!data)
 		return;
-	}
 
 	/*
 	 * loop into the sequence data and split into multiple sequneces
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [i-g-t PATCH 5/6] intel_bios_reader: port the sequence block parsing from kernel
  2016-01-14 15:51 [i-g-t PATCH 0/6] intel_bios_reader: support MIPI sequence block v3 Jani Nikula
                   ` (3 preceding siblings ...)
  2016-01-14 15:51 ` [i-g-t PATCH 4/6] intel_bios_reader: port find_panel_sequence_block from kernel Jani Nikula
@ 2016-01-14 15:51 ` Jani Nikula
  2016-01-14 15:51 ` [i-g-t PATCH 6/6] intel_bios_reader: dump MIPI sequence block v3 Jani Nikula
  2016-01-15 13:26 ` [i-g-t PATCH 0/6] intel_bios_reader: support " Jani Nikula
  6 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2016-01-14 15:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Reuse the same code as kernel. Also parses v3, although does not
actually dump that stuff yet.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_bios_reader.c | 141 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 140 insertions(+), 1 deletion(-)

diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index eb550817c44e..944ad5315f3a 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -1054,12 +1054,120 @@ find_panel_sequence_block(const struct bdb_mipi_sequence *sequence,
 	return NULL;
 }
 
+static int goto_next_sequence(const uint8_t *data, int index, int total)
+{
+	uint16_t len;
+
+	/* Skip Sequence Byte. */
+	for (index = index + 1; index < total; index += len) {
+		uint8_t operation_byte = *(data + index);
+		index++;
+
+		switch (operation_byte) {
+		case MIPI_SEQ_ELEM_END:
+			return index;
+		case MIPI_SEQ_ELEM_SEND_PKT:
+			if (index + 4 > total)
+				return 0;
+
+			len = *((const uint16_t *)(data + index + 2)) + 4;
+			break;
+		case MIPI_SEQ_ELEM_DELAY:
+			len = 4;
+			break;
+		case MIPI_SEQ_ELEM_GPIO:
+			len = 2;
+			break;
+		case MIPI_SEQ_ELEM_I2C:
+			if (index + 7 > total)
+				return 0;
+			len = *(data + index + 6) + 7;
+			break;
+		default:
+			fprintf(stderr, "Unknown operation byte\n");
+			return 0;
+		}
+	}
+
+	return 0;
+}
+
+static int goto_next_sequence_v3(const uint8_t *data, int index, int total)
+{
+	int seq_end;
+	uint16_t len;
+	uint32_t size_of_sequence;
+
+	/*
+	 * Could skip sequence based on Size of Sequence alone, but also do some
+	 * checking on the structure.
+	 */
+	if (total < 5) {
+		fprintf(stderr, "Too small sequence size\n");
+		return 0;
+	}
+
+	/* Skip Sequence Byte. */
+	index++;
+
+	/*
+	 * Size of Sequence. Excludes the Sequence Byte and the size itself,
+	 * includes MIPI_SEQ_ELEM_END byte, excludes the final MIPI_SEQ_END
+	 * byte.
+	 */
+	size_of_sequence = *((const uint32_t *)(data + index));
+	index += 4;
+
+	seq_end = index + size_of_sequence;
+	if (seq_end > total) {
+		fprintf(stderr, "Invalid sequence size\n");
+		return 0;
+	}
+
+	for (; index < total; index += len) {
+		uint8_t operation_byte = *(data + index);
+		index++;
+
+		if (operation_byte == MIPI_SEQ_ELEM_END) {
+			if (index != seq_end) {
+				fprintf(stderr, "Invalid element structure\n");
+				return 0;
+			}
+			return index;
+		}
+
+		len = *(data + index);
+		index++;
+
+		/*
+		 * FIXME: Would be nice to check elements like for v1/v2 in
+		 * goto_next_sequence() above.
+		 */
+		switch (operation_byte) {
+		case MIPI_SEQ_ELEM_SEND_PKT:
+		case MIPI_SEQ_ELEM_DELAY:
+		case MIPI_SEQ_ELEM_GPIO:
+		case MIPI_SEQ_ELEM_I2C:
+		case MIPI_SEQ_ELEM_SPI:
+		case MIPI_SEQ_ELEM_PMIC:
+			break;
+		default:
+			fprintf(stderr, "Unknown operation byte %u\n",
+				operation_byte);
+			break;
+		}
+	}
+
+	return 0;
+}
+
 static void dump_mipi_sequence(const struct bdb_header *bdb,
 			       const struct bdb_block *block)
 {
 	const struct bdb_mipi_sequence *sequence = block->data;
 	const uint8_t *data;
 	uint32_t seq_size;
+	int index = 0;
 
 	/* Check if we have sequence block as well */
 	if (!sequence) {
@@ -1069,14 +1177,45 @@ static void dump_mipi_sequence(const struct bdb_header *bdb,
 
 	printf("\tSequence block version v%u\n", sequence->version);
 
-	if (sequence->version >= 3)
+	/* Fail gracefully for forward incompatible sequence block. */
+	if (sequence->version >= 4) {
+		fprintf(stderr, "Unable to parse MIPI Sequence Block v%u\n",
+			sequence->version);
 		return;
+	}
 
 	data = find_panel_sequence_block(sequence, panel_type,
 					 block->size, &seq_size);
 	if (!data)
 		return;
 
+	/* Parse the sequences. Corresponds to VBT parsing in the kernel. */
+	for (;;) {
+		uint8_t seq_id = *(data + index);
+		if (seq_id == MIPI_SEQ_END)
+			break;
+
+		if (seq_id >= MIPI_SEQ_MAX) {
+			fprintf(stderr, "Unknown sequence %u\n", seq_id);
+			return;
+		}
+
+		if (sequence->version >= 3)
+			index = goto_next_sequence_v3(data, index, seq_size);
+		else
+			index = goto_next_sequence(data, index, seq_size);
+		if (!index) {
+			fprintf(stderr, "Invalid sequence %u\n", seq_id);
+			return;
+		}
+	}
+
+	if (sequence->version >= 3) {
+		fprintf(stderr, "Unable to dump MIPI Sequence Block v%u\n",
+			sequence->version);
+		return;
+	}
+
 	/*
 	 * loop into the sequence data and split into multiple sequneces
 	 * There are only 5 types of sequences as of now
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [i-g-t PATCH 6/6] intel_bios_reader: dump MIPI sequence block v3
  2016-01-14 15:51 [i-g-t PATCH 0/6] intel_bios_reader: support MIPI sequence block v3 Jani Nikula
                   ` (4 preceding siblings ...)
  2016-01-14 15:51 ` [i-g-t PATCH 5/6] intel_bios_reader: port the sequence block parsing " Jani Nikula
@ 2016-01-14 15:51 ` Jani Nikula
  2016-01-14 15:57   ` [PATCH v2 " Jani Nikula
  2016-01-15 13:26 ` [i-g-t PATCH 0/6] intel_bios_reader: support " Jani Nikula
  6 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2016-01-14 15:51 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Similar to what's done in kernel. It's a bit artificial that the parsing
and dumping are two separate steps in the userspace tool, but it's
easier to follow and debug the code when both the kernel and userspace
are similar.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_bios_reader.c | 46 ++++++++++++++++++++++------------------------
 1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 944ad5315f3a..d73ff5b32e35 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -973,7 +973,7 @@ static const char *sequence_name(enum mipi_seq seq_id)
 		return "(unknown)";
 }
 
-static const uint8_t *dump_sequence(const uint8_t *data)
+static const uint8_t *dump_sequence(const uint8_t *data, uint8_t seq_version)
 {
 	fn_mipi_elem_dump mipi_elem_dump;
 
@@ -982,21 +982,33 @@ static const uint8_t *dump_sequence(const uint8_t *data)
 	/* Skip Sequence Byte. */
 	data++;
 
+	/* Skip Size of Sequence. */
+	if (seq_version >= 3)
+		data += 4;
+
 	while (1) {
 		uint8_t operation_byte = *data++;
+		uint8_t operation_size = 0;
 
 		if (operation_byte == MIPI_SEQ_ELEM_END)
 			break;
 
-		if (operation_byte < ARRAY_SIZE(dump_elem) &&
-		    dump_elem[operation_byte])
+		if (operation_byte < ARRAY_SIZE(dump_elem))
 			mipi_elem_dump = dump_elem[operation_byte];
 		else
 			mipi_elem_dump = NULL;
 
+		/* Size of Operation. */
+		if (seq_version >= 3)
+			operation_size = *data++;
+
 		if (mipi_elem_dump) {
 			data = mipi_elem_dump(data);
+		} else if (operation_size) {
+			/* We have size, skip. */
+			data += operation_size;
 		} else {
+			/* No size, can't skip without parsing. */
 			printf("Error: Unsupported MIPI element %u\n",
 			       operation_byte);
 			return NULL;
@@ -1167,7 +1179,8 @@ static void dump_mipi_sequence(const struct bdb_header *bdb,
 	const struct bdb_mipi_sequence *sequence = block->data;
 	const uint8_t *data;
 	uint32_t seq_size;
-	int index = 0;
+	int index = 0, i;
+	const uint8_t *sequence_ptrs[MIPI_SEQ_MAX] = {};
 
 	/* Check if we have sequence block as well */
 	if (!sequence) {
@@ -1200,6 +1213,8 @@ static void dump_mipi_sequence(const struct bdb_header *bdb,
 			return;
 		}
 
+		sequence_ptrs[seq_id] = data + index;
+
 		if (sequence->version >= 3)
 			index = goto_next_sequence_v3(data, index, seq_size);
 		else
@@ -1210,26 +1225,9 @@ static void dump_mipi_sequence(const struct bdb_header *bdb,
 		}
 	}
 
-	if (sequence->version >= 3) {
-		fprintf(stderr, "Unable to dump MIPI Sequence Block v%u\n",
-			sequence->version);
-		return;
-	}
-
-	/*
-	 * loop into the sequence data and split into multiple sequneces
-	 * There are only 5 types of sequences as of now
-	 */
-
-        while (1) {
-		int seq_id = *data;
-		if (seq_id == MIPI_SEQ_END)
-			break;
-
-		data = dump_sequence(data);
-		if (!data)
-			break;
-	}
+	/* Dump the sequences. Corresponds to sequence execution in kernel. */
+	for (i = 0; i < ARRAY_SIZE(sequence_ptrs); i++)
+		dump_sequence(sequence_ptrs[i], sequence->version);
 }
 
 static int
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 6/6] intel_bios_reader: dump MIPI sequence block v3
  2016-01-14 15:51 ` [i-g-t PATCH 6/6] intel_bios_reader: dump MIPI sequence block v3 Jani Nikula
@ 2016-01-14 15:57   ` Jani Nikula
  0 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2016-01-14 15:57 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx

Similar to what's done in kernel. It's a bit artificial that the parsing
and dumping are two separate steps in the userspace tool, but it's
easier to follow and debug the code when both the kernel and userspace
are similar.

v2: don't segfault so much on dumping null pointers

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tools/intel_bios_reader.c | 47 +++++++++++++++++++++++------------------------
 1 file changed, 23 insertions(+), 24 deletions(-)

diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
index 944ad5315f3a..4cfd30afbb46 100644
--- a/tools/intel_bios_reader.c
+++ b/tools/intel_bios_reader.c
@@ -973,7 +973,7 @@ static const char *sequence_name(enum mipi_seq seq_id)
 		return "(unknown)";
 }
 
-static const uint8_t *dump_sequence(const uint8_t *data)
+static const uint8_t *dump_sequence(const uint8_t *data, uint8_t seq_version)
 {
 	fn_mipi_elem_dump mipi_elem_dump;
 
@@ -982,21 +982,33 @@ static const uint8_t *dump_sequence(const uint8_t *data)
 	/* Skip Sequence Byte. */
 	data++;
 
+	/* Skip Size of Sequence. */
+	if (seq_version >= 3)
+		data += 4;
+
 	while (1) {
 		uint8_t operation_byte = *data++;
+		uint8_t operation_size = 0;
 
 		if (operation_byte == MIPI_SEQ_ELEM_END)
 			break;
 
-		if (operation_byte < ARRAY_SIZE(dump_elem) &&
-		    dump_elem[operation_byte])
+		if (operation_byte < ARRAY_SIZE(dump_elem))
 			mipi_elem_dump = dump_elem[operation_byte];
 		else
 			mipi_elem_dump = NULL;
 
+		/* Size of Operation. */
+		if (seq_version >= 3)
+			operation_size = *data++;
+
 		if (mipi_elem_dump) {
 			data = mipi_elem_dump(data);
+		} else if (operation_size) {
+			/* We have size, skip. */
+			data += operation_size;
 		} else {
+			/* No size, can't skip without parsing. */
 			printf("Error: Unsupported MIPI element %u\n",
 			       operation_byte);
 			return NULL;
@@ -1167,7 +1179,8 @@ static void dump_mipi_sequence(const struct bdb_header *bdb,
 	const struct bdb_mipi_sequence *sequence = block->data;
 	const uint8_t *data;
 	uint32_t seq_size;
-	int index = 0;
+	int index = 0, i;
+	const uint8_t *sequence_ptrs[MIPI_SEQ_MAX] = {};
 
 	/* Check if we have sequence block as well */
 	if (!sequence) {
@@ -1200,6 +1213,8 @@ static void dump_mipi_sequence(const struct bdb_header *bdb,
 			return;
 		}
 
+		sequence_ptrs[seq_id] = data + index;
+
 		if (sequence->version >= 3)
 			index = goto_next_sequence_v3(data, index, seq_size);
 		else
@@ -1210,26 +1225,10 @@ static void dump_mipi_sequence(const struct bdb_header *bdb,
 		}
 	}
 
-	if (sequence->version >= 3) {
-		fprintf(stderr, "Unable to dump MIPI Sequence Block v%u\n",
-			sequence->version);
-		return;
-	}
-
-	/*
-	 * loop into the sequence data and split into multiple sequneces
-	 * There are only 5 types of sequences as of now
-	 */
-
-        while (1) {
-		int seq_id = *data;
-		if (seq_id == MIPI_SEQ_END)
-			break;
-
-		data = dump_sequence(data);
-		if (!data)
-			break;
-	}
+	/* Dump the sequences. Corresponds to sequence execution in kernel. */
+	for (i = 0; i < ARRAY_SIZE(sequence_ptrs); i++)
+		if (sequence_ptrs[i])
+			dump_sequence(sequence_ptrs[i], sequence->version);
 }
 
 static int
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [i-g-t PATCH 0/6] intel_bios_reader: support MIPI sequence block v3
  2016-01-14 15:51 [i-g-t PATCH 0/6] intel_bios_reader: support MIPI sequence block v3 Jani Nikula
                   ` (5 preceding siblings ...)
  2016-01-14 15:51 ` [i-g-t PATCH 6/6] intel_bios_reader: dump MIPI sequence block v3 Jani Nikula
@ 2016-01-15 13:26 ` Jani Nikula
  6 siblings, 0 replies; 9+ messages in thread
From: Jani Nikula @ 2016-01-15 13:26 UTC (permalink / raw)
  To: intel-gfx

On Thu, 14 Jan 2016, Jani Nikula <jani.nikula@intel.com> wrote:
> Support MIPI sequence block v3 in the intel_bios_reader tool. This is
> mostly copied from the kernel. It makes some of the parts a bit
> artifical for an userspace tool, but hey, this pattern has been followed
> all around in IGT and it makes debugging kernel issues much easier that
> the code is similar.

I don't really expect anyone else to care, so I pushed the patches. Any
objections will be considered volunteering for bios/opregion tools
work. ;)

BR,
Jani.




>
> BR,
> Jani.
>
>
> Jani Nikula (6):
>   intel_bios_reader: pass bdb pointer around instead of having as global
>   intel_bios_reader: fix size handling for 32-bit block size
>   intel_bios_reader: make the VBT pointers more const
>   intel_bios_reader: port find_panel_sequence_block from kernel
>   intel_bios_reader: port the sequence block parsing from kernel
>   intel_bios_reader: dump MIPI sequence block v3
>
>  tools/intel_bios_reader.c | 412 +++++++++++++++++++++++++++++++++-------------
>  1 file changed, 296 insertions(+), 116 deletions(-)

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-01-15 13:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-14 15:51 [i-g-t PATCH 0/6] intel_bios_reader: support MIPI sequence block v3 Jani Nikula
2016-01-14 15:51 ` [i-g-t PATCH 1/6] intel_bios_reader: pass bdb pointer around instead of having as global Jani Nikula
2016-01-14 15:51 ` [i-g-t PATCH 2/6] intel_bios_reader: fix size handling for 32-bit block size Jani Nikula
2016-01-14 15:51 ` [i-g-t PATCH 3/6] intel_bios_reader: make the VBT pointers more const Jani Nikula
2016-01-14 15:51 ` [i-g-t PATCH 4/6] intel_bios_reader: port find_panel_sequence_block from kernel Jani Nikula
2016-01-14 15:51 ` [i-g-t PATCH 5/6] intel_bios_reader: port the sequence block parsing " Jani Nikula
2016-01-14 15:51 ` [i-g-t PATCH 6/6] intel_bios_reader: dump MIPI sequence block v3 Jani Nikula
2016-01-14 15:57   ` [PATCH v2 " Jani Nikula
2016-01-15 13:26 ` [i-g-t PATCH 0/6] intel_bios_reader: support " Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.