AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 09/10] drm/radeon: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF
Date: Wed, 31 Aug 2016 18:08:55 -0400	[thread overview]
Message-ID: <1472681336-30106-9-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1472681336-30106-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>

Missed this case previously. No need to do anything if the
device is already off.  runtime pm will handle it.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/radeon/radeon_device.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 6b0d26f..8425b12 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1594,7 +1594,8 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,
 
 	rdev = dev->dev_private;
 
-	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
+	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF ||
+	    dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF)
 		return 0;
 
 	drm_kms_helper_poll_disable(dev);
@@ -1689,7 +1690,8 @@ int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon)
 	struct drm_crtc *crtc;
 	int r;
 
-	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
+	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF ||
+	    dev->switch_power_state == DRM_SWITCH_POWER_DYNAMIC_OFF)
 		return 0;
 
 	if (fbcon) {
-- 
2.5.5

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2016-08-31 22:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31 22:08 [PATCH 01/10] drm/amdgpu: handle runtime pm in drm pre/post close Alex Deucher
     [not found] ` <1472681336-30106-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-08-31 22:08   ` [PATCH 02/10] drm/amdgpu: handle runtime pm correctly in amdgpu_driver_open_kms Alex Deucher
     [not found]     ` <1472681336-30106-2-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-09-01  1:04       ` Michel Dänzer
2016-08-31 22:08   ` [PATCH 03/10] drm/amdgpu: handle runtime pm in fbcon Alex Deucher
     [not found]     ` <1472681336-30106-3-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-09-01  1:04       ` Michel Dänzer
     [not found]         ` <c2ff0619-5d11-c443-a1b4-b57530dc89f6-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-09-01 20:44           ` Alex Deucher
     [not found]             ` <CADnq5_P+HQ=7LQfFjG8dLihbGsEKnLZFNmeFeUdL79VvuwyqdA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-02  1:47               ` Michel Dänzer
     [not found]                 ` <38837769-4dfc-8a19-b6de-c5d18014c889-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-09-02 13:31                   ` Deucher, Alexander
2016-08-31 22:08   ` [PATCH 04/10] drm/amdgpu: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF Alex Deucher
     [not found]     ` <1472681336-30106-4-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-09-01  1:06       ` Michel Dänzer
2016-08-31 22:08   ` [PATCH 05/10] drm/amdgpu: set runtime pm state to active on resume Alex Deucher
2016-08-31 22:08   ` [PATCH 06/10] drm/radeon: handle runtime pm in drm pre/post close Alex Deucher
2016-08-31 22:08   ` [PATCH 07/10] drm/radeon: handle runtime pm correctly in amdgpu_driver_open_kms Alex Deucher
2016-08-31 22:08   ` [PATCH 08/10] drm/radeon: handle runtime pm in fbcon Alex Deucher
2016-08-31 22:08   ` Alex Deucher [this message]
2016-08-31 22:08   ` [PATCH 10/10] drm/radeon: set runtime pm state to active on resume Alex Deucher
2016-09-01  1:03   ` [PATCH 01/10] drm/amdgpu: handle runtime pm in drm pre/post close Michel Dänzer
     [not found]     ` <6648435f-d52e-e4d3-55f4-df1837b3b8a8-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-09-01 20:38       ` Alex Deucher
     [not found]         ` <CADnq5_N3e=xLhziKFKJog9vodd-=0sG4o2xW+kqU9ck+jFtMYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-02  1:50           ` 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=1472681336-30106-9-git-send-email-alexander.deucher@amd.com \
    --to=alexdeucher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox