summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-08-29 16:43:59 +0900
committerMichel Dänzer <michel@daenzer.net>2016-08-30 16:54:16 +0900
commit6a1ba044c2b71081e6060d0c096917d6238f2145 (patch)
treef826f4074fc70ff4b4670cb3e6adf01eb5663f69
parent7d050d15d49ef25e86e7abe88dafb52370715640 (diff)
Only list each unique chipset family once in the log file
Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/amdgpu_chipset_gen.h21
-rw-r--r--src/amdgpu_probe.c2
-rwxr-xr-xsrc/pcidb/parse_pci_ids.pl7
3 files changed, 29 insertions, 1 deletions
diff --git a/src/amdgpu_chipset_gen.h b/src/amdgpu_chipset_gen.h
index 30e5d24..3bfab87 100644
--- a/src/amdgpu_chipset_gen.h
+++ b/src/amdgpu_chipset_gen.h
@@ -193,3 +193,24 @@ SymTabRec AMDGPUChipsets[] = {
{ PCI_CHIP_POLARIS10_67CF, "POLARIS10" },
{ -1, NULL }
};
+
+SymTabRec AMDGPUUniqueChipsets[] = {
+ { 0, "BONAIRE" },
+ { 0, "CARRIZO" },
+ { 0, "FIJI" },
+ { 0, "HAINAN" },
+ { 0, "HAWAII" },
+ { 0, "KABINI" },
+ { 0, "KAVERI" },
+ { 0, "MULLINS" },
+ { 0, "OLAND" },
+ { 0, "PITCAIRN" },
+ { 0, "POLARIS10" },
+ { 0, "POLARIS11" },
+ { 0, "STONEY" },
+ { 0, "TAHITI" },
+ { 0, "TONGA" },
+ { 0, "TOPAZ" },
+ { 0, "VERDE" },
+ { -1, NULL }
+};
diff --git a/src/amdgpu_probe.c b/src/amdgpu_probe.c
index 1c32742..213d245 100644
--- a/src/amdgpu_probe.c
+++ b/src/amdgpu_probe.c
@@ -77,7 +77,7 @@ static const OptionInfoRec *AMDGPUAvailableOptions(int chipid, int busid)
static void AMDGPUIdentify(int flags)
{
xf86PrintChipsets(AMDGPU_NAME,
- "Driver for AMD Radeon chipsets", AMDGPUChipsets);
+ "Driver for AMD Radeon chipsets", AMDGPUUniqueChipsets);
}
static char *amdgpu_bus_id(ScrnInfoPtr pScrn, struct pci_device *dev)
diff --git a/src/pcidb/parse_pci_ids.pl b/src/pcidb/parse_pci_ids.pl
index 06a9e1e..9b6c6f2 100755
--- a/src/pcidb/parse_pci_ids.pl
+++ b/src/pcidb/parse_pci_ids.pl
@@ -16,6 +16,8 @@ my $amdgpupcidevicematchfile = 'amdgpu_pci_device_match_gen.h';
my $amdgpuchipsetfile = 'amdgpu_chipset_gen.h';
my $amdgpuchipinfofile = 'amdgpu_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 AMDGPUCHIPSET " { PCI_CHIP_$columns[1], \"$columns[3]\" },\n";
+ $uniquechipsets{$columns[3]} = 1;
print AMDGPUCHIPINFO " { $columns[0], CHIP_FAMILY_$columns[2] },\n";
}
@@ -59,6 +62,10 @@ while (<CSV>) {
}
print AMDGPUCHIPINFO "};\n";
+print AMDGPUCHIPSET " { -1, NULL }\n};\n\nSymTabRec AMDGPUUniqueChipsets[] = {\n";
+foreach (sort keys %uniquechipsets) {
+ print AMDGPUCHIPSET " { 0, \"$_\" },\n";
+}
print AMDGPUCHIPSET " { -1, NULL }\n};\n";
print PCICHIPSET " { -1, -1, RES_UNDEFINED }\n};\n";
print PCIDEVICEMATCH " { 0, 0, 0 }\n};\n";