Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 1/3] tools/intel_vbt_decode: print child device count
Date: Tue, 23 Jan 2018 12:54:30 +0200	[thread overview]
Message-ID: <20180123105432.15094-1-jani.nikula@intel.com> (raw)

Sometimes useful.

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

diff --git a/tools/intel_vbt_decode.c b/tools/intel_vbt_decode.c
index ce7da2c0c40f..c2d505330fd1 100644
--- a/tools/intel_vbt_decode.c
+++ b/tools/intel_vbt_decode.c
@@ -513,6 +513,8 @@ static void dump_general_definitions(struct context *context,
 	const struct bdb_general_definitions *defs = block->data;
 	int child_dev_num;
 
+	child_dev_num = (block->size - sizeof(*defs)) / defs->child_dev_size;
+
 	printf("\tCRT DDC GMBUS addr: 0x%02x\n", defs->crt_ddc_gmbus_pin);
 	printf("\tUse ACPI DPMS CRT power states: %s\n",
 	       YESNO(defs->dpms_acpi));
@@ -522,8 +524,8 @@ static void dump_general_definitions(struct context *context,
 	printf("\tBoot display type: 0x%02x%02x\n", defs->boot_display[1],
 	       defs->boot_display[0]);
 	printf("\tChild device size: %d\n", defs->child_dev_size);
+	printf("\tChild device count: %d\n", child_dev_num);
 
-	child_dev_num = (block->size - sizeof(*defs)) / defs->child_dev_size;
 	dump_child_devices(context, defs->devices,
 			   child_dev_num, defs->child_dev_size);
 }
@@ -534,9 +536,11 @@ static void dump_legacy_child_devices(struct context *context,
 	const struct bdb_legacy_child_devices *defs = block->data;
 	int child_dev_num;
 
+	child_dev_num = (block->size - sizeof(*defs)) / defs->child_dev_size;
+
 	printf("\tChild device size: %d\n", defs->child_dev_size);
+	printf("\tChild device count: %d\n", child_dev_num);
 
-	child_dev_num = (block->size - sizeof(*defs)) / defs->child_dev_size;
 	dump_child_devices(context, defs->devices,
 			   child_dev_num, defs->child_dev_size);
 }
-- 
2.11.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2018-01-23 10:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 10:54 Jani Nikula [this message]
2018-01-23 10:54 ` [igt-dev] [PATCH i-g-t 2/3] tools/intel_vbt_decode: add --header option to only print header Jani Nikula
2018-01-23 10:54 ` [igt-dev] [PATCH i-g-t 3/3] tools/intel_vbt_decode: add --describe option Jani Nikula
2018-01-23 13:47   ` Ville Syrjälä
2018-01-23 14:58     ` Jani Nikula
2018-01-23 13:51 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tools/intel_vbt_decode: print child device count Patchwork
2018-01-23 18:18 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180123105432.15094-1-jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox