drm/amdgpu: Don't touch GFX hw during HW fini
authorXiangliang Yu <[email protected]>
Wed, 30 Nov 2016 02:54:18 +0000 (10:54 +0800)
committerAlex Deucher <[email protected]>
Tue, 6 Dec 2016 23:08:37 +0000 (18:08 -0500)
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 <[email protected]>
Signed-off-by: Xiangliang Yu <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Monk Liu <[email protected]>
Acked-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c

index 525990316099e4e97a8dc698d89cb397e83c5430..6ef0e0d047b5ff882eb94b565a3a4544dec0deeb 100644 (file)
@@ -4827,6 +4827,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);