All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>
To: Shirish S <shirish.s-5C7GfCeVMHo@public.gmane.org>
Cc: alexander.deucher-5C7GfCeVMHo@public.gmane.org,
	michel-otUistvHUpPR7s880joybQ@public.gmane.org,
	christian.koenig-5C7GfCeVMHo@public.gmane.org,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up
Date: Wed, 25 Jul 2018 17:09:58 +0800	[thread overview]
Message-ID: <20180725084148.GA799@hr-amur2> (raw)
In-Reply-To: <1532404960-2179-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>

On Tue, Jul 24, 2018 at 09:32:40AM +0530, Shirish S 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@amd.com>
> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Huang Rui <ray.huang@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-07-25  9:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24  4:02 [PATCH] drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up Shirish S
     [not found] ` <1532404960-2179-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
2018-07-24 17:16   ` Alex Deucher
2018-07-25  9:09   ` Huang Rui [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-07-23 10:06 Shirish S
     [not found] ` <1532340381-28557-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
2018-07-23 10:42   ` Michel Dänzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180725084148.GA799@hr-amur2 \
    --to=ray.huang-5c7gfcevmho@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
    --cc=shirish.s-5C7GfCeVMHo@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.