Have you tried the patch for unloading driver? Ps: the index of patch make people confused, I think there are 21 patches in the series. Thanks! Xiangliang Yu > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf > Of Monk Liu > Sent: Saturday, February 04, 2017 6:35 PM > To: amd-gfx at lists.freedesktop.org > Cc: Liu, Monk <Monk.Liu at amd.com> > Subject: [PATCH 05/21] drm/amdgpu:BUG if gpu_reste and asic_reset from > VF > > for SRIOV vf, Guest couldn't really access PCI registers so > gpu_reset() and asic_reset should be avoided. > > for suspend it could run for SRIOV because cg/pg routine already modified > for SRIOV vf case, besides we should remove the req/rel gpu access around > it because the req/rel should be used by invoker. > > Change-Id: I678d3f2ce202458c1d1d404970fa47421766b666 > Signed-off-by: Monk Liu <Monk.Liu at amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +-------- > drivers/gpu/drm/amd/amdgpu/vi.c | 2 ++ > 2 files changed, 3 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index 6106cd6..173df73 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -1566,9 +1566,6 @@ int amdgpu_suspend(struct amdgpu_device *adev) > { > int i, r; > > - if (amdgpu_sriov_vf(adev)) > - amdgpu_virt_request_full_gpu(adev, false); > - > /* ungate SMC block first */ > r = amdgpu_set_clockgating_state(adev, > AMD_IP_BLOCK_TYPE_SMC, > AMD_CG_STATE_UNGATE); > @@ -1597,9 +1594,6 @@ int amdgpu_suspend(struct amdgpu_device *adev) > } > } > > - if (amdgpu_sriov_vf(adev)) > - amdgpu_virt_release_full_gpu(adev, false); > - > return 0; > } > > @@ -2356,8 +2350,7 @@ int amdgpu_gpu_reset(struct amdgpu_device > *adev) > int resched; > bool need_full_reset; > > - if (amdgpu_sriov_vf(adev)) > - return 0; > + BUG_ON(amdgpu_sriov_vf(adev)); > > if (!amdgpu_check_soft_reset(adev)) { > DRM_INFO("No hardware hang detected. Did some blocks > stall?\n"); diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c > b/drivers/gpu/drm/amd/amdgpu/vi.c index 7810030..557994c 100644 > --- a/drivers/gpu/drm/amd/amdgpu/vi.c > +++ b/drivers/gpu/drm/amd/amdgpu/vi.c > @@ -739,6 +739,8 @@ static int vi_asic_reset(struct amdgpu_device *adev) > { > int r; > > + BUG_ON(amdgpu_sriov_vf(adev)); > + > amdgpu_atombios_scratch_regs_engine_hung(adev, true); > > r = vi_gpu_pci_config_reset(adev); > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx