All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH xf86-video-amdgpu] Only list each unique chipset family once in the log file
@ 2016-08-29  7:46 Michel Dänzer
       [not found] ` <20160829074629.3171-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Michel Dänzer @ 2016-08-29  7:46 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Michel Dänzer <michel.daenzer@amd.com>

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 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(-)

diff --git a/src/amdgpu_chipset_gen.h b/src/amdgpu_chipset_gen.h
index 30e5d24..786b0f2 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[] = {
+  { 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 }
+};
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..110d021 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,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";
-- 
2.9.3

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 xf86-video-amdgpu] Only list each unique chipset family once in the log file
       [not found] ` <20160829074629.3171-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2016-08-29  7:52   ` Michel Dänzer
       [not found]     ` <20160829075248.3667-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  2016-08-29 13:30   ` [PATCH " Deucher, Alexander
  1 sibling, 1 reply; 7+ messages in thread
From: Michel Dänzer @ 2016-08-29  7:52 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Michel Dänzer <michel.daenzer@amd.com>

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---

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(-)

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..6b1217c 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,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";
-- 
2.9.3

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 xf86-video-amdgpu] Only list each unique chipset family once in the log file
       [not found]     ` <20160829075248.3667-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2016-08-29  7:55       ` Michel Dänzer
       [not found]         ` <20160829075530.3766-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  2016-08-29 13:31       ` [PATCH v2 " Deucher, Alexander
  1 sibling, 1 reply; 7+ messages in thread
From: Michel Dänzer @ 2016-08-29  7:55 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Michel Dänzer <michel.daenzer@amd.com>

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---

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(-)

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";
-- 
2.9.3

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 xf86-video-amdgpu] Only list each unique chipset family once in the log file
       [not found]         ` <20160829075530.3766-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2016-08-29  8:22           ` Christian König
  2016-08-29 13:33           ` Deucher, Alexander
  1 sibling, 0 replies; 7+ messages in thread
From: Christian König @ 2016-08-29  8:22 UTC (permalink / raw)
  To: Michel Dänzer, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 29.08.2016 um 09:55 schrieb Michel Dänzer:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

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 <christian.koenig@amd.com>.

Regards,
Christian.

> ---
>
> 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(-)
>
> 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";


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH xf86-video-amdgpu] Only list each unique chipset family once in the log file
       [not found] ` <20160829074629.3171-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  2016-08-29  7:52   ` [PATCH v2 " Michel Dänzer
@ 2016-08-29 13:30   ` Deucher, Alexander
  1 sibling, 0 replies; 7+ messages in thread
From: Deucher, Alexander @ 2016-08-29 13:30 UTC (permalink / raw)
  To: 'Michel Dänzer', amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Monday, August 29, 2016 3:46 AM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH xf86-video-amdgpu] Only list each unique chipset family
> once in the log file
> 
> From: Michel Dänzer <michel.daenzer@amd.com>
> 
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  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(-)
> 
> diff --git a/src/amdgpu_chipset_gen.h b/src/amdgpu_chipset_gen.h
> index 30e5d24..786b0f2 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[] = {
> +  { 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 }
> +};
> 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..110d021 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,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";
> --
> 2.9.3
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH v2 xf86-video-amdgpu] Only list each unique chipset family once in the log file
       [not found]     ` <20160829075248.3667-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  2016-08-29  7:55       ` [PATCH v3 " Michel Dänzer
@ 2016-08-29 13:31       ` Deucher, Alexander
  1 sibling, 0 replies; 7+ messages in thread
From: Deucher, Alexander @ 2016-08-29 13:31 UTC (permalink / raw)
  To: 'Michel Dänzer', amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Monday, August 29, 2016 3:53 AM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH v2 xf86-video-amdgpu] Only list each unique chipset family
> once in the log file
> 
> From: Michel Dänzer <michel.daenzer@amd.com>
> 
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
> 
> 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(-)
> 
> 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..6b1217c 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,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";
> --
> 2.9.3
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH v3 xf86-video-amdgpu] Only list each unique chipset family once in the log file
       [not found]         ` <20160829075530.3766-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  2016-08-29  8:22           ` Christian König
@ 2016-08-29 13:33           ` Deucher, Alexander
  1 sibling, 0 replies; 7+ messages in thread
From: Deucher, Alexander @ 2016-08-29 13:33 UTC (permalink / raw)
  To: 'Michel Dänzer', amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Monday, August 29, 2016 3:56 AM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH v3 xf86-video-amdgpu] Only list each unique chipset family
> once in the log file
> 
> From: Michel Dänzer <michel.daenzer@amd.com>
> 
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
> ---
> 
> v3: Simplify slightly by just setting all hash values to 1.

I should make sure I've read all my new emails before reviewing.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> 
>  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(-)
> 
> 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";
> --
> 2.9.3
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-08-29 13:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29  7:46 [PATCH xf86-video-amdgpu] Only list each unique chipset family once in the log file Michel Dänzer
     [not found] ` <20160829074629.3171-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-08-29  7:52   ` [PATCH v2 " Michel Dänzer
     [not found]     ` <20160829075248.3667-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-08-29  7:55       ` [PATCH v3 " Michel Dänzer
     [not found]         ` <20160829075530.3766-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-08-29  8:22           ` Christian König
2016-08-29 13:33           ` Deucher, Alexander
2016-08-29 13:31       ` [PATCH v2 " Deucher, Alexander
2016-08-29 13:30   ` [PATCH " Deucher, Alexander

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.