Skip to contentSkip to conversation

Patch "drm/amdgpu: only check mmBIF_IOV_FUNC_IDENTIFIER on tonga/fiji" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Feb 26, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/amdgpu: only check mmBIF_IOV_FUNC_IDENTIFIER on tonga/fiji

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-amdgpu-only-check-mmbif_iov_func_identifier-on-tonga-fiji.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 57ad33a307bf85cafda3a77c03a555c9f9ee4139 Mon Sep 17 00:00:00 2001

From: Alex Deucher <[email protected]>
Date: Tue, 19 Dec 2017 09:52:31 -0500
Subject: drm/amdgpu: only check mmBIF_IOV_FUNC_IDENTIFIER on tonga/fiji

From: Alex Deucher <[email protected]>

commit 57ad33a307bf85cafda3a77c03a555c9f9ee4139 upstream.

We only support SR-IOV on tonga/fiji. Don't check this register on other VI parts.

Fixes 048765ad5af7c89 (amdgpu: fix asic initialization for virtualized environments (v2))
---
 drivers/gpu/drm/amd/amdgpu/vi.c |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/vi.c +12 -7
@@ -448,14 +448,19 @@ static bool vi_read_bios_from_rom(struct
 
 static void vi_detect_hw_virtualization(struct amdgpu_device *adev)
 {
-	uint32_t reg = RREG32(mmBIF_IOV_FUNC_IDENTIFIER);
-	/* bit0: 0 means pf and 1 means vf */
-	/* bit31: 0 means disable IOV and 1 means enable */
-	if (reg & 1)
-		adev->virt.caps |= AMDGPU_SRIOV_CAPS_IS_VF;
+	uint32_t reg = 0;
 
-	if (reg & 0x80000000)
-		adev->virt.caps |= AMDGPU_SRIOV_CAPS_ENABLE_IOV;
+	if (adev->asic_type == CHIP_TONGA ||
+	    adev->asic_type == CHIP_FIJI) {
+	       reg = RREG32(mmBIF_IOV_FUNC_IDENTIFIER);
+	       /* bit0: 0 means pf and 1 means vf */
+	       /* bit31: 0 means disable IOV and 1 means enable */
+	       if (reg & 1)
+		       adev->virt.caps |= AMDGPU_SRIOV_CAPS_IS_VF;
+
+	       if (reg & 0x80000000)
+		       adev->virt.caps |= AMDGPU_SRIOV_CAPS_ENABLE_IOV;
+	}
 
 	if (reg == 0) {
 		if (is_virtual_machine()) /* passthrough mode exclus sr-iov mode */

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/drm-amdgpu-add-new-device-to-use-atpx-quirk.patch queue-4.14/drm-amdgpu-add-dpm-quirk-for-jet-pro-v2.patch queue-4.14/drm-amdgpu-only-check-mmbif_iov_func_identifier-on-tonga-fiji.patch queue-4.14/drm-amdgpu-disable-mmhub-power-gating-on-raven.patch queue-4.14/drm-amdgpu-avoid-leaking-pm-domain-on-driver-unbind-v2.patch queue-4.14/drm-amdgpu-add-atpx-quirk-handling-v2.patch