summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_atpx_handler.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-06-02 09:24:53 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-07-07 14:51:09 -0400
commitb8c9fd5ad4b478ec1a5482177833e1a7082e48bd (patch)
treebde1728e14bbeaf609e92f81cdc96862ea942db1 /drivers/gpu/drm/radeon/radeon_atpx_handler.c
parent522761cbc80df90e94a77cf699fa0c94f55aa43c (diff)
downloadlinux-stable-b8c9fd5ad4b478ec1a5482177833e1a7082e48bd.tar.gz
linux-stable-b8c9fd5ad4b478ec1a5482177833e1a7082e48bd.tar.bz2
linux-stable-b8c9fd5ad4b478ec1a5482177833e1a7082e48bd.zip
drm/radeon/atpx: track whether if this is a hybrid graphics platform
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. Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_atpx_handler.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_atpx_handler.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
index 6996b316d5c5..de17b5ed3ea4 100644
--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
@@ -28,6 +28,7 @@ struct radeon_atpx_functions {
struct radeon_atpx {
acpi_handle handle;
struct radeon_atpx_functions functions;
+ bool is_hybrid;
};
static struct radeon_atpx_priv {
@@ -67,6 +68,10 @@ bool radeon_has_atpx_dgpu_power_cntl(void) {
return radeon_atpx_priv.atpx.functions.power_cntl;
}
+bool radeon_is_atpx_hybrid(void) {
+ return radeon_atpx_priv.atpx.is_hybrid;
+}
+
/**
* radeon_atpx_call - call an ATPX method
*
@@ -190,9 +195,11 @@ static int radeon_atpx_validate(struct radeon_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;