All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up
@ 2018-07-23 10:06 Shirish S
       [not found] ` <1532340381-28557-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Shirish S @ 2018-07-23 10:06 UTC (permalink / raw)
  To: alexander.deucher-5C7GfCeVMHo, christian.koenig-5C7GfCeVMHo,
	michel-otUistvHUpPR7s880joybQ
  Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Shirish S

This patch moves amdgpu_fbdev_set_suspend() to the beginning 
of suspend sequence.

Signed-off-by: Shirish S <shirish.s@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up
       [not found] ` <1532340381-28557-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
@ 2018-07-23 10:42   ` Michel Dänzer
  0 siblings, 0 replies; 5+ messages in thread
From: Michel Dänzer @ 2018-07-23 10:42 UTC (permalink / raw)
  To: Shirish S, alexander.deucher-5C7GfCeVMHo,
	christian.koenig-5C7GfCeVMHo
  Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 2018-07-23 12:06 PM, Shirish S wrote:
> This patch moves amdgpu_fbdev_set_suspend() to the beginning 
> of suspend sequence.

Would be nice to have some rationale, e.g.:

 This is to avoid fbcon trying to write to the GPU's memory when the GPU
 is already powered down.


Other than that looks great, thanks. With a rationale added to the
commit log,

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up
@ 2018-07-24  4:02 Shirish S
       [not found] ` <1532404960-2179-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Shirish S @ 2018-07-24  4:02 UTC (permalink / raw)
  To: alexander.deucher-5C7GfCeVMHo, christian.koenig-5C7GfCeVMHo,
	michel-otUistvHUpPR7s880joybQ
  Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Shirish S

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>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up
       [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
  1 sibling, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2018-07-24 17:16 UTC (permalink / raw)
  To: Shirish S
  Cc: Deucher, Alexander, Michel Dänzer, Christian Koenig,
	amd-gfx list

On Tue, Jul 24, 2018 at 12:02 AM, Shirish S <shirish.s@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@amd.com>
> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up
       [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
  1 sibling, 0 replies; 5+ messages in thread
From: Huang Rui @ 2018-07-25  9:09 UTC (permalink / raw)
  To: Shirish S
  Cc: alexander.deucher-5C7GfCeVMHo, michel-otUistvHUpPR7s880joybQ,
	christian.koenig-5C7GfCeVMHo,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-25  9:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- 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

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.