Skip to contentSkip to conversation

drm/amdkfd: Add Arcturus GWS support and fix VG10

PATCH In review Joseph Greathouse 2 participants 4 messages Jun 30, 2020

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

PATCH 1/1 drm/amdkfd: Add Arcturus GWS support and fix VG10

Add support for GWS in Arcturus, which needs MEC2 firmware #48 or above. Fix the MEC2 version check for Vega 10 GWS support, since Vega 10 firmware adds 0x8000 to the actual firmware revision. We were previously declaring support where it did not exist.

Change-Id I9b44dfe59bdd8a38a0342e5155cdb071cf646cc5
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +6 -2
index 80393e0583bb..50886de3ba0a 100644
@@ -602,9 +602,13 @@ static int kfd_gws_init(struct kfd_dev *kfd)
 		return 0;
 
 	if (hws_gws_support
-		|| (kfd->device_info->asic_family >= CHIP_VEGA10
+		|| (kfd->device_info->asic_family == CHIP_VEGA10
+			&& kfd->mec2_fw_version >= 0x81b3)
+		|| (kfd->device_info->asic_family >= CHIP_VEGA12
 			&& kfd->device_info->asic_family <= CHIP_RAVEN
-			&& kfd->mec2_fw_version >= 0x1b3))
+			&& kfd->mec2_fw_version >= 0x1b3)
+		|| (kfd->device_info->asic_family == CHIP_ARCTURUS
+			&& kfd->mec2_fw_version >= 0x30))
 		ret = amdgpu_amdkfd_alloc_gws(kfd->kgd,
 				amdgpu_amdkfd_get_num_gws(kfd->kgd), &kfd->gws);
 
Signature · 6 lines
2.20.1

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

[AMD Public Use]

One inquiry inline

Quoted 25 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Joseph Greathouse
Sent: Monday, June 29, 2020 9:55 PM
To: [email protected]
Cc: Greathouse, Joseph <[email protected]>
Subject: [PATCH] drm/amdkfd: Add Arcturus GWS support and fix VG10

Add support for GWS in Arcturus, which needs MEC2 firmware #48 or above. Fix the MEC2 version check for Vega 10 GWS support, since Vega 10 firmware adds 0x8000 to the actual firmware revision. We were previously declaring support where it did not exist.

Change-Id I9b44dfe59bdd8a38a0342e5155cdb071cf646cc5
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +0 -0
index 80393e0583bb..50886de3ba0a 100644

drivers/gpu/drm/amd/amdkfd/kfd_device.c static int kfd_gws_init(struct kfd_dev *kfd) · line 609

Quoted 10 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +4 -2
@@ -602,9 +602,13 @@ static int kfd_gws_init(struct kfd_dev *kfd)
 		return 0;
 
 	if (hws_gws_support
-		|| (kfd->device_info->asic_family >= CHIP_VEGA10
+		|| (kfd->device_info->asic_family == CHIP_VEGA10
+			&& kfd->mec2_fw_version >= 0x81b3)
+		|| (kfd->device_info->asic_family >= CHIP_VEGA12
 			&& kfd->device_info->asic_family <= CHIP_RAVEN
-			&& kfd->mec2_fw_version >= 0x1b3))
+			&& kfd->mec2_fw_version >= 0x1b3)

[KR] Is it 0x1b3 for both VG12 and RV? I wasn't sure if it was 0x1b4 for VG12, or did they just update the FW again and I missed the original?

Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +2 -1
+		|| (kfd->device_info->asic_family == CHIP_ARCTURUS
+			&& kfd->mec2_fw_version >= 0x30))
 		ret = amdgpu_amdkfd_alloc_gws(kfd->kgd,
 				amdgpu_amdkfd_get_num_gws(kfd->kgd),
 &kfd->gws);
 
--

2.20.1

Quoted 9 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fr
eedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&amp;data=02%7C01%7Ckent.russell%40amd.com%7C763e1f08fe29488bf1 6c08d81c98b2c5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63 7290790080559728&amp;sdata=22Hd8tIxsjF%2BLXiBKQgSt6EbOTIHqifVSYMb W1AWxV4%3D&amp;reserved=0

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

Reviewed-by
#2 lore raw

[AMD Public Use]

Thanks for answering my question offline. Patch is

Quoted 72 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Russell, Kent
Sent: Tuesday, June 30, 2020 8:00 AM
To: Greathouse, Joseph <[email protected]>; amd- [email protected]
Cc: Greathouse, Joseph <[email protected]>
Subject: RE: [PATCH] drm/amdkfd: Add Arcturus GWS support and fix VG10

[AMD Public Use]

One inquiry inline

Quoted 25 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Joseph Greathouse
Sent: Monday, June 29, 2020 9:55 PM
To: [email protected]
Cc: Greathouse, Joseph <[email protected]>
Subject: [PATCH] drm/amdkfd: Add Arcturus GWS support and fix VG10

Add support for GWS in Arcturus, which needs MEC2 firmware #48 or above. Fix the MEC2 version check for Vega 10 GWS support, since Vega 10 firmware adds 0x8000 to the actual firmware revision. We were previously declaring support where it did not exist.

Change-Id I9b44dfe59bdd8a38a0342e5155cdb071cf646cc5
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +0 -0
index 80393e0583bb..50886de3ba0a 100644

drivers/gpu/drm/amd/amdkfd/kfd_device.c static int kfd_gws_init(struct kfd_dev *kfd) · line 609

Quoted 10 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +4 -2
@@ -602,9 +602,13 @@ static int kfd_gws_init(struct kfd_dev *kfd)
 		return 0;
 
 	if (hws_gws_support
-		|| (kfd->device_info->asic_family >= CHIP_VEGA10
+		|| (kfd->device_info->asic_family == CHIP_VEGA10
+			&& kfd->mec2_fw_version >= 0x81b3)
+		|| (kfd->device_info->asic_family >= CHIP_VEGA12
 			&& kfd->device_info->asic_family <= CHIP_RAVEN
-			&& kfd->mec2_fw_version >= 0x1b3))
+			&& kfd->mec2_fw_version >= 0x1b3)

[KR] Is it 0x1b3 for both VG12 and RV? I wasn't sure if it was 0x1b4 for VG12, or did they just update the FW again and I missed the original?

Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +2 -1
+		|| (kfd->device_info->asic_family == CHIP_ARCTURUS
+			&& kfd->mec2_fw_version >= 0x30))
 		ret = amdgpu_amdkfd_alloc_gws(kfd->kgd,
 				amdgpu_amdkfd_get_num_gws(kfd->kgd),
 &kfd->gws);
 
--

2.20.1

Quoted 7 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
s.fr
eedesktop.org%2Fmailman%2Flistinfo%2Famd-

gfx&amp;data=02%7C01%7Ckent.russell%40amd.com%7C763e1f08fe29488bf1

Quoted 1 line

6c08d81c98b2c5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63

Quoted 1 line

7290790080559728&amp;sdata=22Hd8tIxsjF%2BLXiBKQgSt6EbOTIHqifVSYMb

Quoted 1 line

W1AWxV4%3D&amp;reserved=0

Quoted 9 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fr
eedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&amp;data=02%7C01%7Ckent.russell%40amd.com%7Ca4e3323d9bcc417be 40808d81ced2013%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C6 37291152507197101&amp;sdata=zrfmEq3xf5Y2MoFGnBK8EP5eYqZmWXPm3y KlrEtcMdU%3D&amp;reserved=0

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

#3 lore raw
In reply to Russell, Kent

[AMD Public Use]

Response inline.

Thanks,
-Joe

-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Tuesday, June 30, 2020 7:00 AM
To: Greathouse, Joseph <[email protected]>; [email protected]
Cc: Greathouse, Joseph <[email protected]>
Subject: RE: [PATCH] drm/amdkfd: Add Arcturus GWS support and fix VG10

[AMD Public Use]

One inquiry inline

Quoted 25 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Joseph Greathouse
Sent: Monday, June 29, 2020 9:55 PM
To: [email protected]
Cc: Greathouse, Joseph <[email protected]>
Subject: [PATCH] drm/amdkfd: Add Arcturus GWS support and fix VG10

Add support for GWS in Arcturus, which needs MEC2 firmware #48 or above. Fix the MEC2 version check for Vega 10 GWS support, since Vega 10 firmware adds 0x8000 to the actual firmware revision. We were previously declaring support where it did not exist.

Change-Id I9b44dfe59bdd8a38a0342e5155cdb071cf646cc5
---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +0 -0
index 80393e0583bb..50886de3ba0a 100644

drivers/gpu/drm/amd/amdkfd/kfd_device.c static int kfd_gws_init(struct kfd_dev *kfd) · line 609

Quoted 10 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +4 -2
@@ -602,9 +602,13 @@ static int kfd_gws_init(struct kfd_dev *kfd)
 		return 0;
 
 	if (hws_gws_support
-		|| (kfd->device_info->asic_family >= CHIP_VEGA10
+		|| (kfd->device_info->asic_family == CHIP_VEGA10
+			&& kfd->mec2_fw_version >= 0x81b3)
+		|| (kfd->device_info->asic_family >= CHIP_VEGA12
 			&& kfd->device_info->asic_family <= CHIP_RAVEN
-			&& kfd->mec2_fw_version >= 0x1b3))
+			&& kfd->mec2_fw_version >= 0x1b3)

[KR] Is it 0x1b3 for both VG12 and RV? I wasn't sure if it was 0x1b4 for VG12, or did they just update the FW again and I missed the original?
[JLG] Yes, the base firmware version for all of these chips added support in 0x1b3. I don't believe AMD released 0x1b3 for some of these chips (e.g. Raven) due to some performance regressions on those chips that were then fixed in 0x1b4. However, if someone happens to have 0x1b3 on their system, GWS will work according to my tests.

drivers/gpu/drm/amd/amdkfd/kfd_device.c static int kfd_gws_init(struct kfd_dev *kfd)

Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +2 -0
+		|| (kfd->device_info->asic_family == CHIP_ARCTURUS
+			&& kfd->mec2_fw_version >= 0x30))
 		ret = amdgpu_amdkfd_alloc_gws(kfd->kgd,
 				amdgpu_amdkfd_get_num_gws(kfd->kgd),
 &kfd->gws);

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