Skip to contentSkip to conversation

Look for bios sriov capabilities only if we are on Fiji or Tonga.

PATCH In review José Pekkarinen 2 participants 3 messages Dec 25, 2017 – Dec 27, 2017 2 messages not in the archive

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

PATCH 1/1 Look for bios sriov capabilities only if we are on Fiji or Tonga.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +9 -6
index e630d918fefc..7958597028e3 100644
@@ -1933,12 +1933,15 @@ static int amdgpu_resume(struct amdgpu_device *adev)
 
 static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
 {
-	if (adev->is_atom_fw) {
-		if (amdgpu_atomfirmware_gpu_supports_virtualization(adev))
-			adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
-	} else {
-		if (amdgpu_atombios_has_gpu_virtualization_table(adev))
-			adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
+	if (adev->asic_type == CHIP_TONGA ||
+	    adev->asic_type == CHIP_FIJI) {
+		if (adev->is_atom_fw) {
+			if (amdgpu_atomfirmware_gpu_supports_virtualization(adev))
+				adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
+		} else {
+			if (amdgpu_atombios_has_gpu_virtualization_table(adev))
+				adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
+		}
 	}
 }
 
Signature · 6 lines
2.13.6

_______________________________________________
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): 20171225204947.9950-1-koalinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 1 line · José Pekkarinen

NACK. This will break vega10. The virtualization table only exists on sr-iov capable cards so the checks are safe on all asics.

Alex

Quoted 33 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +9 -7
index e630d918fefc..7958597028e3 100644
@@ -1933,12 +1933,15 @@ static int amdgpu_resume(struct amdgpu_device *adev)
 
 static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
 {
-       if (adev->is_atom_fw) {
-               if (amdgpu_atomfirmware_gpu_supports_virtualization(adev))
-                       adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
-       } else {
-               if (amdgpu_atombios_has_gpu_virtualization_table(adev))
-                       adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
+       if (adev->asic_type == CHIP_TONGA ||
+           adev->asic_type == CHIP_FIJI) {
+               if (adev->is_atom_fw) {
+                       if (amdgpu_atomfirmware_gpu_supports_virtualization(adev))
+                               adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
+               } else {
+                       if (amdgpu_atombios_has_gpu_virtualization_table(adev))
+                               adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
+               }
        }
 }
 
--

2.13.6

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

A message that is not in the archive (sent off-list or not yet received): CADnq5_Mewg2SUFMqi0L0t7FOsD1RfKZERcK08KnybbcG=riadg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw
Quoted 7 lines · On Wednesday, 27 December 2017 09:49:40 EET Alex Deucher wrote:
Quoted 1 line · José Pekkarinen

NACK. This will break vega10. The virtualization table only exists on sr-iov capable cards so the checks are safe on all asics.

Alex

Yes, true, for some time I wrongly believed it activates
AMDGPU_SRIOV_CAPS_IS_VF and allows getting into amdgpu_sriov_vf checks. Hopefully not the case.

Thanks again!

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