Only list each unique chipset family once in the log file
PATCH 1/1 Only list each unique chipset family once in the log file
From: Michel Dänzer <[email protected]>
--- src/amdgpu_chipset_gen.h | 21 +++++++++++++++++++++ src/amdgpu_probe.c | 2 +- src/pcidb/parse_pci_ids.pl | 9 +++++++++ 3 files changed, 31 insertions(+), 1 deletion(-)
src/amdgpu_chipset_gen.h +21 -0
@@ -193,3 +193,24 @@ SymTabRec AMDGPUChipsets[] = { { PCI_CHIP_POLARIS10_67CF, "POLARIS10" }, { -1, NULL } }; + +SymTabRec AMDGPUUniqueChipsets[] = { + {PCI_CHIP_BONAIRE_6640 ,"BONAIRE" }, + {PCI_CHIP_CARRIZO_9870 ,"CARRIZO" }, + {PCI_CHIP_FIJI_7300 ,"FIJI" }, + {PCI_CHIP_HAINAN_6660 ,"HAINAN" }, + {PCI_CHIP_HAWAII_67A0 ,"HAWAII" }, + {PCI_CHIP_KABINI_9830 ,"KABINI" }, + {PCI_CHIP_KAVERI_1304 ,"KAVERI" }, + {PCI_CHIP_MULLINS_9850 ,"MULLINS" }, + {PCI_CHIP_OLAND_6600 ,"OLAND" }, + {PCI_CHIP_PITCAIRN_6800 ,"PITCAIRN" }, + {PCI_CHIP_POLARIS10_67C0 ,"POLARIS10" }, + {PCI_CHIP_POLARIS11_67E0 ,"POLARIS11" }, + {PCI_CHIP_STONEY_98E4 ,"STONEY" }, + {PCI_CHIP_TAHITI_6780 ,"TAHITI" }, + {PCI_CHIP_TONGA_6920 ,"TONGA" }, + {PCI_CHIP_TOPAZ_6900 ,"TOPAZ" }, + {PCI_CHIP_VERDE_6820 ,"VERDE" }, + {-1 ,NULL } +};
src/amdgpu_probe.c +1 -1
@@ -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)
src/pcidb/parse_pci_ids.pl +9 -0
@@ -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,9 @@ while (<CSV>) { print PCIDEVICEMATCH " ATI_DEVICE_MATCH( PCI_CHIP_$columns[1], 0 ),\n"; print AMDGPUCHIPSET " { PCI_CHIP_$columns[1], \"$columns[3]\" },\n"; + if (!$uniquechipsets{$columns[3]}) { + $uniquechipsets{$columns[3]} = $columns[1]; + } print AMDGPUCHIPINFO " { $columns[0], CHIP_FAMILY_$columns[2] },\n"; }
@@ -59,6 +64,10 @@ while (<CSV>) { } print AMDGPUCHIPINFO "};\n"; +print AMDGPUCHIPSET " { -1, NULL }\n};\n\nSymTabRec AMDGPUUniqueChipsets[] = {\n"; +foreach (sort keys %uniquechipsets) { + print AMDGPUCHIPSET " { PCI_CHIP_$uniquechipsets{$_}, \"$_\" },\n"; +} print AMDGPUCHIPSET " { -1, NULL }\n};\n"; print PCICHIPSET " { -1, -1, RES_UNDEFINED }\n};\n"; print PCIDEVICEMATCH " { 0, 0, 0 }\n};\n";
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20160829074629.3171-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
PATCH v2 1/1 Only list each unique chipset family once in the log file
From: Michel Dänzer <[email protected]>
---
v2: Don't bother making up PCI IDs for the AMDGPUUniqueChipsets array,
they're not used anyway.
src/amdgpu_chipset_gen.h | 21 +++++++++++++++++++++ src/amdgpu_probe.c | 2 +- src/pcidb/parse_pci_ids.pl | 9 +++++++++ 3 files changed, 31 insertions(+), 1 deletion(-)
src/amdgpu_chipset_gen.h +21 -0
@@ -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 } +};
src/amdgpu_probe.c +1 -1
@@ -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)
src/pcidb/parse_pci_ids.pl +9 -0
@@ -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,9 @@ while (<CSV>) { print PCIDEVICEMATCH " ATI_DEVICE_MATCH( PCI_CHIP_$columns[1], 0 ),\n"; print AMDGPUCHIPSET " { PCI_CHIP_$columns[1], \"$columns[3]\" },\n"; + if (!$uniquechipsets{$columns[3]}) { + $uniquechipsets{$columns[3]} = $columns[1]; + } print AMDGPUCHIPINFO " { $columns[0], CHIP_FAMILY_$columns[2] },\n"; }
@@ -59,6 +64,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";
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20160829075248.3667-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
PATCH v3 1/1 Only list each unique chipset family once in the log file
From: Michel Dänzer <[email protected]>
---
v3: Simplify slightly by just setting all hash values to 1.
src/amdgpu_chipset_gen.h | 21 +++++++++++++++++++++ src/amdgpu_probe.c | 2 +- src/pcidb/parse_pci_ids.pl | 7 +++++++ 3 files changed, 29 insertions(+), 1 deletion(-)
src/amdgpu_chipset_gen.h +21 -0
@@ -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 } +};
src/amdgpu_probe.c +1 -1
@@ -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)
src/pcidb/parse_pci_ids.pl +7 -0
@@ -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";
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20160829075530.3766-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Am 29.08.2016 um 09:55 schrieb Michel Dänzer:
Quoted 3 lines
From: Michel Dänzer <[email protected]>
Signed-off-by Michel Dänzer <[email protected]>
Yes, please the output was a bit annoying.
Since I'm normally not working on the DDX the patch is only Acked-by: Christian König <[email protected]>.
Regards,
Christian.
Quoted 73 lines
---
v3: Simplify slightly by just setting all hash values to 1.
src/amdgpu_chipset_gen.h | 21 +++++++++++++++++++++ src/amdgpu_probe.c | 2 +- src/pcidb/parse_pci_ids.pl | 7 +++++++ 3 files changed, 29 insertions(+), 1 deletion(-)src/amdgpu_chipset_gen.h +21
-0@@ -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 } +};src/amdgpu_probe.c +1
-1@@ -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)src/pcidb/parse_pci_ids.pl +3
-0@@ -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"; }
src/pcidb/parse_pci_ids.pl while (<CSV>) { · line 71
Quoted 10 lines
src/pcidb/parse_pci_ids.pl +4
-0@@ -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";
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Monday, August 29, 2016 3:56 AM
To: [email protected]
Subject: [PATCH v3 xf86-video-amdgpu] Only list each unique chipset family once in the log file
Quoted 6 lines
From: Michel Dänzer <[email protected]>
Signed-off-by Michel Dänzer <[email protected]>---
v3: Simplify slightly by just setting all hash values to 1.
I should make sure I've read all my new emails before reviewing.
Quoted 91 lines
src/amdgpu_chipset_gen.h | 21 +++++++++++++++++++++ src/amdgpu_probe.c | 2 +- src/pcidb/parse_pci_ids.pl | 7 +++++++ 3 files changed, 29 insertions(+), 1 deletion(-)src/amdgpu_chipset_gen.h +21
-0@@ -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 } +};src/amdgpu_probe.c +1
-1@@ -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)src/pcidb/parse_pci_ids.pl +2
-0@@ -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 $!;
src/pcidb/parse_pci_ids.pl +1
-0@@ -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"; }src/pcidb/parse_pci_ids.pl +4
-0@@ -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";
--
2.9.3
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 11 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Monday, August 29, 2016 3:53 AM
To: [email protected]
Subject: [PATCH v2 xf86-video-amdgpu] Only list each unique chipset family once in the log fileFrom: Michel Dänzer <[email protected]>
Signed-off-by Michel Dänzer <[email protected]>
Quoted 97 lines
---
v2: Don't bother making up PCI IDs for the AMDGPUUniqueChipsets array,
they're not used anyway.src/amdgpu_chipset_gen.h | 21 +++++++++++++++++++++ src/amdgpu_probe.c | 2 +- src/pcidb/parse_pci_ids.pl | 9 +++++++++ 3 files changed, 31 insertions(+), 1 deletion(-)src/amdgpu_chipset_gen.h +21
-0@@ -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 } +};src/amdgpu_probe.c +1
-1@@ -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)src/pcidb/parse_pci_ids.pl +2
-0@@ -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 $!;
src/pcidb/parse_pci_ids.pl +3
-0@@ -48,6 +50,9 @@ while (<CSV>) { print PCIDEVICEMATCH " ATI_DEVICE_MATCH( PCI_CHIP_$columns[1], 0 ),\n"; print AMDGPUCHIPSET " { PCI_CHIP_$columns[1], \"$columns[3]\" },\n"; + if (!$uniquechipsets{$columns[3]}) { + $uniquechipsets{$columns[3]} = $columns[1]; + }print AMDGPUCHIPINFO " { $columns[0], CHIP_FAMILY_$columns[2]
},\n"; }src/pcidb/parse_pci_ids.pl +4
-0@@ -59,6 +64,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";
--
2.9.3
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 11 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Monday, August 29, 2016 3:46 AM
To: [email protected]
Subject: [PATCH xf86-video-amdgpu] Only list each unique chipset family once in the log fileFrom: Michel Dänzer <[email protected]>
Signed-off-by Michel Dänzer <[email protected]>
Quoted 94 lines
--- src/amdgpu_chipset_gen.h | 21 +++++++++++++++++++++ src/amdgpu_probe.c | 2 +- src/pcidb/parse_pci_ids.pl | 9 +++++++++ 3 files changed, 31 insertions(+), 1 deletion(-)src/amdgpu_chipset_gen.h +21
-0@@ -193,3 +193,24 @@ SymTabRec AMDGPUChipsets[] = { { PCI_CHIP_POLARIS10_67CF, "POLARIS10" }, { -1, NULL } }; + +SymTabRec AMDGPUUniqueChipsets[] = { + {PCI_CHIP_BONAIRE_6640 ,"BONAIRE" }, + {PCI_CHIP_CARRIZO_9870 ,"CARRIZO" }, + {PCI_CHIP_FIJI_7300 ,"FIJI" }, + {PCI_CHIP_HAINAN_6660 ,"HAINAN" }, + {PCI_CHIP_HAWAII_67A0 ,"HAWAII" }, + {PCI_CHIP_KABINI_9830 ,"KABINI" }, + {PCI_CHIP_KAVERI_1304 ,"KAVERI" }, + {PCI_CHIP_MULLINS_9850 ,"MULLINS" }, + {PCI_CHIP_OLAND_6600 ,"OLAND" }, + {PCI_CHIP_PITCAIRN_6800 ,"PITCAIRN" }, + {PCI_CHIP_POLARIS10_67C0 ,"POLARIS10" }, + {PCI_CHIP_POLARIS11_67E0 ,"POLARIS11" }, + {PCI_CHIP_STONEY_98E4 ,"STONEY" }, + {PCI_CHIP_TAHITI_6780 ,"TAHITI" }, + {PCI_CHIP_TONGA_6920 ,"TONGA" }, + {PCI_CHIP_TOPAZ_6900 ,"TOPAZ" }, + {PCI_CHIP_VERDE_6820 ,"VERDE" }, + {-1 ,NULL } +};src/amdgpu_probe.c +1
-1@@ -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)src/pcidb/parse_pci_ids.pl +2
-0@@ -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 $!;
src/pcidb/parse_pci_ids.pl +3
-0@@ -48,6 +50,9 @@ while (<CSV>) { print PCIDEVICEMATCH " ATI_DEVICE_MATCH( PCI_CHIP_$columns[1], 0 ),\n"; print AMDGPUCHIPSET " { PCI_CHIP_$columns[1], \"$columns[3]\" },\n"; + if (!$uniquechipsets{$columns[3]}) { + $uniquechipsets{$columns[3]} = $columns[1]; + }print AMDGPUCHIPINFO " { $columns[0], CHIP_FAMILY_$columns[2]
},\n"; }src/pcidb/parse_pci_ids.pl +4
-0@@ -59,6 +64,10 @@ while (<CSV>) { } print AMDGPUCHIPINFO "};\n"; +print AMDGPUCHIPSET " { -1, NULL }\n};\n\nSymTabRec AMDGPUUniqueChipsets[] = {\n"; +foreach (sort keys %uniquechipsets) { + print AMDGPUCHIPSET " { PCI_CHIP_$uniquechipsets{$_}, \"$_\" },\n"; +} print AMDGPUCHIPSET " { -1, NULL }\n};\n";print PCICHIPSET " { -1, -1,
RES_UNDEFINED}\n};\n";
print PCIDEVICEMATCH " { 0, 0, 0 }\n};\n";
--
2.9.3
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx