[PATCH] drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 24, 2018 at 12:02 AM, Shirish S <shirish.s at amd.com> wrote:
> This patch moves amdgpu_fbdev_set_suspend() to the beginning
> of suspend sequence.
>
> This is to ensure fbcon does not to write to the VRAM
> after GPU is powerd down.
>
> Signed-off-by: Shirish S <shirish.s at amd.com>
> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 7a1bec1..745f760 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2702,6 +2702,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
>
>         drm_kms_helper_poll_disable(dev);
>
> +       if (fbcon)
> +               amdgpu_fbdev_set_suspend(adev, 1);
> +
>         if (!amdgpu_device_has_dc_support(adev)) {
>                 /* turn off display hw */
>                 drm_modeset_lock_all(dev);
> @@ -2767,9 +2770,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
>                         DRM_ERROR("amdgpu asic reset failed\n");
>         }
>
> -       if (fbcon)
> -               amdgpu_fbdev_set_suspend(adev, 1);
> -
>         return 0;
>  }
>
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux