Or, we also can use PM_EVENT_ messages to separate freeze, thaw, suspend, resume, poweroff and restore. Thanks JimQu ________________________________________ å??件人: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> 代表 Michel Dänzer <michel at daenzer.net> å??é??æ?¶é?´: 2016å¹´8æ??24æ?¥ 9:03:20 æ?¶ä»¶äºº: Alex Deucher æ??é??: amd-gfx at lists.freedesktop.org 主é¢?: Re: [PATCH 3/3] drm/amdgpu: reset the asic when hibernating v2 On 24/08/16 02:45 AM, Alex Deucher wrote: > Some blocks require a reset to properly resume if there > is no power down of the asic like during various > hibernation steps. > > Reset the asic on freeze and force asic_init on thaw. > > Port of: > 274ad65c9d02bdcbee9bae045517864c3521d530 > (drm/radeon: hard reset r600 and newer GPU when hibernating.) from radeon. > > v2: split out just the freeze change and force init on thaw > > Signed-off-by: Alex Deucher <alexander.deucher at amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > index d0f65d4..2b57d68 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > @@ -423,14 +423,14 @@ static int amdgpu_pmops_freeze(struct device *dev) > { > struct pci_dev *pdev = to_pci_dev(dev); > struct drm_device *drm_dev = pci_get_drvdata(pdev); > - return amdgpu_device_suspend(drm_dev, false, true, false); > + return amdgpu_device_suspend(drm_dev, false, true, true); > } FWIW, using a single flags parameter tends to be more readable than multiple boolean parameters. Just a suggestion for possible further improvement, not a blocker for this patch. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list amd-gfx at lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx