[V2,5/6] drm/amdgpu: Don't touch GFX hw during HW fini

Submitted by Liu, Monk on Dec. 2, 2016, 2:37 p.m.

Details

Message ID BY2PR12MB005436B3865ADA05E2669A59848E0@BY2PR12MB0054.namprd12.prod.outlook.com
State New
Headers show
Series "drm/amdgpu: add support SR-IOV initialization" ( rev: 3 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Liu, Monk Dec. 2, 2016, 2:37 p.m.
Reviewed-by: monk liu


-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Xiangliang Yu

Sent: Friday, December 02, 2016 2:04 PM
To: amd-gfx@lists.freedesktop.org
Cc: Yu, Xiangliang <Xiangliang.Yu@amd.com>; Liu, Shaoyun <Shaoyun.Liu@amd.com>
Subject: [V2 5/6] drm/amdgpu: Don't touch GFX hw during HW fini

For SR-IOV client, driver shouldn't touch the GFX hw during HW fini, otherwise, gfx will fail to start after rebooting guest os.

Signed-off-by: shaoyunl <Shaoyun.Liu@amd.com>

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>

---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ++++
 1 file changed, 4 insertions(+)

--
2.7.4

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

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index e1b6614..9b8d3fe 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -4828,6 +4828,10 @@  static int gfx_v8_0_hw_fini(void *handle)
 
 	amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0);
 	amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0);
+	if (amdgpu_sriov_vf(adev)) {
+		pr_debug("For SRIOV client, shouldn't do anything.\n");
+		return 0;
+	}
 	gfx_v8_0_cp_enable(adev, false);
 	gfx_v8_0_rlc_stop(adev);
 	gfx_v8_0_cp_compute_fini(adev);