All of 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 04/12] drm/amdgpu/atpx: add a query for ATPX dGPU power control
Date: Wed,  1 Jun 2016 16:53:17 -0400	[thread overview]
Message-ID: <1464814405-19729-5-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/amd/amdgpu/amdgpu.h              | 2 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index ab122cc4..19d15dc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -2393,9 +2393,11 @@ bool amdgpu_device_is_px(struct drm_device *dev);
 #if defined(CONFIG_VGA_SWITCHEROO)
 void amdgpu_register_atpx_handler(void);
 void amdgpu_unregister_atpx_handler(void);
+bool amdgpu_has_atpx_dgpu_power_cntl(void);
 #else
 static inline void amdgpu_register_atpx_handler(void) {}
 static inline void amdgpu_unregister_atpx_handler(void) {}
+static inline bool amdgpu_has_atpx_dgpu_power_cntl(void) { return false; }
 #endif
 
 /*
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
index c5d280c..7b11af1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
@@ -64,6 +64,10 @@ bool amdgpu_has_atpx(void) {
 	return amdgpu_atpx_priv.atpx_detected;
 }
 
+bool amdgpu_has_atpx_dgpu_power_cntl(void) {
+	return amdgpu_atpx_priv.atpx.functions.power_cntl;
+}
+
 /**
  * amdgpu_atpx_call - call an ATPX method
  *
-- 
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 ` Alex Deucher [this message]
2016-06-01 20:53 ` [PATCH 05/12] drm/amdgpu: use PCI_D3hot for PX systems without dGPU power control 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 ` [PATCH 10/12] drm/radeon/atpx: add a query for ATPX dGPU power control Alex Deucher
2016-06-01 20:53 ` [PATCH 11/12] drm/radeon: use PCI_D3hot for PX systems without " 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-5-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 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.