Skip to contentSkip to conversation

drm/amdgpu: Enable second VCN for certain Navy Flounder.

PATCH In review Peng Ju Zhou 3 participants 3 messages Jan 6, 2022 – Jan 7, 2022

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

PATCH v2 1/1 drm/amdgpu: Enable second VCN for certain Navy Flounder.

Certain Navy Flounder cards have 2 VCNs, enable it.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +2 -1
index 580a5b387122..57e001d73ec9 100644
@@ -550,7 +550,8 @@ void amdgpu_discovery_harvest_ip(struct amdgpu_device *adev)
 	}
 	/* some IP discovery tables on Navy Flounder don't have this set correctly */
 	if ((adev->ip_versions[UVD_HWIP][1] == IP_VERSION(3, 0, 1)) &&
-	    (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 2)))
+	    (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 2)) &&
+	    (adev->pdev->revision != 0xFF))
 		adev->vcn.harvest_config |= AMDGPU_VCN_HARVEST_VCN1;
 	if (vcn_harvest_count == adev->vcn.num_vcn_inst) {
 		adev->harvest_ip_mask |= AMD_HARVEST_IP_VCN_MASK;
Signature · 1 line
2.33.1
maintainer Acked-by on v2 1/1
#1 lore raw

[Public]

Quoted 25 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Peng Ju Zhou
Sent: Thursday, January 6, 2022 2:30 AM
To: [email protected]
Subject: [PATCH v2] drm/amdgpu: Enable second VCN for certain Navy Flounder.

Certain Navy Flounder cards have 2 VCNs, enable it.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +0 -0
index 580a5b387122..57e001d73ec9 100644
@@ -550,7 +550,8 @@ void amdgpu_discovery_harvest_ip(struct
 amdgpu_device *adev)
 	}
 	/* some IP discovery tables on Navy Flounder don't have this set

correctly */

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c void amdgpu_discovery_harvest_ip(struct amdgpu_device *adev) · line 554

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +2 -1
 	if ((adev->ip_versions[UVD_HWIP][1] == IP_VERSION(3, 0, 1)) &&
-	    (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 2)))
+	    (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 2)) &&
+	    (adev->pdev->revision != 0xFF))

We added this check because some navy flounder boards did not correctly set the harvesting in the IP discovery table. It would be nice to sort that out so we only enable this workaround on the boards with the bad harvest table. I suppose that would probably come down to the PCI revision anyway, so this is probably fine.

Quoted 6 lines

adev->vcn.harvest_config |=
AMDGPU_VCN_HARVEST_VCN1;

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +0 -1
 	if (vcn_harvest_count == adev->vcn.num_vcn_inst) {
 		adev->harvest_ip_mask |= AMD_HARVEST_IP_VCN_MASK;
--

2.33.1

Reviewed-by Acked-by Alex Deucher
#2 lore raw

[Public]

Next I will figure out which navy flounder boards have the bad harvest table info from VBIOS, and add a quirk to enable this workaround.

Regards,
Guchun

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Deucher, Alexander
Sent: Friday, January 7, 2022 1:21 AM
To: Zhou, Peng Ju <[email protected]>; [email protected]
Subject: RE: [PATCH v2] drm/amdgpu: Enable second VCN for certain Navy Flounder.

[Public]

Quoted 25 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Peng Ju Zhou
Sent: Thursday, January 6, 2022 2:30 AM
To: [email protected]
Subject: [PATCH v2] drm/amdgpu: Enable second VCN for certain Navy Flounder.

Certain Navy Flounder cards have 2 VCNs, enable it.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +0 -0
index 580a5b387122..57e001d73ec9 100644
@@ -550,7 +550,8 @@ void amdgpu_discovery_harvest_ip(struct
 amdgpu_device *adev)
 	}
 	/* some IP discovery tables on Navy Flounder don't have this set 

correctly */

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c void amdgpu_discovery_harvest_ip(struct amdgpu_device *adev) · line 554

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +2 -1
 	if ((adev->ip_versions[UVD_HWIP][1] == IP_VERSION(3, 0, 1)) &&
-	    (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 2)))
+	    (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 2)) &&
+	    (adev->pdev->revision != 0xFF))

We added this check because some navy flounder boards did not correctly set the harvesting in the IP discovery table. It would be nice to sort that out so we only enable this workaround on the boards with the bad harvest table. I suppose that would probably come down to the PCI revision anyway, so this is probably fine.

Quoted 6 lines

adev->vcn.harvest_config |=
AMDGPU_VCN_HARVEST_VCN1;

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +0 -1
 	if (vcn_harvest_count == adev->vcn.num_vcn_inst) {
 		adev->harvest_ip_mask |= AMD_HARVEST_IP_VCN_MASK;
--

2.33.1