AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Look for bios sriov capabilities only if we are on Fiji or Tonga.
@ 2017-12-25 20:49 José Pekkarinen
       [not found] ` <20171225204947.9950-1-koalinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: José Pekkarinen @ 2017-12-25 20:49 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: José Pekkarinen

Signed-off-by: José Pekkarinen <koalinux@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index e630d918fefc..7958597028e3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -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

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

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

end of thread, other threads:[~2017-12-27 14:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-25 20:49 [PATCH] Look for bios sriov capabilities only if we are on Fiji or Tonga José Pekkarinen
     [not found] ` <20171225204947.9950-1-koalinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-27  7:49   ` Alex Deucher
     [not found]     ` <CADnq5_Mewg2SUFMqi0L0t7FOsD1RfKZERcK08KnybbcG=riadg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-27 14:48       ` José Ramón Muñoz Pekkarinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox