dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/amdgpu/atpx: track whether if this is a hybrid graphics platform
@ 2016-06-02 13:33 Alex Deucher
  2016-06-02 13:33 ` [PATCH 2/6] drm/amdgpu/atpx: hybrid platforms use d3cold Alex Deucher
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Alex Deucher @ 2016-06-02 13:33 UTC (permalink / raw)
  To: dri-devel; +Cc: Alex Deucher

hybrid graphics in this case refers to systems which use the new
platform d3 cold ACPI methods as opposed to ATPX for 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 | 9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 19d15dc..c6b5ce3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -2394,10 +2394,12 @@ bool amdgpu_device_is_px(struct drm_device *dev);
 void amdgpu_register_atpx_handler(void);
 void amdgpu_unregister_atpx_handler(void);
 bool amdgpu_has_atpx_dgpu_power_cntl(void);
+bool amdgpu_is_atpx_hybrid(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; }
+static inline bool amdgpu_is_atpx_hybrid(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 90dfedc..3e973c7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c
@@ -28,6 +28,7 @@ struct amdgpu_atpx_functions {
 struct amdgpu_atpx {
 	acpi_handle handle;
 	struct amdgpu_atpx_functions functions;
+	bool is_hybrid;
 };
 
 static struct amdgpu_atpx_priv {
@@ -68,6 +69,10 @@ bool amdgpu_has_atpx_dgpu_power_cntl(void) {
 	return amdgpu_atpx_priv.atpx.functions.power_cntl;
 }
 
+bool amdgpu_is_atpx_hybrid(void) {
+	return amdgpu_atpx_priv.atpx.is_hybrid;
+}
+
 /**
  * amdgpu_atpx_call - call an ATPX method
  *
@@ -192,9 +197,11 @@ static int amdgpu_atpx_validate(struct amdgpu_atpx *atpx)
 			  ATPX_DYNAMIC_DGPU_POWER_OFF_SUPPORTED))
 		atpx->functions.power_cntl = true;
 
+	atpx->is_hybrid = false;
 	if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) {
-		printk("Hybrid Graphics, ATPX dGPU power cntl disabled\n");
+		printk("ATPX Hybrid Graphics\n");
 		atpx->functions.power_cntl = false;
+		atpx->is_hybrid = true;
 	}
 
 	return 0;
-- 
2.5.5

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

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

end of thread, other threads:[~2016-06-02 19:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-02 13:33 [PATCH 1/6] drm/amdgpu/atpx: track whether if this is a hybrid graphics platform Alex Deucher
2016-06-02 13:33 ` [PATCH 2/6] drm/amdgpu/atpx: hybrid platforms use d3cold Alex Deucher
2016-06-02 13:33 ` [PATCH 3/6] drm/amdgpu: drop explicit pci D3/D0 setting for ATPX power control Alex Deucher
2016-06-02 19:23   ` Lukas Wunner
2016-06-02 19:26     ` Alex Deucher
2016-06-02 19:49       ` Lukas Wunner
2016-06-02 13:33 ` [PATCH 4/6] drm/radeon/atpx: track whether if this is a hybrid graphics platform Alex Deucher
2016-06-02 13:33 ` [PATCH 5/6] drm/radeon/atpx: hybrid platforms use d3cold Alex Deucher
2016-06-02 13:33 ` [PATCH 6/6] drm/radeon: drop explicit pci D3/D0 setting for ATPX power control Alex Deucher
2016-06-02 14:20 ` [PATCH 1/6] drm/amdgpu/atpx: track whether if this is a hybrid graphics platform Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox