答复: [PATCH 3/3] drm/amdgpu: reset the asic when hibernating v2
Qu, Jim
Jim.Qu at amd.com
Wed Aug 24 02:18:56 UTC 2016
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
More information about the amd-gfx
mailing list