Skip to contentSkip to conversation

drm/amdgpu/display: fix pci revision id fetching

PATCH In review Alex Deucher 3 participants 8 messages Feb 25, 2020 – Mar 6, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu/display: fix pci revision id fetching

From: Aly-Tawfik <[email protected]>

Use the pci revision id rather than the asic silicon revision id.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index 0c55d44c9d5b..92166150bf9f 100644
@@ -902,7 +902,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
 	init_data.asic_id.chip_family = adev->family;
 
-	init_data.asic_id.pci_revision_id = adev->rev_id;
+	init_data.asic_id.pci_revision_id = adev->pdev->revision;
 	init_data.asic_id.hw_internal_rev = adev->external_rev_id;
 
 	init_data.asic_id.vram_width = adev->gmc.vram_width;
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw

PATCH 2/2 drm/amdgpu/display: Fix Pollock Variant Detection

From: Aly-Tawfik <[email protected]>

Problem Description:
Currently we are checking internal fused rev id with pci rev id. However, fused internal rev id is the same on all raven2 parts (in which Dali and Pollock were based on too), thus Pollock detection fails

Fix:
use the pci rev to preform the detection for bandwidth calculations.

---
 drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c |  5 +++++
 .../gpu/drm/amd/display/include/dal_asic_id.h    | 16 ++++++----------
 2 files changed, 11 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +5 -0
index f0f07b160152..3960a8db94cb 100644
@@ -712,6 +712,11 @@ unsigned int get_highest_allowed_voltage_level(uint32_t hw_internal_rev, uint32_
 		case PRID_DALI_DF:
 		case PRID_DALI_E3:
 		case PRID_DALI_E4:
+		case PRID_POLLOCK_94:
+		case PRID_POLLOCK_95:
+		case PRID_POLLOCK_E9:
+		case PRID_POLLOCK_EA:
+		case PRID_POLLOCK_EB:
 			return 0;
 		default:
 			break;
drivers/gpu/drm/amd/display/include/dal_asic_id.h +6 -10
index ea7015f869c9..8a87d0ed90ae 100644
@@ -134,11 +134,6 @@
 #define PICASSO_A0 0x41
 /* DCN1_01 */
 #define RAVEN2_A0 0x81
-#define RAVEN2_15D8_REV_94 0x94
-#define RAVEN2_15D8_REV_95 0x95
-#define RAVEN2_15D8_REV_E9 0xE9
-#define RAVEN2_15D8_REV_EA 0xEA
-#define RAVEN2_15D8_REV_EB 0xEB
 #define RAVEN1_F0 0xF0
 #define RAVEN_UNKNOWN 0xFF
 #ifndef ASICREV_IS_RAVEN
@@ -149,16 +144,17 @@
 #define PRID_DALI_E3 0xE3
 #define PRID_DALI_E4 0xE4
 
+#define PRID_POLLOCK_94 0x94
+#define PRID_POLLOCK_95 0x95
+#define PRID_POLLOCK_E9 0xE9
+#define PRID_POLLOCK_EA 0xEA
+#define PRID_POLLOCK_EB 0xEB
+
 #define ASICREV_IS_PICASSO(eChipRev) ((eChipRev >= PICASSO_A0) && (eChipRev < RAVEN2_A0))
 #ifndef ASICREV_IS_RAVEN2
 #define ASICREV_IS_RAVEN2(eChipRev) ((eChipRev >= RAVEN2_A0) && (eChipRev < RENOIR_A0))
 #endif
 #define ASICREV_IS_RV1_F0(eChipRev) ((eChipRev >= RAVEN1_F0) && (eChipRev < RAVEN_UNKNOWN))
-#define ASICREV_IS_POLLOCK(eChipRev) (eChipRev == RAVEN2_15D8_REV_94 \
-		|| eChipRev == RAVEN2_15D8_REV_95 \
-			|| eChipRev == RAVEN2_15D8_REV_E9 \
-				|| eChipRev == RAVEN2_15D8_REV_EA \
-					|| eChipRev == RAVEN2_15D8_REV_EB)
 
 #define FAMILY_RV 142 /* DCN 1*/
 
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#2 lore raw

Re: [PATCH 2/2] drm/amdgpu/display: Fix Pollock Variant Detection

Ping?

Quoted 74 lines · Alex Deucher

From: Aly-Tawfik <[email protected]>

Problem Description:
Currently we are checking internal fused rev id with pci rev id. However, fused internal rev id is the same on all raven2 parts (in which Dali and Pollock were based on too), thus Pollock detection fails

Fix:
use the pci rev to preform the detection for bandwidth calculations.

---
 drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c |  5 +++++
 .../gpu/drm/amd/display/include/dal_asic_id.h    | 16 ++++++----------
 2 files changed, 11 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c +5 -0
index f0f07b160152..3960a8db94cb 100644
@@ -712,6 +712,11 @@ unsigned int get_highest_allowed_voltage_level(uint32_t hw_internal_rev, uint32_
                case PRID_DALI_DF:
                case PRID_DALI_E3:
                case PRID_DALI_E4:
+               case PRID_POLLOCK_94:
+               case PRID_POLLOCK_95:
+               case PRID_POLLOCK_E9:
+               case PRID_POLLOCK_EA:
+               case PRID_POLLOCK_EB:
                        return 0;
                default:
                        break;
drivers/gpu/drm/amd/display/include/dal_asic_id.h +6 -11
index ea7015f869c9..8a87d0ed90ae 100644
@@ -134,11 +134,6 @@
 #define PICASSO_A0 0x41
 /* DCN1_01 */
 #define RAVEN2_A0 0x81
-#define RAVEN2_15D8_REV_94 0x94
-#define RAVEN2_15D8_REV_95 0x95
-#define RAVEN2_15D8_REV_E9 0xE9
-#define RAVEN2_15D8_REV_EA 0xEA
-#define RAVEN2_15D8_REV_EB 0xEB
 #define RAVEN1_F0 0xF0
 #define RAVEN_UNKNOWN 0xFF
 #ifndef ASICREV_IS_RAVEN
@@ -149,16 +144,17 @@
 #define PRID_DALI_E3 0xE3
 #define PRID_DALI_E4 0xE4
 
+#define PRID_POLLOCK_94 0x94
+#define PRID_POLLOCK_95 0x95
+#define PRID_POLLOCK_E9 0xE9
+#define PRID_POLLOCK_EA 0xEA
+#define PRID_POLLOCK_EB 0xEB
+
 #define ASICREV_IS_PICASSO(eChipRev) ((eChipRev >= PICASSO_A0) && (eChipRev < RAVEN2_A0))
 #ifndef ASICREV_IS_RAVEN2
 #define ASICREV_IS_RAVEN2(eChipRev) ((eChipRev >= RAVEN2_A0) && (eChipRev < RENOIR_A0))
 #endif
 #define ASICREV_IS_RV1_F0(eChipRev) ((eChipRev >= RAVEN1_F0) && (eChipRev < RAVEN_UNKNOWN))
-#define ASICREV_IS_POLLOCK(eChipRev) (eChipRev == RAVEN2_15D8_REV_94 \
-               || eChipRev == RAVEN2_15D8_REV_95 \
-                       || eChipRev == RAVEN2_15D8_REV_E9 \
-                               || eChipRev == RAVEN2_15D8_REV_EA \
-                                       || eChipRev == RAVEN2_15D8_REV_EB)
 
 #define FAMILY_RV 142 /* DCN 1*/
 
--
Quoted 2 lines

2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw
In reply to Alex Deucher

Ping?

Quoted 25 lines · Alex Deucher

From: Aly-Tawfik <[email protected]>

Use the pci revision id rather than the asic silicon revision id.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -2
index 0c55d44c9d5b..92166150bf9f 100644
@@ -902,7 +902,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
        init_data.asic_id.chip_family = adev->family;
 
-       init_data.asic_id.pci_revision_id = adev->rev_id;
+       init_data.asic_id.pci_revision_id = adev->pdev->revision;
        init_data.asic_id.hw_internal_rev = adev->external_rev_id;
 
        init_data.asic_id.vram_width = adev->gmc.vram_width;
--
Quoted 2 lines

2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#4 lore raw

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2020年3月5日 13:23
To: amd-gfx list <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Tawfik, Aly <[email protected]>
Subject: Re: [PATCH 1/2] drm/amdgpu/display: fix pci revision id fetching

Ping?

Quoted 25 lines · Alex Deucher

From: Aly-Tawfik <[email protected]>

Use the pci revision id rather than the asic silicon revision id.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -2
index 0c55d44c9d5b..92166150bf9f 100644
@@ -902,7 +902,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
        init_data.asic_id.chip_family = adev->family;
 
-       init_data.asic_id.pci_revision_id = adev->rev_id;
+       init_data.asic_id.pci_revision_id = adev->pdev->revision;
        init_data.asic_id.hw_internal_rev = adev->external_rev_id;
 
        init_data.asic_id.vram_width = adev->gmc.vram_width;
--
Quoted 2 lines

2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CFeifei.Xu%40amd.com%7Cdd49232261ac4267a33f08d7c0c54ad8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637189825908683804&amp;sdata=sN%2BGSvrmnz5Qdrf4JR0sFUDWMWyu7tsOh6ZG9lb9I5Y%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

maintainer Reviewed-by Feifei Xu
#5 lore raw

[AMD Public Use]

Is this for the series, or just this patch? Thanks!

Alex
________________________________
From: Xu, Feifei <[email protected]>
Sent: Thursday, March 5, 2020 12:24 AM
To: Alex Deucher <[email protected]>; amd-gfx list <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Tawfik, Aly <[email protected]>
Subject: RE: [PATCH 1/2] drm/amdgpu/display: fix pci revision id fetching

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2020年3月5日 13:23
To: amd-gfx list <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Tawfik, Aly <[email protected]>
Subject: Re: [PATCH 1/2] drm/amdgpu/display: fix pci revision id fetching

Ping?

Quoted 25 lines · Alex Deucher

From: Aly-Tawfik <[email protected]>

Use the pci revision id rather than the asic silicon revision id.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -2
index 0c55d44c9d5b..92166150bf9f 100644
@@ -902,7 +902,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
        init_data.asic_id.chip_family = adev->family;
 
-       init_data.asic_id.pci_revision_id = adev->rev_id;
+       init_data.asic_id.pci_revision_id = adev->pdev->revision;
        init_data.asic_id.hw_internal_rev = adev->external_rev_id;
 
        init_data.asic_id.vram_width = adev->gmc.vram_width;
--
Quoted 2 lines

2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CFeifei.Xu%40amd.com%7Cdd49232261ac4267a33f08d7c0c54ad8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637189825908683804&amp;sdata=sN%2BGSvrmnz5Qdrf4JR0sFUDWMWyu7tsOh6ZG9lb9I5Y%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Reviewed-by Feifei Xu
#6 lore raw

[AMD Public Use]

Patch1, Patch2 are :

From: Deucher, Alexander <[email protected]>
Sent: 2020年3月6日 0:00
To: Xu, Feifei <[email protected]>; Alex Deucher <[email protected]>; amd-gfx list <[email protected]>
Cc: Tawfik, Aly <[email protected]>
Subject: Re: [PATCH 1/2] drm/amdgpu/display: fix pci revision id fetching

[AMD Public Use]

Is this for the series, or just this patch? Thanks!

Alex
________________________________
From: Xu, Feifei <[email protected]<mailto:[email protected]>>
Sent: Thursday, March 5, 2020 12:24 AM
To: Alex Deucher <[email protected]<mailto:[email protected]>>; amd-gfx list <[email protected]<mailto:[email protected]>>
Cc: Deucher, Alexander <[email protected]<mailto:[email protected]>>; Tawfik, Aly <[email protected]<mailto:[email protected]>>
Subject: RE: [PATCH 1/2] drm/amdgpu/display: fix pci revision id fetching

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: amd-gfx <[email protected]<mailto:[email protected]>> On Behalf Of Alex Deucher
Sent: 2020年3月5日 13:23
To: amd-gfx list <[email protected]<mailto:[email protected]>>
Cc: Deucher, Alexander <[email protected]<mailto:[email protected]>>; Tawfik, Aly <[email protected]<mailto:[email protected]>>
Subject: Re: [PATCH 1/2] drm/amdgpu/display: fix pci revision id fetching

Ping?

Quoted 25 lines · On Tue, Feb 25, 2020 at 3:32 PM Alex Deucher…

From: Aly-Tawfik <[email protected]<mailto:[email protected]>>

Use the pci revision id rather than the asic silicon revision id.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -2
index 0c55d44c9d5b..92166150bf9f 100644
@@ -902,7 +902,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
        init_data.asic_id.chip_family = adev->family;
 
-       init_data.asic_id.pci_revision_id = adev->rev_id;
+       init_data.asic_id.pci_revision_id = adev->pdev->revision;
        init_data.asic_id.hw_internal_rev = adev->external_rev_id;
 
        init_data.asic_id.vram_width = adev->gmc.vram_width;
--
Quoted 2 lines

2.24.1

_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CFeifei.Xu%40amd.com%7Cdd49232261ac4267a33f08d7c0c54ad8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637189825908683804&amp;sdata=sN%2BGSvrmnz5Qdrf4JR0sFUDWMWyu7tsOh6ZG9lb9I5Y%3D&amp;reserved=0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Feifei Xu Reviewed-by Feifei Xu
#7 lore raw

[AMD Public Use]

Patch3: Acked-by: Feifei Xu <[email protected]>

Regards,
Feifei

From: amd-gfx <[email protected]> On Behalf Of Xu, Feifei
Sent: 2020年3月6日 9:54
To: Deucher, Alexander <[email protected]>; Alex Deucher <[email protected]>; amd-gfx list <[email protected]>
Cc: Tawfik, Aly <[email protected]>
Subject: RE: [PATCH 1/2] drm/amdgpu/display: fix pci revision id fetching

[AMD Public Use]

Patch1, Patch2 are :

From: Deucher, Alexander <[email protected]<mailto:[email protected]>>
Sent: 2020年3月6日 0:00
To: Xu, Feifei <[email protected]<mailto:[email protected]>>; Alex Deucher <[email protected]<mailto:[email protected]>>; amd-gfx list <[email protected]<mailto:[email protected]>>
Cc: Tawfik, Aly <[email protected]<mailto:[email protected]>>
Subject: Re: [PATCH 1/2] drm/amdgpu/display: fix pci revision id fetching

[AMD Public Use]

Is this for the series, or just this patch? Thanks!

Alex
________________________________
From: Xu, Feifei <[email protected]<mailto:[email protected]>>
Sent: Thursday, March 5, 2020 12:24 AM
To: Alex Deucher <[email protected]<mailto:[email protected]>>; amd-gfx list <[email protected]<mailto:[email protected]>>
Cc: Deucher, Alexander <[email protected]<mailto:[email protected]>>; Tawfik, Aly <[email protected]<mailto:[email protected]>>
Subject: RE: [PATCH 1/2] drm/amdgpu/display: fix pci revision id fetching

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: amd-gfx <[email protected]<mailto:[email protected]>> On Behalf Of Alex Deucher
Sent: 2020年3月5日 13:23
To: amd-gfx list <[email protected]<mailto:[email protected]>>
Cc: Deucher, Alexander <[email protected]<mailto:[email protected]>>; Tawfik, Aly <[email protected]<mailto:[email protected]>>
Subject: Re: [PATCH 1/2] drm/amdgpu/display: fix pci revision id fetching

Ping?

Quoted 25 lines · On Tue, Feb 25, 2020 at 3:32 PM Alex Deucher…

From: Aly-Tawfik <[email protected]<mailto:[email protected]>>

Use the pci revision id rather than the asic silicon revision id.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -2
index 0c55d44c9d5b..92166150bf9f 100644
@@ -902,7 +902,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
        init_data.asic_id.chip_family = adev->family;
 
-       init_data.asic_id.pci_revision_id = adev->rev_id;
+       init_data.asic_id.pci_revision_id = adev->pdev->revision;
        init_data.asic_id.hw_internal_rev = adev->external_rev_id;
 
        init_data.asic_id.vram_width = adev->gmc.vram_width;
--
Quoted 2 lines

2.24.1

_______________________________________________
amd-gfx mailing list [email protected]<mailto:[email protected]>
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7CFeifei.Xu%40amd.com%7Cdd49232261ac4267a33f08d7c0c54ad8%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637189825908683804&amp;sdata=sN%2BGSvrmnz5Qdrf4JR0sFUDWMWyu7tsOh6ZG9lb9I5Y%3D&amp;reserved=0<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CFeifei.Xu%40amd.com%7Cdd57c60d9a094f71f0cd08d7c1713880%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637190564935585723&sdata=N79NoA72vZ9zZRYsS92VIY0foejZG6igq57bbx7DIsI%3D&reserved=0>

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx