dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 10/12] drm/radeon/atpx: add a query for ATPX dGPU power control
Date: Wed,  1 Jun 2016 16:53:23 -0400	[thread overview]
Message-ID: <1464814405-19729-11-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1464814405-19729-1-git-send-email-alexander.deucher@amd.com>

The runtime pm sequence is different depending on whether or
not the platform supports ATPX dGPU power control.

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

diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
index 3d95194..51da319 100644
--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
@@ -63,6 +63,10 @@ bool radeon_has_atpx(void) {
 	return radeon_atpx_priv.atpx_detected;
 }
 
+bool radeon_has_atpx_dgpu_power_cntl(void) {
+	return radeon_atpx_priv.atpx.functions.power_cntl;
+}
+
 /**
  * radeon_atpx_call - call an ATPX method
  *
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 36242a9..2dc43f5 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -165,9 +165,11 @@ void radeon_debugfs_cleanup(struct drm_minor *minor);
 #if defined(CONFIG_VGA_SWITCHEROO)
 void radeon_register_atpx_handler(void);
 void radeon_unregister_atpx_handler(void);
+bool radeon_has_atpx_dgpu_power_cntl(void);
 #else
 static inline void radeon_register_atpx_handler(void) {}
 static inline void radeon_unregister_atpx_handler(void) {}
+static inline bool radeon_has_atpx_dgpu_power_cntl(void) { return false; }
 #endif
 
 int radeon_no_wb;
-- 
2.5.5

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-06-01 20:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01 20:53 [PATCH 00/12] Improve PX support in radeon and amdgpu Alex Deucher
2016-06-01 20:53 ` [PATCH 01/12] drm/amdgpu: disable power control on hybrid laptops Alex Deucher
2016-06-01 20:53 ` [PATCH 02/12] drm/amdgpu: clean up atpx power control handling Alex Deucher
2016-06-01 20:53 ` [PATCH 03/12] drm/amdgpu: add a delay after ATPX dGPU power off Alex Deucher
2016-06-01 20:53 ` [PATCH 04/12] drm/amdgpu/atpx: add a query for ATPX dGPU power control Alex Deucher
2016-06-01 20:53 ` [PATCH 05/12] drm/amdgpu: use PCI_D3hot for PX systems without " Alex Deucher
2016-06-01 20:53 ` [PATCH 06/12] drm/amdgpu/atpx: drop forcing of " Alex Deucher
2016-06-01 20:53 ` [PATCH 07/12] drm/radeon: disable power control on hybrid laptops Alex Deucher
2016-06-01 20:53 ` [PATCH 08/12] drm/radeon: clean up atpx power control handling Alex Deucher
2016-06-01 20:53 ` [PATCH 09/12] drm/radeon: add a delay after ATPX dGPU power off Alex Deucher
2016-06-01 20:53 ` Alex Deucher [this message]
2016-06-01 20:53 ` [PATCH 11/12] drm/radeon: use PCI_D3hot for PX systems without dGPU power control Alex Deucher
2016-06-01 20:53 ` [PATCH 12/12] drm/radeon/atpx: drop forcing of " Alex Deucher
2016-06-02  0:02 ` [PATCH 00/12] Improve PX support in radeon and amdgpu Mike Lothian
2016-06-02 12:31   ` Alex Deucher
2016-06-02  7:17 ` Christian König

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=1464814405-19729-11-git-send-email-alexander.deucher@amd.com \
    --to=alexdeucher@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.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