diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-09-21 17:50:36 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-09-21 18:20:19 +0900 |
commit | 3fc839ff49f01c24eb94d5e1f0ab4065de47bc17 (patch) | |
tree | 644417f0311edc1a4d211b0c445a143fed31835d /src/pcidb | |
parent | 9a5eb1915a240e3021ac38a6dacafef81e7bb743 (diff) |
Only list each unique chipset family once in the log file
(Ported from amdgpu commit 6a1ba044c2b71081e6060d0c096917d6238f2145)
Diffstat (limited to 'src/pcidb')
-rwxr-xr-x | src/pcidb/parse_pci_ids.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pcidb/parse_pci_ids.pl b/src/pcidb/parse_pci_ids.pl index 45009508..f78e207e 100755 --- a/src/pcidb/parse_pci_ids.pl +++ b/src/pcidb/parse_pci_ids.pl @@ -16,6 +16,8 @@ my $radeonpcidevicematchfile = 'radeon_pci_device_match_gen.h'; my $radeonchipsetfile = 'radeon_chipset_gen.h'; my $radeonchipinfofile = 'radeon_chipinfo_gen.h'; +my %uniquechipsets; + my $csv = Text::CSV_XS->new(); open (CSV, "<", $file) or die $!; @@ -48,6 +50,7 @@ while (<CSV>) { print PCIDEVICEMATCH " ATI_DEVICE_MATCH( PCI_CHIP_$columns[1], 0 ),\n"; print RADEONCHIPSET " { PCI_CHIP_$columns[1], \"$columns[8]\" },\n"; + $uniquechipsets{$columns[8]} = 1; print RADEONCHIPINFO " { $columns[0], CHIP_FAMILY_$columns[2], "; @@ -91,6 +94,10 @@ while (<CSV>) { } print RADEONCHIPINFO "};\n"; +print RADEONCHIPSET " { -1, NULL }\n};\n\nSymTabRec RADEONUniqueChipsets[] = {\n"; +foreach (sort keys %uniquechipsets) { + print RADEONCHIPSET " { 0, \"$_\" },\n"; +} print RADEONCHIPSET " { -1, NULL }\n};\n"; print PCICHIPSET " { -1, -1, RES_UNDEFINED }\n};\n"; print PCIDEVICEMATCH " { 0, 0, 0 }\n};\n"; |