tools/intel_vbt_decode: print child device count
PATCH 1/3 tools/intel_vbt_decode: print child device count
Sometimes useful.
--- tools/intel_vbt_decode.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
tools/intel_vbt_decode.c +6 -2
@@ -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); }
Signature · 6 lines
2.11.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 2/3 tools/intel_vbt_decode: add --header option to only print header
Sometimes it's useful just to print the VBT and BDB headers.
--- tools/intel_vbt_decode.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
tools/intel_vbt_decode.c +10 -1
@@ -1724,6 +1724,7 @@ enum opt {OPT_HEXDUMP ,OPT_BLOCK ,OPT_USAGE , + OPT_HEADER, };static void usage (const char *toolname)
@@ -1735,6 +1736,7 @@ static void usage(const char *toolname)" [--all-panels]" " [--hexdump]" " [--block=<block_no>]" +" [--header]" " [--help]\n"); }
@@ -1755,6 +1757,7 @@ int main(int argc, char **argv) };char *endp;int block_number =-1 ; +bool header_only = false;static struct option options[] = { {"file" , required_argument,NULL ,OPT_FILE },
@@ -1763,6 +1766,7 @@ int main(int argc, char **argv) { "all-panels", no_argument, NULL, OPT_ALL_PANELS }, { "hexdump", no_argument, NULL, OPT_HEXDUMP }, { "block", required_argument, NULL, OPT_BLOCK }, + { "header", no_argument, NULL, OPT_HEADER }, { "help", no_argument, NULL, OPT_USAGE }, { 0 } };
@@ -1803,6 +1807,9 @@ int main(int argc, char **argv)return EXIT_FAILURE ; }break ; +case OPT_HEADER : + header_only = true; +break ;case OPT_END :break ;case OPT_USAGE :/* fall-through */
@@ -1906,7 +1913,9 @@ int main(int argc, char **argv) context.panel_type =0 ; } -if (block_number !=-1 ) { +if (header_only) { +dump_headers (&context); + }else if (block_number !=-1 ) {/* dump specific section only */ if (!dump_section (&context, block_number)) {fprintf (stderr,"Block %d not found\n" , block_number);
Signature · 6 lines
2.11.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
PATCH 3/3 tools/intel_vbt_decode: add --describe option
In reply to Jani NikulaPrint description of the form <bdb-version>-<vbt-signature> that could be used for e.g. filenames.
--- tools/intel_vbt_decode.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-)
tools/intel_vbt_decode.c +38 -2
@@ -25,6 +25,7 @@* */ +#include <ctype.h> #include <errno.h> #include <fcntl.h> #include <getopt.h>
@@ -1662,6 +1663,33 @@ static bool dump_section(struct context *context, int section_id)return true; } +/* print a description of the VBT of the form <bdb-version>-<vbt-signature> */ +static void print_description (struct context *context) +{ +const struct vbt_header *vbt = context->vbt; +const struct bdb_header *bdb = context->bdb; +char *desc =strndup ((char *)vbt->signature,sizeof (vbt->signature)); +char *p; + +for (p = desc +strlen (desc) -1 ; p >= desc &&isspace (*p); p--) + *p ='\0' ; + +for (p = desc; *p; p++) { +if (!isalnum (*p)) + *p ='-' ; +else + *p =tolower (*p); + } + + p = desc; +if (strncmp (p,"-vbt-" ,5 ) ==0 ) + p +=5 ; + +printf ("%d-%s\n" , bdb->version, p); + +free (desc); +} +static void dump_headers (struct context *context) {const struct vbt_header *vbt = context->vbt;
@@ -1725,6 +1753,7 @@ enum opt {OPT_BLOCK ,OPT_USAGE ,OPT_HEADER , + OPT_DESCRIBE, };static void usage (const char *toolname)
@@ -1737,6 +1766,7 @@ static void usage(const char *toolname)" [--hexdump]" " [--block=<block_no>]" " [--header]" +" [--describe]" " [--help]\n"); }
@@ -1757,7 +1787,7 @@ int main(int argc, char **argv) };char *endp;int block_number =-1 ; -bool header_only = false; +bool header_only = false, describe = false;static struct option options[] = { {"file" , required_argument,NULL ,OPT_FILE },
@@ -1767,6 +1797,7 @@ int main(int argc, char **argv) { "hexdump", no_argument, NULL, OPT_HEXDUMP }, { "block", required_argument, NULL, OPT_BLOCK }, { "header", no_argument, NULL, OPT_HEADER }, + { "describe", no_argument, NULL, OPT_DESCRIBE }, { "help", no_argument, NULL, OPT_USAGE }, { 0 } };
@@ -1810,6 +1841,9 @@ int main(int argc, char **argv)case OPT_HEADER : header_only = true;break ; +case OPT_DESCRIBE : + describe = true; +break ;case OPT_END :break ;case OPT_USAGE :/* fall-through */
@@ -1913,7 +1947,9 @@ int main(int argc, char **argv) context.panel_type =0 ; } -if (header_only) { +if (describe) { +print_description (&context); + }else if (header_only) {dump_headers (&context); }else if (block_number !=-1 ) {/* dump specific section only */
Signature · 6 lines
2.11.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t 3/3] tools/intel_vbt_decode: add --describe option
Quoted 35 lines · Jani Nikula
Print description of the form <bdb-version>-<vbt-signature> that could be used for e.g. filenames.
Signed-off-by Jani Nikula <[email protected]>--- tools/intel_vbt_decode.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-)tools/intel_vbt_decode.c +12
-0@@ -25,6 +25,7 @@* */ +#include <ctype.h> #include <errno.h> #include <fcntl.h> #include <getopt.h> @@ -1662,6 +1663,33 @@ static bool dump_section(struct context *context, int section_id)return true; } +/* print a description of the VBT of the form <bdb-version>-<vbt-signature> */ +static void print_description (struct context *context) +{ +const struct vbt_header *vbt = context->vbt; +const struct bdb_header *bdb = context->bdb; +char *desc =strndup ((char *)vbt->signature,sizeof (vbt->signature)); +char *p; + +for (p = desc +strlen (desc) -1 ; p >= desc &&isspace (*p); p--) + *p ='\0' ; +
tools/intel_vbt_decode.c static bool dump_section(struct context *context, int section_id) · line 1686
Quoted 10 lines
tools/intel_vbt_decode.c +10
-0+for (p = desc; *p; p++) { +if (!isalnum (*p)) + *p ='-' ; +else + *p =tolower (*p); + } + + p = desc; +if (strncmp (p,"-vbt-" ,5 ) ==0 ) + p +=5 ;
Hmm. So this is getting rid of the "$VBT ". Maybe do that at the very beginning to make it a bit less obfuscated?
Either way series looks reasonable
Quoted 70 lines
tools/intel_vbt_decode.c +16
-2+ +printf ("%d-%s\n" , bdb->version, p); + +free (desc); +} +static void dump_headers (struct context *context) {const struct vbt_header *vbt = context->vbt;@@ -1725,6 +1753,7 @@ enum opt {OPT_BLOCK ,OPT_USAGE ,OPT_HEADER , + OPT_DESCRIBE, };static void usage (const char *toolname)@@ -1737,6 +1766,7 @@ static void usage(const char *toolname)" [--hexdump]" " [--block=<block_no>]" " [--header]" +" [--describe]" " [--help]\n"); }@@ -1757,7 +1787,7 @@ int main(int argc, char **argv) };char *endp;int block_number =-1 ; -bool header_only = false; +bool header_only = false, describe = false;static struct option options[] = { {"file" , required_argument,NULL ,OPT_FILE },@@ -1767,6 +1797,7 @@ int main(int argc, char **argv) { "hexdump", no_argument, NULL, OPT_HEXDUMP }, { "block", required_argument, NULL, OPT_BLOCK }, { "header", no_argument, NULL, OPT_HEADER }, + { "describe", no_argument, NULL, OPT_DESCRIBE }, { "help", no_argument, NULL, OPT_USAGE }, { 0 } };@@ -1810,6 +1841,9 @@ int main(int argc, char **argv)case OPT_HEADER : header_only = true;break ; +case OPT_DESCRIBE : + describe = true; +break ;case OPT_END :break ;case OPT_USAGE :/* fall-through */ @@ -1913,7 +1947,9 @@ int main(int argc, char **argv) context.panel_type =0 ; } -if (header_only) { +if (describe) { +print_description (&context); + }else if (header_only) {dump_headers (&context); }else if (block_number !=-1 ) {/* dump specific section only */ Signature · 6 lines
2.11.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] tools/intel_vbt_decode: print child device count
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/3] tools/intel_vbt_decode: print child device count
URL : https://patchwork.freedesktop.org/series/36966/
State : success
== Summary ==
IGT patchset tested on top of latest successful build cb2e65dae7e8ca3f388f43aeec3e7d7dc5d2cfb4 man: Update for new igt-dev mailing list
with latest DRM-Tip kernel build CI_DRM_3673cbdcbeb1eb09 drm-tip: 2018y-01m-23d-13h-00m-40s UTC integration manifest
No testlist changes.
Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989
pass -> INCOMPLETE (fi-snb-2520m) fdo#103713fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:422s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:427s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:370s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:490s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:283s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:484s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:488s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:477s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:459s fi-elk-e7500 total:224 pass:168 dwarn:10 dfail:0 fail:0 skip:45 fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:278s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:518s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:397s fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:399s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:415s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:457s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:415s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:461s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:499s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:499s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:592s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:434s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:517s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:531s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:498s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:482s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:418s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:435s fi-snb-2520m total:3 pass:2 dwarn:0 dfail:0 fail:0 skip:0 fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:403s Blacklisted hosts: fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:578s fi-glk-dsi total:54 pass:46 dwarn:0 dfail:0 fail:0 skip:7
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_815/issues.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Re: [igt-dev] [PATCH i-g-t 3/3] tools/intel_vbt_decode: add --describe option
In reply to Ville SyrjäläQuoted 41 lines · Ville Syrjälä
Quoted 40 lines · Jani Nikula
Print description of the form <bdb-version>-<vbt-signature> that could be used for e.g. filenames.
Signed-off-by Jani Nikula <[email protected]>--- tools/intel_vbt_decode.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-)tools/intel_vbt_decode.c +17
-0@@ -25,6 +25,7 @@* */ +#include <ctype.h> #include <errno.h> #include <fcntl.h> #include <getopt.h> @@ -1662,6 +1663,33 @@ static bool dump_section(struct context *context, int section_id)return true; } +/* print a description of the VBT of the form <bdb-version>-<vbt-signature> */ +static void print_description (struct context *context) +{ +const struct vbt_header *vbt = context->vbt; +const struct bdb_header *bdb = context->bdb; +char *desc =strndup ((char *)vbt->signature,sizeof (vbt->signature)); +char *p; + +for (p = desc +strlen (desc) -1 ; p >= desc &&isspace (*p); p--) + *p ='\0' ; + +for (p = desc; *p; p++) { +if (!isalnum (*p)) + *p ='-' ; +else + *p =tolower (*p);
Quoted 8 lines
tools/intel_vbt_decode.c static bool dump_section(struct context *context, int section_id) · line 1686
Quoted 5 lines
tools/intel_vbt_decode.c +5
-0+ } + + p = desc; +if (strncmp (p,"-vbt-" ,5 ) ==0 ) + p +=5 ;Hmm. So this is getting rid of the "$VBT ". Maybe do that at the very beginning to make it a bit less obfuscated?
I've written this a while back actually, so didn't touch it now, and pushed as-is. Can be improved later if it starts bugging us. ;)
Thanks for the review.
BR,
Jani.
Quoted 74 lines
Either way series looks reasonable
Reviewed-by Ville Syrjälä <[email protected]>Quoted 70 lines
tools/intel_vbt_decode.c +16
-2+ +printf ("%d-%s\n" , bdb->version, p); + +free (desc); +} +static void dump_headers (struct context *context) {const struct vbt_header *vbt = context->vbt;@@ -1725,6 +1753,7 @@ enum opt {OPT_BLOCK ,OPT_USAGE ,OPT_HEADER , + OPT_DESCRIBE, };static void usage (const char *toolname)@@ -1737,6 +1766,7 @@ static void usage(const char *toolname)" [--hexdump]" " [--block=<block_no>]" " [--header]" +" [--describe]" " [--help]\n"); }@@ -1757,7 +1787,7 @@ int main(int argc, char **argv) };char *endp;int block_number =-1 ; -bool header_only = false; +bool header_only = false, describe = false;static struct option options[] = { {"file" , required_argument,NULL ,OPT_FILE },@@ -1767,6 +1797,7 @@ int main(int argc, char **argv) { "hexdump", no_argument, NULL, OPT_HEXDUMP }, { "block", required_argument, NULL, OPT_BLOCK }, { "header", no_argument, NULL, OPT_HEADER }, + { "describe", no_argument, NULL, OPT_DESCRIBE }, { "help", no_argument, NULL, OPT_USAGE }, { 0 } };@@ -1810,6 +1841,9 @@ int main(int argc, char **argv)case OPT_HEADER : header_only = true;break ; +case OPT_DESCRIBE : + describe = true; +break ;case OPT_END :break ;case OPT_USAGE :/* fall-through */ @@ -1913,7 +1947,9 @@ int main(int argc, char **argv) context.panel_type =0 ; } -if (header_only) { +if (describe) { +print_description (&context); + }else if (header_only) {dump_headers (&context); }else if (block_number !=-1 ) {/* dump specific section only */ Signature · 6 lines
2.11.0 _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ igt-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/igt-dev
Patchwork
CI[igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/3] tools/intel_vbt_decode: print child device count
In reply to Jani Nikula== Series Details ==
== Series Details ==
Series: series starting with [i-g-t,1/3] tools/intel_vbt_decode: print child device count
URL : https://patchwork.freedesktop.org/series/36966/
State : success
== Summary ==
Warning: bzip IGTPW_815/shard-kbl6/results8.json.bz2 wasn't in correct JSON format Test kms_flip:
Subgroup vblank-vs-dpms-suspend:
incomplete -> PASS (shard-hsw) fdo#103540 +1
Subgroup vblank-vs-suspend-interruptible:
pass -> INCOMPLETE (shard-hsw) fdo#100368
Subgroup vblank-vs-modeset-suspend:
pass -> SKIP (shard-snb) fdo#102365
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047
Test kms_vblank:
Subgroup query-busy:
skip -> PASS (shard-snb)
Subgroup query-forked-busy:
skip -> PASS (shard-snb)
Test kms_rotation_crc:
Subgroup sprite-rotation-90-pos-100-0:
pass -> DMESG-WARN (shard-apl) fdo#103356
Test gem_eio:
Subgroup in-flight-external:
fail -> PASS (shard-hsw) fdo#104676 +1
Test kms_busy:
Subgroup extended-pageflip-hang-newfb-render-b:
skip -> PASS (shard-snb)
Test perf:
Subgroup enable-disable:
pass -> FAIL (shard-apl) fdo#103715fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#103356 https://bugs.freedesktop.org/show_bug.cgi?id=103356
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#103715 https://bugs.freedesktop.org/show_bug.cgi?id=103715
shard-apl total:2753 pass:1715 dwarn:2 dfail:0 fail:23 skip:1013 time:14005s shard-hsw total:2735 pass:1711 dwarn:1 dfail:0 fail:11 skip:1010 time:14879s shard-snb total:2753 pass:1318 dwarn:1 dfail:0 fail:10 skip:1424 time:7895s
Blacklisted hosts:
shard-kbl total:2625 pass:1720 dwarn:24 dfail:1 fail:20 skip:859 time:10040s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_815/shards.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev